• Home
  • Raw
  • Download

Lines Matching refs:val

36 	ssize_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val,
56 static ssize_t ceph_vxattrcb_layout(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_layout() argument
93 memcpy(val, buf, len); in ceph_vxattrcb_layout()
97 memcpy(val + ret, pool_name, len); in ceph_vxattrcb_layout()
102 memcpy(val + ret, ns_field, len); in ceph_vxattrcb_layout()
104 memcpy(val + ret, pool_ns->str, pool_ns->len); in ceph_vxattrcb_layout()
119 static int ceph_fmt_xattr(char *val, size_t size, const char *fmt, ...) in ceph_fmt_xattr() argument
136 memcpy(val, buf, ret); in ceph_fmt_xattr()
141 char *val, size_t size) in ceph_vxattrcb_layout_stripe_unit() argument
143 return ceph_fmt_xattr(val, size, "%u", ci->i_layout.stripe_unit); in ceph_vxattrcb_layout_stripe_unit()
147 char *val, size_t size) in ceph_vxattrcb_layout_stripe_count() argument
149 return ceph_fmt_xattr(val, size, "%u", ci->i_layout.stripe_count); in ceph_vxattrcb_layout_stripe_count()
153 char *val, size_t size) in ceph_vxattrcb_layout_object_size() argument
155 return ceph_fmt_xattr(val, size, "%u", ci->i_layout.object_size); in ceph_vxattrcb_layout_object_size()
159 char *val, size_t size) in ceph_vxattrcb_layout_pool() argument
172 memcpy(val, pool_name, ret); in ceph_vxattrcb_layout_pool()
174 ret = ceph_fmt_xattr(val, size, "%lld", pool); in ceph_vxattrcb_layout_pool()
181 char *val, size_t size) in ceph_vxattrcb_layout_pool_namespace() argument
189 memcpy(val, ns->str, ret); in ceph_vxattrcb_layout_pool_namespace()
197 static ssize_t ceph_vxattrcb_dir_entries(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_entries() argument
200 return ceph_fmt_xattr(val, size, "%lld", ci->i_files + ci->i_subdirs); in ceph_vxattrcb_dir_entries()
203 static ssize_t ceph_vxattrcb_dir_files(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_files() argument
206 return ceph_fmt_xattr(val, size, "%lld", ci->i_files); in ceph_vxattrcb_dir_files()
209 static ssize_t ceph_vxattrcb_dir_subdirs(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_subdirs() argument
212 return ceph_fmt_xattr(val, size, "%lld", ci->i_subdirs); in ceph_vxattrcb_dir_subdirs()
215 static ssize_t ceph_vxattrcb_dir_rentries(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_rentries() argument
218 return ceph_fmt_xattr(val, size, "%lld", in ceph_vxattrcb_dir_rentries()
222 static ssize_t ceph_vxattrcb_dir_rfiles(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_rfiles() argument
225 return ceph_fmt_xattr(val, size, "%lld", ci->i_rfiles); in ceph_vxattrcb_dir_rfiles()
228 static ssize_t ceph_vxattrcb_dir_rsubdirs(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_rsubdirs() argument
231 return ceph_fmt_xattr(val, size, "%lld", ci->i_rsubdirs); in ceph_vxattrcb_dir_rsubdirs()
234 static ssize_t ceph_vxattrcb_dir_rbytes(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_rbytes() argument
237 return ceph_fmt_xattr(val, size, "%lld", ci->i_rbytes); in ceph_vxattrcb_dir_rbytes()
240 static ssize_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_rctime() argument
243 return ceph_fmt_xattr(val, size, "%lld.%09ld", ci->i_rctime.tv_sec, in ceph_vxattrcb_dir_rctime()
253 static ssize_t ceph_vxattrcb_dir_pin(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_dir_pin() argument
256 return ceph_fmt_xattr(val, size, "%d", (int)ci->i_dir_pin); in ceph_vxattrcb_dir_pin()
273 static ssize_t ceph_vxattrcb_quota(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_quota() argument
276 return ceph_fmt_xattr(val, size, "max_bytes=%llu max_files=%llu", in ceph_vxattrcb_quota()
281 char *val, size_t size) in ceph_vxattrcb_quota_max_bytes() argument
283 return ceph_fmt_xattr(val, size, "%llu", ci->i_max_bytes); in ceph_vxattrcb_quota_max_bytes()
287 char *val, size_t size) in ceph_vxattrcb_quota_max_files() argument
289 return ceph_fmt_xattr(val, size, "%llu", ci->i_max_files); in ceph_vxattrcb_quota_max_files()
298 static ssize_t ceph_vxattrcb_snap_btime(struct ceph_inode_info *ci, char *val, in ceph_vxattrcb_snap_btime() argument
301 return ceph_fmt_xattr(val, size, "%lld.%09ld", ci->i_snap_btime.tv_sec, in ceph_vxattrcb_snap_btime()
435 const char *val, int val_len, in __set_xattr() argument
474 kfree(val); in __set_xattr()
500 kfree((void *)xattr->val); in __set_xattr()
511 if (val) in __set_xattr()
512 xattr->val = val; in __set_xattr()
514 xattr->val = ""; in __set_xattr()
518 xattr->should_free_val = (val && update_xattr); in __set_xattr()
527 ceph_vinop(&ci->vfs_inode), xattr, name_len, name, val_len, val); in __set_xattr()
554 xattr->val_len, xattr->val); in __get_xattr()
571 kfree((void *)xattr->val); in __free_xattr()
587 kfree((void *)xattr->val); in __remove_xattr()
656 const char *name, *val; in __build_xattrs() local
709 val = p; in __build_xattrs()
712 err = __set_xattr(ci, name, namelen, val, len, in __build_xattrs()
786 memcpy(dest, xattr->val, xattr->val_len); in __ceph_build_xattrs_blob()
893 memcpy(value, xattr->val, xattr->val_len); in __ceph_getxattr()