[PATCH] ceph: fix "ceph.snap.btime" vxattr value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
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 --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,
 			ci->i_snap_btime.tv_nsec);
 }
 
-- 
2.16.4




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux