[HEADS-UP] Using stored immutable file birth time for SMB File-ID

Ralph Boehme slow at samba.org
Thu Jun 27 14:38:56 UTC 2019


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
> etc.

Yeah, maybe, I'll take a look.

Thanks!
-slow

-- 
Ralph Boehme, Samba Team                https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46



More information about the samba-technical mailing list