Lines Matching refs:idmap

64 	struct idmap *idmap;  member
67 struct idmap { struct
271 const char *type, struct idmap *idmap) in nfs_idmap_request_key() argument
283 mutex_lock(&idmap->idmap_mutex); in nfs_idmap_request_key()
285 desc, "", 0, idmap); in nfs_idmap_request_key()
286 mutex_unlock(&idmap->idmap_mutex); in nfs_idmap_request_key()
297 size_t data_size, struct idmap *idmap) in nfs_idmap_get_key() argument
305 rkey = nfs_idmap_request_key(name, namelen, type, idmap); in nfs_idmap_get_key()
341 size_t buflen, struct idmap *idmap) in nfs_idmap_lookup_name() argument
348 ret = nfs_idmap_get_key(id_str, id_len, type, buf, buflen, idmap); in nfs_idmap_lookup_name()
356 __u32 *id, struct idmap *idmap) in nfs_idmap_lookup_id() argument
363 data_size = nfs_idmap_get_key(name, namelen, type, id_str, NFS_UINT_MAXLEN, idmap); in nfs_idmap_lookup_id()
416 struct idmap *idmap = pdo->pdo_data; in nfs_idmap_pipe_destroy() local
417 struct rpc_pipe *pipe = idmap->idmap_pipe; in nfs_idmap_pipe_destroy()
428 struct idmap *idmap = pdo->pdo_data; in nfs_idmap_pipe_create() local
429 struct rpc_pipe *pipe = idmap->idmap_pipe; in nfs_idmap_pipe_create()
432 dentry = rpc_mkpipe_dentry(dir, "idmap", idmap, pipe); in nfs_idmap_pipe_create()
447 struct idmap *idmap; in nfs_idmap_new() local
451 idmap = kzalloc(sizeof(*idmap), GFP_KERNEL); in nfs_idmap_new()
452 if (idmap == NULL) in nfs_idmap_new()
455 rpc_init_pipe_dir_object(&idmap->idmap_pdo, in nfs_idmap_new()
457 idmap); in nfs_idmap_new()
464 idmap->idmap_pipe = pipe; in nfs_idmap_new()
465 mutex_init(&idmap->idmap_mutex); in nfs_idmap_new()
469 &idmap->idmap_pdo); in nfs_idmap_new()
473 clp->cl_idmap = idmap; in nfs_idmap_new()
476 rpc_destroy_pipe_data(idmap->idmap_pipe); in nfs_idmap_new()
478 kfree(idmap); in nfs_idmap_new()
485 struct idmap *idmap = clp->cl_idmap; in nfs_idmap_delete() local
487 if (!idmap) in nfs_idmap_delete()
492 &idmap->idmap_pdo); in nfs_idmap_delete()
493 rpc_destroy_pipe_data(idmap->idmap_pipe); in nfs_idmap_delete()
494 kfree(idmap); in nfs_idmap_delete()
497 static int nfs_idmap_prepare_message(char *desc, struct idmap *idmap, in nfs_idmap_prepare_message() argument
539 nfs_idmap_prepare_pipe_upcall(struct idmap *idmap, in nfs_idmap_prepare_pipe_upcall() argument
542 if (idmap->idmap_upcall_data != NULL) { in nfs_idmap_prepare_pipe_upcall()
546 idmap->idmap_upcall_data = data; in nfs_idmap_prepare_pipe_upcall()
558 static void nfs_idmap_abort_pipe_upcall(struct idmap *idmap, in nfs_idmap_abort_pipe_upcall() argument
562 if (cmpxchg(&idmap->idmap_upcall_data, data, NULL) == data) in nfs_idmap_abort_pipe_upcall()
572 struct idmap *idmap = (struct idmap *)aux; in nfs_idmap_legacy_upcall() local
587 data->idmap = idmap; in nfs_idmap_legacy_upcall()
590 ret = nfs_idmap_prepare_message(key->description, idmap, im, msg); in nfs_idmap_legacy_upcall()
595 if (!nfs_idmap_prepare_pipe_upcall(idmap, data)) in nfs_idmap_legacy_upcall()
598 ret = rpc_queue_upcall(idmap->idmap_pipe, msg); in nfs_idmap_legacy_upcall()
600 nfs_idmap_abort_pipe_upcall(idmap, data, ret); in nfs_idmap_legacy_upcall()
655 struct idmap *idmap = (struct idmap *)rpci->private; in idmap_pipe_downcall() local
666 data = xchg(&idmap->idmap_upcall_data, NULL); in idmap_pipe_downcall()
713 struct idmap *idmap = data->idmap; in idmap_pipe_destroy_msg() local
716 nfs_idmap_abort_pipe_upcall(idmap, data, msg->errno); in idmap_pipe_destroy_msg()
723 struct idmap *idmap = (struct idmap *)rpci->private; in idmap_release_pipe() local
726 data = xchg(&idmap->idmap_upcall_data, NULL); in idmap_release_pipe()
733 struct idmap *idmap = server->nfs_client->cl_idmap; in nfs_map_name_to_uid() local
738 ret = nfs_idmap_lookup_id(name, namelen, "uid", &id, idmap); in nfs_map_name_to_uid()
750 struct idmap *idmap = server->nfs_client->cl_idmap; in nfs_map_group_to_gid() local
755 ret = nfs_idmap_lookup_id(name, namelen, "gid", &id, idmap); in nfs_map_group_to_gid()
767 struct idmap *idmap = server->nfs_client->cl_idmap; in nfs_map_uid_to_name() local
773 ret = nfs_idmap_lookup_name(id, "user", buf, buflen, idmap); in nfs_map_uid_to_name()
781 struct idmap *idmap = server->nfs_client->cl_idmap; in nfs_map_gid_to_group() local
787 ret = nfs_idmap_lookup_name(id, "group", buf, buflen, idmap); in nfs_map_gid_to_group()