Bug 15819 - vfs_ceph_snapshots fails to list snapshots for entries at any level beyond share root
Summary: vfs_ceph_snapshots fails to list snapshots for entries at any level beyond sh...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.22.0rc4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 06:56 UTC by Anoop C S
Modified: 2025-06-05 15:41 UTC (History)
1 user (show)

See Also:


Attachments
patch from master for v4-22-test (5.08 KB, patch)
2025-04-30 14:36 UTC, Anoop C S
ddiss: review+
Details
patch from master for v4-21-test (5.08 KB, patch)
2025-04-30 14:36 UTC, Anoop C S
ddiss: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anoop C S 2025-03-04 06:56:39 UTC
When vfs_ceph_snapshots is used with vfs_ceph, snapshot contents residing under any level beyond the share root are not listed as previous versions. See below for configuration used:

[cephfs-subvol-new]
	comment = For samba share of subvolume subvol
	path = /volumes/_nogroup/subvol/d2916e6d-a054-41f1-ac77-17ee77f22365
	read only = No
	vfs objects = ceph_snapshots ceph_new
	ceph_new:config_file = /etc/ceph/ceph.conf
	ceph_new:user_id = foo
	ceph_new:filesystem = cephvol

Sample snapshots available within the file system:
$ smbclient \\\\192.168.122.101\\cephfs-subvol-new -U root%smb -c "cd .snap;ls"
  .                                   D        0  Mon Mar  3 22:45:20 2025
  ..                                  D        0  Fri Oct 11 15:25:07 2024
  _snap_2025-02-06-155603_1099511627778      D        0  Thu Jan 30 17:38:58 2025
  _snap_2025-02-06-160806_1099511627778      D        0  Thu Feb  6 16:07:20 2025
  _snap_2025-02-12-161003_1099511627778      D        0  Sat Feb  8 18:48:03 2025
  _snap_2025-02-12-163817_1099511627778      D        0  Sat Feb  8 18:48:03 2025
  _snap_2025-02-12-172301_1099511627778      D        0  Wed Feb 12 17:22:04 2025
  _snap_2025-02-13-161612_1099511627778      D        0  Thu Feb 13 15:23:12 2025
  _snap@2025-02-21-170620_1099511627778      D        0  Thu Feb 20 10:27:27 2025
  _snap_GMT_2025-02-21-173206_1099511627778      D        0  Thu Feb 20 10:27:27 2025
  _snap#_GMT_2025-02-21-180623_1099511627778      D        0  Thu Feb 20 10:27:27 2025
  _snap_1099511627778                 D        0  Thu Feb 20 10:27:27 2025

		4902912 blocks of size 1024. 4902912 blocks available

Above snapshots are successfully processed as previous versions for entries at share root.


$ smbclient \\\\192.168.122.101\\cephfs-subvol-new -U root%smb -c "cd dir/.snap;ls"
  .                                   D        0  Mon Mar  3 22:45:20 2025
  ..                                  D        0  Thu Feb 20 10:27:27 2025
  _snap_2025-02-06-160806_1099511627778      D        0  Thu Feb  6 16:07:57 2025
  _snap_2025-02-12-161003_1099511627778      D        0  Thu Feb  6 16:07:57 2025
  _snap_2025-02-12-163817_1099511627778      D        0  Wed Feb 12 16:37:48 2025
  _snap_2025-02-12-172301_1099511627778      D        0  Wed Feb 12 16:37:48 2025
  _snap_2025-02-13-161612_1099511627778      D        0  Wed Feb 12 16:37:48 2025
  _snap@2025-02-21-170620_1099511627778      D        0  Wed Feb 12 16:37:48 2025
  _snap_GMT_2025-02-21-173206_1099511627778      D        0  Wed Feb 12 16:37:48 2025
  _snap#_GMT_2025-02-21-180623_1099511627778      D        0  Wed Feb 12 16:37:48 2025
  _snap_1099511627778                 D        0  Wed Feb 12 16:37:48 2025

		4902912 blocks of size 1024. 4902912 blocks available

These snapshots under "dir" are not listed for entries inside "dir".
Comment 1 Samba QA Contact 2025-04-30 11:33:03 UTC
This bug was referenced in samba master:

ad8b2dbb67d87db22f2fa2df814dd91cbe071e60
95a2b50b1983a6ba810a96f50b27db7c992c02c0
Comment 2 Anoop C S 2025-04-30 14:36:24 UTC
Created attachment 18640 [details]
patch from master for v4-22-test
Comment 3 Anoop C S 2025-04-30 14:36:55 UTC
Created attachment 18641 [details]
patch from master for v4-21-test
Comment 4 Anoop C S 2025-05-01 09:18:44 UTC
Reassigning to Jule for inclusion in 4.21 and 4.22.
Comment 5 Jule Anger 2025-05-08 11:16:25 UTC
Pushed to autobuild-v4-{22,21}-test.
Comment 6 Samba QA Contact 2025-05-08 12:47:03 UTC
This bug was referenced in samba v4-21-test:

c7164448f1587185eca5f2e02dbad31e3fc7311b
84d23c82272ea77f6bab16ff8dbec43c016ae9af
Comment 7 Samba QA Contact 2025-05-08 12:55:12 UTC
This bug was referenced in samba v4-22-test:

501f32eab618c1bf63a663420092dba14095b4c7
77e490b018a5c16f8b023539c4daa81bda16e11d
Comment 8 Jule Anger 2025-05-08 13:00:25 UTC
Closing out bug report.

Thanks!
Comment 9 Samba QA Contact 2025-06-03 06:50:27 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.6):

c7164448f1587185eca5f2e02dbad31e3fc7311b
84d23c82272ea77f6bab16ff8dbec43c016ae9af
Comment 10 Samba QA Contact 2025-06-05 15:41:37 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.2):

501f32eab618c1bf63a663420092dba14095b4c7
77e490b018a5c16f8b023539c4daa81bda16e11d