]> git.ipfire.org Git - thirdparty/samba.git/commit
vfs_ceph_new: Do not resolve by inode number
authorAnoop C S <anoopcs@samba.org>
Tue, 25 Feb 2025 12:10:13 +0000 (17:40 +0530)
committerJule Anger <janger@samba.org>
Thu, 13 Mar 2025 16:58:39 +0000 (16:58 +0000)
commit40d2b73f24b2a780d3bf278f177206a0a107fdb1
treef12e4ae5eab265e239a4a5b6c3e464b874943b94
parentd9151f66cc39be0653618ac299c2a9b2e587ef28
vfs_ceph_new: Do not resolve by inode number

CephFS snapshots within snap directory shares the same inode number from
its parent. Until unless we resolve by name we may incorrectly point at
an inode which is not a snapshot directory. Therefore to be functionally
correct we avoid resolving by inode number but proper name.

For example:

path (ino = 3)
  |
  --- dir (ino = 4)
  |
  --- .snap (ino = 3)
        |
        --- snap1 (ino = 3)
              |
              --- dir (ino = 4)

In this case an attempt to resolve 'snap1' by inode number 3 results in
pointing at 'path' which is not the desired outcome.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15818

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Mar  7 18:20:47 UTC 2025 on atb-devel-224

(cherry picked from commit a96f0542c8317a7dd0470b32350de6893fd98723)

Autobuild-User(v4-21-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-21-test): Thu Mar 13 16:58:39 UTC 2025 on atb-devel-224
source3/modules/vfs_ceph_new.c