ceph: fix "ceph.snap.btime" vxattr value
diff mbox series

Message ID 20190515154535.29662-1-ddiss@suse.de
State New
Headers show
  • ceph: fix "ceph.snap.btime" vxattr value
Related show

Commit Message

David Disseldorp May 15, 2019, 3:45 p.m. UTC
This fixes a cut-n-paste error from "ceph.dir.rctime":
The vxattr value incorrectly places a "09" prefix to the nanoseconds
field, instead of providing it as a zero-pad width specifier after '%'.

Link: https://tracker.ceph.com/issues/39705
Fixes: 7e03e7214470 ("ceph: add ceph.snap.btime vxattr")
Signed-off-by: David Disseldorp <ddiss@suse.de>
XXX: The erroneous change hasn't gone into mainline yet, so feel free to
squash this in with 7e03e7214470 in the ceph-client repo.

 fs/ceph/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 5778acaf5bcf..57350e4b7da0 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -282,7 +282,7 @@  static bool ceph_vxattrcb_snap_btime_exists(struct ceph_inode_info *ci)
 static size_t ceph_vxattrcb_snap_btime(struct ceph_inode_info *ci, char *val,
 				       size_t size)
-	return snprintf(val, size, "%lld.09%ld", ci->i_snap_btime.tv_sec,
+	return snprintf(val, size, "%lld.%09ld", ci->i_snap_btime.tv_sec,