lkml.org 
[lkml]   [2024]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RFC 06/24] vfs: break parent dir delegations in open(..., O_CREAT) codepath
From
Hi Jeff,

> In order to add directory delegation support, we need to break
> delegations on the parent whenever there is going to be a change in the
> directory.
>
> Add a delegated_inode parameter to lookup_open and have it break the
> delegation. Then, open_last_lookups can wait for the delegation break
> and retry the call to lookup_open once it's done.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/namei.c | 22 ++++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index f00d8d708001..88598a62ec64 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -3404,7 +3404,7 @@ static struct dentry *atomic_open(struct nameidata *nd, struct dentry *dentry,
> */
> static struct dentry *lookup_open(struct nameidata *nd, struct file *file,
> const struct open_flags *op,
> - bool got_write)
> + bool got_write, struct inode **delegated_inode)

Does NFS has a concept of lease keys and parent lease keys?

In SMB it's possible that the client passes a lease key (16 client chosen bytes) to a directory open,
when asking for a directory lease.

Then operations on files within that directory, take that lease key from the directory as
'parent lease keys' in addition to a unique lease key for the file.

That way a client can avoid breaking its own directory leases when creating/move/delete... files
in the directory.

metze

\
 
 \ /
  Last update: 2024-05-27 15:52    [W:0.282 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site