H A D | vlocation.c | 39 struct afs_cache_vlocation *vldb) afs_vlocation_access_vl_by_name() 45 _enter("%s,%s", cell->name, vl->vldb.name); afs_vlocation_access_vl_by_name() 55 ret = afs_vl_get_entry_by_name(&addr, key, vl->vldb.name, vldb, afs_vlocation_access_vl_by_name() 97 struct afs_cache_vlocation *vldb) afs_vlocation_access_vl_by_id() 113 ret = afs_vl_get_entry_by_id(&addr, key, volid, voltype, vldb, afs_vlocation_access_vl_by_id() 156 vl->vldb.name); afs_vlocation_access_vl_by_id() 185 memcpy(vl->vldb.name, name, namesz); afs_vlocation_alloc() 197 struct afs_cache_vlocation *vldb) afs_vlocation_update_record() 205 vl->vldb.name, afs_vlocation_update_record() 206 vl->vldb.vidmask, afs_vlocation_update_record() 207 ntohl(vl->vldb.servers[0].s_addr), afs_vlocation_update_record() 208 vl->vldb.srvtmask[0], afs_vlocation_update_record() 209 ntohl(vl->vldb.servers[1].s_addr), afs_vlocation_update_record() 210 vl->vldb.srvtmask[1], afs_vlocation_update_record() 211 ntohl(vl->vldb.servers[2].s_addr), afs_vlocation_update_record() 212 vl->vldb.srvtmask[2]); afs_vlocation_update_record() 215 vl->vldb.vid[0], afs_vlocation_update_record() 216 vl->vldb.vid[1], afs_vlocation_update_record() 217 vl->vldb.vid[2]); afs_vlocation_update_record() 219 if (vl->vldb.vidmask & AFS_VOL_VTM_RW) { afs_vlocation_update_record() 220 vid = vl->vldb.vid[0]; afs_vlocation_update_record() 222 } else if (vl->vldb.vidmask & AFS_VOL_VTM_RO) { afs_vlocation_update_record() 223 vid = vl->vldb.vid[1]; afs_vlocation_update_record() 225 } else if (vl->vldb.vidmask & AFS_VOL_VTM_BAK) { afs_vlocation_update_record() 226 vid = vl->vldb.vid[2]; afs_vlocation_update_record() 237 ret = afs_vlocation_access_vl_by_id(vl, key, vid, voltype, vldb); afs_vlocation_update_record() 243 vl->vldb.name, vid, vl->cell->name, ret); afs_vlocation_update_record() 256 vl->vldb.name, vid, vl->cell->name); afs_vlocation_update_record() 268 struct afs_cache_vlocation *vldb) afs_vlocation_apply_update() 271 vldb->name, vldb->vidmask, afs_vlocation_apply_update() 272 ntohl(vldb->servers[0].s_addr), vldb->srvtmask[0], afs_vlocation_apply_update() 273 ntohl(vldb->servers[1].s_addr), vldb->srvtmask[1], afs_vlocation_apply_update() 274 ntohl(vldb->servers[2].s_addr), vldb->srvtmask[2]); afs_vlocation_apply_update() 277 vldb->vid[0], vldb->vid[1], vldb->vid[2]); afs_vlocation_apply_update() 279 if (strcmp(vldb->name, vl->vldb.name) != 0) afs_vlocation_apply_update() 282 vl->vldb.name, vldb->name); afs_vlocation_apply_update() 284 vl->vldb = *vldb; afs_vlocation_apply_update() 298 struct afs_cache_vlocation vldb; afs_vlocation_fill_in_record() local 305 memset(&vldb, 0, sizeof(vldb)); afs_vlocation_fill_in_record() 318 ret = afs_vlocation_update_record(vl, key, &vldb); afs_vlocation_fill_in_record() 322 ret = afs_vlocation_access_vl_by_name(vl, key, &vldb); afs_vlocation_fill_in_record() 325 vl->vldb.name, vl->cell->name); afs_vlocation_fill_in_record() 330 afs_vlocation_apply_update(vl, &vldb); afs_vlocation_fill_in_record() 385 if (namesz >= sizeof(vl->vldb.name)) { afs_vlocation_lookup() 394 if (vl->vldb.name[namesz] != '\0') afs_vlocation_lookup() 396 if (memcmp(vl->vldb.name, name, namesz) == 0) afs_vlocation_lookup() 496 _enter("%s", vl->vldb.name); afs_put_vlocation() 623 struct afs_cache_vlocation vldb; afs_vlocation_updater() local 663 _debug("update %s", vl->vldb.name); afs_vlocation_updater() 668 ret = afs_vlocation_update_record(vl, NULL, &vldb); afs_vlocation_updater() 672 afs_vlocation_apply_update(vl, &vldb); afs_vlocation_updater() 37 afs_vlocation_access_vl_by_name(struct afs_vlocation *vl, struct key *key, struct afs_cache_vlocation *vldb) afs_vlocation_access_vl_by_name() argument 93 afs_vlocation_access_vl_by_id(struct afs_vlocation *vl, struct key *key, afs_volid_t volid, afs_voltype_t voltype, struct afs_cache_vlocation *vldb) afs_vlocation_access_vl_by_id() argument 195 afs_vlocation_update_record(struct afs_vlocation *vl, struct key *key, struct afs_cache_vlocation *vldb) afs_vlocation_update_record() argument 267 afs_vlocation_apply_update(struct afs_vlocation *vl, struct afs_cache_vlocation *vldb) afs_vlocation_apply_update() argument
|