From: Jamie Lokier <jamie-yetKDKU6eevNLxjTenLetw@public.gmane.org>
To: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
Cc: Jeremy Allison <jra-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Trond Myklebust
<trond.myklebust-41N18TsMXrtuMpJDpNschA@public.gmane.org>,
Mi Jinlong <mijinlong-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>,
NFSv3 list <linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org
Subject: Re: [PATCH] VFS: Unlink should revoke all outstanding leases on file
Date: Wed, 19 May 2010 17:21:15 +0100 [thread overview]
Message-ID: <20100519162115.GC1693@shareable.org> (raw)
In-Reply-To: <20100519140639.GB4581-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
J. Bruce Fields wrote:
> On Fri, May 14, 2010 at 11:16:43AM -0700, Jeremy Allison wrote:
> > On Fri, May 14, 2010 at 06:46:53PM +0100, Jamie Lokier wrote:
> >
> > > I think you can delete open files on Windows nowadays, if they are
> > > opened with a particular flag.
> >
> > You can only mark them as "to be deleted" once the last opener
> > closes. They still exist in the namespace.
>
> So, I'm a little lost: in your opinion, would leases be more useful to
> Samba if they were broken on delete, or if they weren't, or does it not
> matter because you'll never do that?
Samba might not delete open files (I'm not sure), but the Linux user
on the server can still unlink the files, or rename over them.
What should happen then, I'm not sure. Maybe Samba should be able to
delay the delete (like reads/writes can be delayed), or maybe it
should be able to refuse the delete altogether (similar to the way
the fanotify framework can block operations).
> I see three options:
> 1. modify the existing file lease behavior to match what NFSv4
> (and Samba?) needs; or
> 2. leave the existing leases alone and create some new lock type
> (or otherwise flag some leases somehow) that does what we
> want; and, if we do that, either:
> 2a. leave the new leases in-kernel-only, or
> 2b. expose the new leases to userspace somehow so Samba
> (or whever) can use them.
>
> I don't think any of 1, 2a, or 2b is likely to be harder than any other,
> so it's just a question of what we want.
I think changing the userspace contract for long-standing F_SETLEASE
is rude at least. Samba and NFS aren't the only lease users, and
anyway people will still run old Samba on new kernels; changing its
behaviour is a bit risky.
Imho, new lease semantics should use new userspace API.
-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-19 16:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-14 9:35 [PATCH] VFS: Unlink should revoke all outstanding leases on file Mi Jinlong
[not found] ` <4BED195F.3070504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-05-14 9:58 ` Jeff Layton
2010-05-14 17:17 ` Trond Myklebust
[not found] ` <1273857471.4732.7.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-05-14 17:38 ` Jeff Layton
[not found] ` <20100514133819.5e383485-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-05-14 17:46 ` Jamie Lokier
2010-05-14 18:16 ` Jeremy Allison
2010-05-19 14:06 ` J. Bruce Fields
[not found] ` <20100519140639.GB4581-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-19 16:21 ` Jamie Lokier [this message]
2010-05-14 17:59 ` Trond Myklebust
2010-05-14 18:31 ` Trond Myklebust
[not found] ` <1273861872.4732.34.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-05-14 19:23 ` J. Bruce Fields
[not found] ` <20100514192327.GA20192-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-19 9:46 ` Mi Jinlong
2010-05-19 15:57 ` J. Bruce Fields
[not found] ` <20100519155700.GE4581-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-20 9:46 ` Mi Jinlong
[not found] ` <4BF504DE.7010804-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-05-21 21:07 ` J. Bruce Fields
[not found] ` <20100521210738.GK11675-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-25 10:14 ` Mi Jinlong
2010-05-19 16:14 ` Jamie Lokier
[not found] ` <20100519161419.GB1693-yetKDKU6eevNLxjTenLetw@public.gmane.org>
2010-05-20 2:21 ` J. Bruce Fields
[not found] ` <20100514055844.109d2fdc-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-05-19 9:49 ` Mi Jinlong
2010-05-19 16:03 ` J. Bruce Fields
2010-05-20 9:23 ` Mi Jinlong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100519162115.GC1693@shareable.org \
--to=jamie-yetkdku6eevnlxjtenletw@public.gmane.org \
--cc=adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jra-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mijinlong-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=trond.myklebust-41N18TsMXrtuMpJDpNschA@public.gmane.org \
--cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).