Bug 14756 - vfs_shadow_copy2 fixinodes not correctly updating inode numbers
Summary: vfs_shadow_copy2 fixinodes not correctly updating inode numbers
Status: ASSIGNED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-14 06:04 UTC by Ralph Böhme
Modified: 2021-07-28 16:27 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.14 cherry-picked from master with additional patch (23.86 KB, patch)
2021-07-28 15:51 UTC, Ralph Böhme
slow: review? (jra)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2021-07-14 06:04:59 UTC
For reentrant VFS calls where the incoming pathname refers to a file in a snapshot, the function convert_sbuf() which implements the logic behind shadow:fixinodes isn't called.
Comment 1 Samba QA Contact 2021-07-14 08:59:03 UTC
This bug was referenced in samba master:

03e36502f450d14656a824b36c33607ff418f0bf
40cf129abb51fa18a3bb6553da9c544f4d2d1f14
18a30d939e6f7d49300f235385953412f9e971b9
2c9ae4b78cd0d5a3686e79a7497fd3da9f87a307
b32e56d6eb29bfb5f368602edbc10d4b8bc9b4f0
745ded9afe12fda6d45638097a32b01122748649
0a0b438b8ab534eeb552a58ad72a714988e84d89
3aabc9825ca108641c2becf322fa0bd90ea18424
4a7e483c516cf2b9767919a764f05c43f4620cd7
c7d6745858f2efdd24ed6fd353ec5ece898033fa
Comment 2 Ralph Böhme 2021-07-28 15:51:09 UTC
Created attachment 16702 [details]
Patch for 4.14 cherry-picked from master with additional patch

Backport from master. Needed an additional patch, cf 7/8.

Please remember to add your signed-off to 7/8 if you're happy with the patch. Thanks!
Comment 3 Ralph Böhme 2021-07-28 16:26:54 UTC
Fwiw, not backporting this to 4.13 as the tests won't work there due to the lack of the dev/ino path/handle check in openat_pathref_fsp().

I think the fix itself is correct even for 4.13, but without the test to prove this I'd much rather keep 4.13 unchanged/broken and 4.14 and 4.15 fixed.