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

Ralph Boehme slow at samba.org
Wed Jun 26 17:59:08 UTC 2019


On 6/26/19 6:12 PM, David Disseldorp wrote:
> On Wed, 26 Jun 2019 15:57:46 +0200, Ralph Boehme via samba-technical wrote:
> 
>> Questions? Remarks? Thoughts?
> 
> Thanks for the write-up, Ralph. I have a few of questions:
> - how will this change be affected by filesystems with low resolution
>   birth times?

that's a good point. The problem, it's impossible to detect resolution
in a sane manner at runtime. And we would need a runtime check for
*every* file access to cover the submount cases.

Maybe we need an option to cover this, so the admin has to tell us "yes,
this filesystem supports nanosecond resolution" so we can safely use
File-IDs based on the btime.

My current strategy is to defend against resolution being as low as a
second. In that case (ie when tv_nsec is zero), I or the file's inode
number into the File-ID.

> - given that this issue is Apple client specific, is there a need for
>   this new logic to be implemented outside of vfs_fruit?

yes, I think our current semantics based on inodes is dumb and we need a
general fix.

Thinking about it, I will go and ask MS what their client uses the
server provided File-IDs for, if at all.


> - what should we do for snapshots, which may have identical btime (and
>   inode) values shared with the snapshot source?

I guess that's ok. Fwiw, macOS clients don't support snapshots anyway.

-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