On 6/23/22 15:54, jie wang wrote:> Yes, we implement a vfs module which has cache. And we want to get > attributes from cache when samba calls openat.well, I guess the correct way to tackle this would be to let the *clients* do the caching with leases for file data and with directory leases for file metadata. But if you really want to cache on the server side, you could signal all other smbds with a message to drop the cache when you process the close in your VFS module. Another question would be which metadata your shooting for? stat info? DOS attributes? For the latter we have some design ideas to avoid the need to store an xattr with the DOS attributes for the default case. Cheers! -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20220623/82d0f56f/OpenPGP_signature.sig>
Thanks the reply, I'm interested in the DOS attributes, how can we avoid storing an xattr ? "Another question would be which metadata your shooting for? stat info? DOS attributes? For the latter we have some design ideas to avoid the need to store an xattr with the DOS attributes for the default case." On Thu, Jun 23, 2022 at 10:37 PM Ralph Boehme <slow at samba.org> wrote:> On 6/23/22 15:54, jie wang wrote: > > Yes, we implement a vfs module which has cache. And we want to get > > attributes from cache when samba calls openat. > > well, I guess the correct way to tackle this would be to let the > *clients* do the caching with leases for file data and with directory > leases for file metadata. > > But if you really want to cache on the server side, you could signal all > other smbds with a message to drop the cache when you process the close > in your VFS module. > > Another question would be which metadata your shooting for? stat info? > DOS attributes? For the latter we have some design ideas to avoid the > need to store an xattr with the DOS attributes for the default case. > > Cheers! > -slow > > -- > Ralph Boehme, Samba Team https://samba.org/ > SerNet Samba Team Lead https://sernet.de/en/team-samba >
On 6/29/22 12:09, jie wang wrote:> Thanks the reply, I'm interested in the DOS attributes, how can we?avoid > storing an xattr?? > > "Another question would be which metadata your shooting for? stat info? > DOS attributes? For the latter we have some design ideas to avoid the > need to store an xattr with the DOS attributes for the default case."map the DOS archive bit to the statx STATX_ATTR_NODUMP attribute, use stx_btime for the creation date. This enables to store all relevant metadata in the filesystem, avoiding the xattr, for the default case of a file without additional metadata or changes to stx_btime. -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20220705/38883118/OpenPGP_signature.sig>