Project

General

Profile

Bug #57344

libcephfs: incorrectly showing the size for snapdirs when stating them

Added by Xiubo Li 5 months ago. Updated 4 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, libcephfs
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

There are 4 snapshots under the /mnt/kcephfs/.snap/:

[root@lxbceph1 kcephfs]# ls /mnt/kcephfs/.snap/
ddd  fff  fffd  snap3

But when stating the /mnt/kcephfs/.snap/ directory, I hit one time it show as -2:

[root@lxbceph1 kcephfs]# stat /mnt/kcephfs/.snap/
  File: .snap/
  Size: -2            Blocks: 0          IO Block: 65536  directory
Device: 0h/0d    Inode: 1           Links: 1
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:cephfs_t:s0
Access: 1970-01-01 08:00:00.000000000 +0800
Modify: 2022-08-31 07:51:02.242181796 +0800
Change: 2022-08-31 07:51:02.242181796 +0800
 Birth: 2022-08-31 07:50:19.681478483 +0800

But mostly it will show as 0:

[root@lxbceph1 kcephfs]# stat /mnt/kcephfs/.snap
  File: .snap
  Size: 0             Blocks: 0          IO Block: 65536  directory
Device: 0h/0d    Inode: 1           Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:cephfs_t:s0
Access: 1970-01-01 08:00:00.000000000 +0800
Modify: 2022-08-31 10:54:27.883476991 +0800
Change: 2022-08-31 10:54:27.883476991 +0800
 Birth: 2022-08-31 09:39:50.856553467 +0800

But 4 is as expected.


Related issues

Copied from Linux kernel client - Bug #57342: kclient: incorrectly showing the size for snapdirs when stating them Resolved
Copied to CephFS - Backport #57716: pacific: libcephfs: incorrectly showing the size for snapdirs when stating them Resolved
Copied to CephFS - Backport #57717: quincy: libcephfs: incorrectly showing the size for snapdirs when stating them Resolved

History

#1 Updated by Xiubo Li 5 months ago

  • Copied from Bug #57342: kclient: incorrectly showing the size for snapdirs when stating them added

#2 Updated by Xiubo Li 5 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 47879

#3 Updated by Xiubo Li 5 months ago

  • Backport set to quincy,pacific

#4 Updated by Rishabh Dave 4 months ago

  • Status changed from Fix Under Review to Pending Backport

#5 Updated by Backport Bot 4 months ago

  • Copied to Backport #57716: pacific: libcephfs: incorrectly showing the size for snapdirs when stating them added

#6 Updated by Backport Bot 4 months ago

  • Copied to Backport #57717: quincy: libcephfs: incorrectly showing the size for snapdirs when stating them added

#7 Updated by Backport Bot 4 months ago

  • Tags set to backport_processed

Also available in: Atom PDF