• Home
  • Raw
  • Download

Lines Matching refs:name

14 static bool ceph_is_valid_xattr(const char *name)  in ceph_is_valid_xattr()  argument
16 return !strncmp(name, XATTR_CEPH_PREFIX, XATTR_CEPH_PREFIX_LEN) || in ceph_is_valid_xattr()
17 !strncmp(name, XATTR_SECURITY_PREFIX, in ceph_is_valid_xattr()
19 !strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) || in ceph_is_valid_xattr()
20 !strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN); in ceph_is_valid_xattr()
28 char *name; member
178 .name = CEPH_XATTR_NAME(_type, _name), \
187 .name = CEPH_XATTR_NAME2(_type, _name, _field), \
197 .name = "ceph.dir.layout",
216 { .name = NULL, 0 } /* Required table terminator */
224 .name = "ceph.file.layout",
235 { .name = NULL, 0 } /* Required table terminator */
268 for (vxattr = vxattrs; vxattr->name; vxattr++) in vxattrs_name_size()
290 const char *name) in ceph_match_vxattr() argument
295 while (vxattr->name) { in ceph_match_vxattr()
296 if (!strcmp(vxattr->name, name)) in ceph_match_vxattr()
306 const char *name, int name_len, in __set_xattr() argument
322 c = strncmp(name, xattr->name, min(name_len, xattr->name_len)); in __set_xattr()
341 xattr->name = name; in __set_xattr()
354 kfree((void *)name); in __set_xattr()
355 name = xattr->name; in __set_xattr()
378 ceph_vinop(&ci->vfs_inode), xattr, name, val_len, val); in __set_xattr()
384 const char *name) in __get_xattr() argument
389 int name_len = strlen(name); in __get_xattr()
396 c = strncmp(name, xattr->name, xattr->name_len); in __get_xattr()
404 dout("__get_xattr %s: found %.*s\n", name, in __get_xattr()
410 dout("__get_xattr %s: not found\n", name); in __get_xattr()
420 kfree((void *)xattr->name); in __free_xattr()
436 kfree((void *)xattr->name); in __remove_xattr()
449 const char *name) in __remove_xattr_by_name() argument
456 xattr = __get_xattr(ci, name); in __remove_xattr_by_name()
472 memcpy(dest, xattr->name, xattr->name_len); in __copy_xattr_names()
475 dout("dest=%s %p (%s) (%d/%d)\n", dest, xattr, xattr->name, in __copy_xattr_names()
499 xattr->name_len, xattr->name); in __ceph_destroy_xattrs()
520 const char *name, *val; in __build_xattrs() local
570 name = p; in __build_xattrs()
576 err = __set_xattr(ci, name, namelen, val, len, in __build_xattrs()
644 memcpy(dest, xattr->name, xattr->name_len); in __ceph_build_xattrs_blob()
666 ssize_t ceph_getxattr(struct dentry *dentry, const char *name, void *value, in ceph_getxattr() argument
675 if (!ceph_is_valid_xattr(name)) in ceph_getxattr()
683 vxattr = ceph_match_vxattr(inode, name); in ceph_getxattr()
708 xattr = __get_xattr(ci, name); in ceph_getxattr()
780 for (i = 0; vxattrs[i].name; i++) { in ceph_listxattr()
784 len = sprintf(names, "%s", vxattrs[i].name); in ceph_listxattr()
796 static int ceph_sync_setxattr(struct dentry *dentry, const char *name, in ceph_sync_setxattr() argument
843 req->r_path2 = kstrdup(name, GFP_NOFS); in ceph_sync_setxattr()
865 int ceph_setxattr(struct dentry *dentry, const char *name, in ceph_setxattr() argument
874 int name_len = strlen(name); in ceph_setxattr()
884 if (!ceph_is_valid_xattr(name)) in ceph_setxattr()
887 vxattr = ceph_match_vxattr(inode, name); in ceph_setxattr()
892 if (!strncmp(name, XATTR_CEPH_PREFIX, XATTR_CEPH_PREFIX_LEN)) in ceph_setxattr()
897 newname = kmemdup(name, name_len + 1, GFP_NOFS); in ceph_setxattr()
952 err = ceph_sync_setxattr(dentry, name, value, size, flags); in ceph_setxattr()
960 static int ceph_send_removexattr(struct dentry *dentry, const char *name) in ceph_send_removexattr() argument
977 req->r_path2 = kstrdup(name, GFP_NOFS); in ceph_send_removexattr()
986 int ceph_removexattr(struct dentry *dentry, const char *name) in ceph_removexattr() argument
999 if (!ceph_is_valid_xattr(name)) in ceph_removexattr()
1002 vxattr = ceph_match_vxattr(inode, name); in ceph_removexattr()
1007 if (!strncmp(name, XATTR_CEPH_PREFIX, XATTR_CEPH_PREFIX_LEN)) in ceph_removexattr()
1038 err = __remove_xattr_by_name(ceph_inode(inode), name); in ceph_removexattr()
1050 err = ceph_send_removexattr(dentry, name); in ceph_removexattr()