Project

General

Profile

Bug #39943

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

Added by David Disseldorp 3 months ago. Updated 3 months ago.

Status:
Pending Backport
Priority:
High
Category:
-
Target version:
Start date:
Due date:
% 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:

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

Copied from fs - Bug #39705: qa: Expected: (btime) < (new_btime), actual: 2019-05-09 23:33:09.400554 vs 2019-05-09 23:33:09.094205 Resolved
Copied to fs - Backport #40166: luminous: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component In Progress
Copied to fs - Backport #40167: nautilus: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component Resolved
Copied to fs - Backport #40168: mimic: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component Resolved

History

#1 Updated by David Disseldorp 3 months ago

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

#2 Updated by David Disseldorp 3 months ago

  • Pull request ID set to 28116

#3 Updated by Patrick Donnelly 3 months ago

  • Subject changed from ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component to client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component
  • Status changed from New to Need Review
  • Priority changed from Normal to High
  • Start date deleted (05/15/2019)
  • Backport set to nautilus,mimic,luminous
  • Component(FS) Client added
  • Component(FS) deleted (libcephfs)

#4 Updated by Patrick Donnelly 3 months ago

  • Status changed from Need Review to Pending Backport

#5 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #40166: luminous: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component added

#6 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #40167: nautilus: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component added

#7 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #40168: mimic: client: ceph.dir.rctime xattr value incorrectly prefixes "09" to the nanoseconds component added

Also available in: Atom PDF