Project

General

Profile

Actions

Bug #39943

closed

client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component

Added by David Disseldorp almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
% Done:

0%

Source:
Q/A
Tags:
Backport:
nautilus,mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, kceph
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This bug was found while investigating https://tracker.ceph.com/issues/39705 .

The following kernel logic is used to generate the ceph.dir.rctime xattr value:
224 static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val,
225 size_t size)
226 {
227 return snprintf(val, size, "%lld.09%ld", ci->i_rctime.tv_sec,
228 ci->i_rctime.tv_nsec);
229 }

"09" is incorrectly provided as a prefix for ci->i_rctime.tv_nsec, instead of as a pad+width specifier.

This is a regression introduced ~7 years ago via 3489b42a72a41d477665ab37f196ae9257180abb (http://tracker.ceph.com/issues/2157), which was copied into libcephfs via ca6eb6128512a903a9ca31596b86bc208b9a4776 .


Related issues 4 (0 open4 closed)

Copied from CephFS - Bug #39705: qa: Expected: (btime) < (new_btime), actual: 2019-05-09 23:33:09.400554 vs 2019-05-09 23:33:09.094205ResolvedDavid Disseldorp

Actions
Copied to CephFS - Backport #40166: luminous: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component ResolvedNathan CutlerActions
Copied to CephFS - Backport #40167: nautilus: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component ResolvedNathan CutlerActions
Copied to CephFS - Backport #40168: mimic: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component ResolvedNathan CutlerActions
Actions

Also available in: Atom PDF