Lines Matching refs:cell
41 struct afs_cell *cell = vl->cell; in afs_vlocation_access_vl_by_name() local
45 _enter("%s,%s", cell->name, vl->vldb.name); in afs_vlocation_access_vl_by_name()
47 down_write(&vl->cell->vl_sem); in afs_vlocation_access_vl_by_name()
49 for (count = cell->vl_naddrs; count > 0; count--) { in afs_vlocation_access_vl_by_name()
50 addr = cell->vl_addrs[cell->vl_curr_svix]; in afs_vlocation_access_vl_by_name()
52 _debug("CellServ[%hu]: %08x", cell->vl_curr_svix, addr.s_addr); in afs_vlocation_access_vl_by_name()
79 cell->vl_curr_svix++; in afs_vlocation_access_vl_by_name()
80 cell->vl_curr_svix %= cell->vl_naddrs; in afs_vlocation_access_vl_by_name()
84 up_write(&vl->cell->vl_sem); in afs_vlocation_access_vl_by_name()
99 struct afs_cell *cell = vl->cell; in afs_vlocation_access_vl_by_id() local
103 _enter("%s,%x,%d,", cell->name, volid, voltype); in afs_vlocation_access_vl_by_id()
105 down_write(&vl->cell->vl_sem); in afs_vlocation_access_vl_by_id()
107 for (count = cell->vl_naddrs; count > 0; count--) { in afs_vlocation_access_vl_by_id()
108 addr = cell->vl_addrs[cell->vl_curr_svix]; in afs_vlocation_access_vl_by_id()
110 _debug("CellServ[%hu]: %08x", cell->vl_curr_svix, addr.s_addr); in afs_vlocation_access_vl_by_id()
147 cell->vl_curr_svix++; in afs_vlocation_access_vl_by_id()
148 cell->vl_curr_svix %= cell->vl_naddrs; in afs_vlocation_access_vl_by_id()
161 up_write(&vl->cell->vl_sem); in afs_vlocation_access_vl_by_id()
169 static struct afs_vlocation *afs_vlocation_alloc(struct afs_cell *cell, in afs_vlocation_alloc() argument
177 vl->cell = cell; in afs_vlocation_alloc()
243 vl->vldb.name, vid, vl->cell->name, ret); in afs_vlocation_update_record()
256 vl->vldb.name, vid, vl->cell->name); in afs_vlocation_update_record()
309 vl->cache = fscache_acquire_cookie(vl->cell->cache, in afs_vlocation_fill_in_record()
325 vl->vldb.name, vl->cell->name); in afs_vlocation_fill_in_record()
373 struct afs_vlocation *afs_vlocation_lookup(struct afs_cell *cell, in afs_vlocation_lookup() argument
382 cell->name, key_serial(key), in afs_vlocation_lookup()
391 down_write(&cell->vl_sem); in afs_vlocation_lookup()
392 spin_lock(&cell->vl_lock); in afs_vlocation_lookup()
393 list_for_each_entry(vl, &cell->vl_list, link) { in afs_vlocation_lookup()
399 spin_unlock(&cell->vl_lock); in afs_vlocation_lookup()
402 vl = afs_vlocation_alloc(cell, name, namesz); in afs_vlocation_lookup()
404 up_write(&cell->vl_sem); in afs_vlocation_lookup()
408 afs_get_cell(cell); in afs_vlocation_lookup()
410 list_add_tail(&vl->link, &cell->vl_list); in afs_vlocation_lookup()
412 up_write(&cell->vl_sem); in afs_vlocation_lookup()
436 spin_unlock(&cell->vl_lock); in afs_vlocation_lookup()
442 up_write(&cell->vl_sem); in afs_vlocation_lookup()
534 afs_put_cell(vl->cell); in afs_vlocation_destroy()
568 spin_lock(&vl->cell->vl_lock); in afs_vlocation_reaper()
577 spin_unlock(&vl->cell->vl_lock); in afs_vlocation_reaper()