Skip to content

Commit

Permalink
client: fix "ceph.snap.btime" vxattr value
Browse files Browse the repository at this point in the history
The vxattr value incorrectly places a "09" prefix to the nanoseconds
field, instead of providing it as a zero-pad width specifier after '%'.

Fixes: https://tracker.ceph.com/issues/39705
Signed-off-by: David Disseldorp <ddiss@suse.de>
  • Loading branch information
ddiss committed May 15, 2019
1 parent 8980378 commit 0293598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11808,7 +11808,7 @@ bool Client::_vxattrcb_snap_btime_exists(Inode *in)

size_t Client::_vxattrcb_snap_btime(Inode *in, char *val, size_t size)
{
return snprintf(val, size, "%llu.09%lu",
return snprintf(val, size, "%llu.%09lu",
(long long unsigned)in->snap_btime.sec(),
(long unsigned)in->snap_btime.nsec());
}
Expand Down

0 comments on commit 0293598

Please sign in to comment.