diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/xattr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 8eaac04d1b87..65b3a84bbb2e 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -91,11 +91,18 @@ static struct ceph_vxattr_cb ceph_dir_vxattrs[] = { | |||
91 | static size_t ceph_vxattrcb_layout(struct ceph_inode_info *ci, char *val, | 91 | static size_t ceph_vxattrcb_layout(struct ceph_inode_info *ci, char *val, |
92 | size_t size) | 92 | size_t size) |
93 | { | 93 | { |
94 | return snprintf(val, size, | 94 | int ret; |
95 | |||
96 | ret = snprintf(val, size, | ||
95 | "chunk_bytes=%lld\nstripe_count=%lld\nobject_size=%lld\n", | 97 | "chunk_bytes=%lld\nstripe_count=%lld\nobject_size=%lld\n", |
96 | (unsigned long long)ceph_file_layout_su(ci->i_layout), | 98 | (unsigned long long)ceph_file_layout_su(ci->i_layout), |
97 | (unsigned long long)ceph_file_layout_stripe_count(ci->i_layout), | 99 | (unsigned long long)ceph_file_layout_stripe_count(ci->i_layout), |
98 | (unsigned long long)ceph_file_layout_object_size(ci->i_layout)); | 100 | (unsigned long long)ceph_file_layout_object_size(ci->i_layout)); |
101 | if (ceph_file_layout_pg_preferred(ci->i_layout)) | ||
102 | ret += snprintf(val + ret, size, "preferred_osd=%lld\n", | ||
103 | (unsigned long long)ceph_file_layout_pg_preferred( | ||
104 | ci->i_layout)); | ||
105 | return ret; | ||
99 | } | 106 | } |
100 | 107 | ||
101 | static struct ceph_vxattr_cb ceph_file_vxattrs[] = { | 108 | static struct ceph_vxattr_cb ceph_file_vxattrs[] = { |