[HEADS-UP] Using stored immutable file birth time for SMB File-ID
slow at samba.org
Mon Jul 1 08:08:20 UTC 2019
On 6/27/19 4:38 PM, Ralph Boehme via samba-technical wrote:
> Hi David,
> On 6/27/19 4:21 PM, David Disseldorp wrote:
>> Hi Ralph,
>> Another follow-up here, after looking at your patchset...
>> On Wed, 26 Jun 2019 15:57:46 +0200, Ralph Boehme via samba-technical wrote:
>>> As a file's creation time (or btime for birth-time) may be set by clients, this
>>> would result in changed File-IDs every time a client sets the btime. So we need
>>> to store an additional copy of a file's original btime. We store the btime as
>>> part of the DOS attributes xattr, we need an additional field in there, making
>>> for a new level 4 of the xattr info struct.
>> IIUC, Btrfs, XFS, ext4 and f2fs already expose an *immutable* btime via
>> statx. See the discussion in https://patchwork.kernel.org/cover/10812257
> thanks for bringing this up. These are interesting times... in the end
> the kernel may pick up our user.DOSATTRIB... :)
>> I'd also imagine that there are FSes out there that can offer their own
>> immutable never-recycled File-ID.
> Yes, HFS+, APFS, NTFS. :) Others?
>> Ideally your patchset could cater to both cases by allowing for
>> make_file_index_from_btime() / update_stat_ex_file_index() calls in the
>> VFS stat handler
> yes, that will work.
>> and avoiding the extra dosmode games if the
>> st_ex_file_index is already set.
> oh, good point, I have to fix that. :)
>> As a minor nit, I think it'd make sense to combine the new stat_ex bools
>> into a single flags entry which includes calculated[_original]_birthtime
> Yeah, maybe, I'll take a look.
proposed patchset for merge available via gitlab CI at
...and as attachment.
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 74495 bytes
Desc: not available
More information about the samba-technical