]> 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)
committerGünther Deschner <gd@samba.org>
Fri, 7 Mar 2025 18:20:47 +0000 (18:20 +0000)
commita96f0542c8317a7dd0470b32350de6893fd98723
tree5e5f8ceab230c90bfbbc7ef957817ffadb028948
parent9341d7fb466c95ea5aa0643049ce2a1f4183b9d0
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
source3/modules/vfs_ceph_new.c