Project

General

Profile

Actions

Bug #57344

open

libcephfs: incorrectly showing the size for snapdirs when stating them

Added by Xiubo Li over 1 year ago. Updated over 1 year 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 3 (0 open3 closed)

Copied from Linux kernel client - Bug #57342: kclient: incorrectly showing the size for snapdirs when stating themResolvedXiubo Li

Actions
Copied to CephFS - Backport #57716: pacific: libcephfs: incorrectly showing the size for snapdirs when stating themResolvedVenky ShankarActions
Copied to CephFS - Backport #57717: quincy: libcephfs: incorrectly showing the size for snapdirs when stating themResolvedVenky ShankarActions
Actions #1

Updated by Xiubo Li over 1 year ago

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

Updated by Xiubo Li over 1 year ago

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

Updated by Xiubo Li over 1 year ago

  • Backport set to quincy,pacific
Actions #4

Updated by Rishabh Dave over 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Backport Bot over 1 year ago

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

Updated by Backport Bot over 1 year ago

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

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF