From: Neil Brown <neilb@suse.de>
To: cluster-devel.redhat.com
Subject: [NFS] [Cluster-devel] [PATCH 0/4 Revised] NLM - lock failover
Date: Sat, 28 Apr 2007 14:51:17 +1000 [thread overview]
Message-ID: <17970.53957.677739.642780@notabene.brown> (raw)
In-Reply-To: <message from Wendy Cheng on Friday April 27>
On Friday April 27, wcheng at redhat.com wrote:
> Frank van Maarseveen wrote:
> >
> >I'd prefer (2) "echo /some/path > /proc/fs/nfsd/nlm_drop_lock" because:
> >
> >
> To convert the first patch of this submitted series from "fsid" to
> "/some/path" is a no-brainer, since we had gone thru several rounds of
> similar changes. However, my questions (it is more of a Neil's question)
> are, if I convert the first patch to do this,
>
> 1) then why do we still need the RPC drop-lock call in nfs-util ?
Maybe we don't.
I can imagine a (probably hypothetical) situation where you want to
drop some but not all of the locks on a filesystem - if it is a
cluster-aware filesystem that several virtual-NAS's export, and you
want to move just one virtual-NAS. But if you don't want to be able
to do that, you obviously don't have to.
> 2) what should we do for the 2nd patch ? i.e., how do we communicate
> with the take-over server it is time for its action, by RPC call or by
> "echo /some/path > /proc/fs/nfsd/nlm_set_grace_or_whatever" ?
I'm happy with using a path name like this to restart the grace
period. Where would you store the per-filesystem grace-period-end??
I guess you would need a new little data structure indexed by
... 'struct super_block *' I guess. It would need to hold a reference
on the superblock until the grace period expired would it?
It might seem 'obvious' to store it in 'struct svc_export', but there
can be several of these per filesystem, and more could be added after
you set the grace period. So it would be messy to get that right.
>
> In general, I feel if we do this "/some/path" approach, we may as well
> simply convert the 2nd patch from "fsid" to "/some/path". Then we would
> finish this long journey.
Certainly a lot closer.
If we are creating "nlm_drop_locks" and "nlm_set_grace" interfaces, we
should spend a few moments considering exactly what semantics they
should have.
In both cases we write a filename. Presumably it must start with a
'/' and be null terminated, so you use "echo -n" rather than "echo".
After all, a filename can contain a newline.
Is there any extra info we might want to pass in or out at the same
time?
For nlm_drop_locks, we might also want to be able to query locked -
"Do you hold any locks on this filesystem". Even "how many?".
For set_grace, we might want to ask how many seconds are left in the
grace period (I'm not sure how this info would be used, but it is
always nice to be able to read any value that you can write).
Does it make sense to have a single file with composite semantics?
We write
XX/path/name
where XX can be:
a number, to set second remaining in grace period
a '?' (or empty string) to query state
a '-' to remove all locks (and cancels any grace period)
We then read back two numbers, the seconds remaining in the grace
period, and the number of locked files.
Then we need to make sure we choose appropriate names. I think that
the string 'lockd' make more sense than 'nlm', as we are interacting
with the daemon, not configuring the protocol. We might not either
need either as the file is inside /proc/fs/nfsd, it is obviously
related to nfsd.
And if we can use the interface to query, then names like 'set' and
'drop' and probably mis-placed. Maybe "grace" and "locks".
If no path is given, the requests have system-wide effect. If there
is a non-empty path, just that filesystem if queried/modified.
These are just possibilities. I'm quite happy with either 1 or 2
files. I just want to be sure a number of options have been
considered, and that a reasoned choice as been made.
NeilBrown
next prev parent reply other threads:[~2007-04-28 4:51 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 21:50 [Cluster-devel] [PATCH 0/4 Revised] NLM - lock failover Wendy Cheng
2007-04-11 17:01 ` [Cluster-devel] Re: [NFS] " J. Bruce Fields
2007-04-17 19:30 ` [Cluster-devel] " Wendy Cheng
2007-04-18 18:56 ` [Cluster-devel] " Wendy Cheng
2007-04-18 19:46 ` Wendy Cheng
2007-04-19 14:41 ` [Cluster-devel] Re: [NFS] " Christoph Hellwig
2007-04-19 15:08 ` Wendy Cheng
[not found] ` <message from Wendy Cheng on Tuesday April 17>
2007-04-19 7:04 ` [Cluster-devel] " Neil Brown
2007-04-19 14:53 ` Wendy Cheng
2007-04-24 3:30 ` Wendy Cheng
[not found] ` <message from Wendy Cheng on Monday April 23>
2007-04-24 5:52 ` [NFS] " Neil Brown
2007-04-26 4:35 ` Wendy Cheng
[not found] ` <message from Wendy Cheng on Thursday April 26>
2007-04-26 5:43 ` Neil Brown
2007-04-27 2:24 ` Wendy Cheng
2007-04-27 6:00 ` Neil Brown
2007-04-27 11:15 ` Jeff Layton
[not found] ` <message from Jeff Layton on Friday April 27>
2007-04-27 12:40 ` Neil Brown
2007-04-27 18:57 ` Jeff Layton
2007-04-27 14:17 ` Christoph Hellwig
2007-04-27 15:43 ` J. Bruce Fields
2007-04-27 15:36 ` Wendy Cheng
2007-04-27 16:31 ` J. Bruce Fields
[not found] ` <message from J. Bruce Fields on Friday April 27>
2007-04-27 22:22 ` Neil Brown
2007-04-29 20:14 ` J. Bruce Fields
[not found] ` <message from J. Bruce Fields on Sunday April 29>
2007-04-29 23:10 ` Neil Brown
2007-04-30 5:19 ` Wendy Cheng
2007-05-04 18:42 ` J. Bruce Fields
2007-05-04 21:35 ` Wendy Cheng
2007-04-27 20:34 ` Frank van Maarseveen
2007-04-28 3:55 ` Wendy Cheng
[not found] ` <message from Wendy Cheng on Friday April 27>
2007-04-28 4:51 ` Neil Brown [this message]
2007-04-28 5:27 ` Marc Eshel
2007-04-28 12:33 ` Frank van Maarseveen
2007-04-27 15:12 ` Jeff Layton
2007-04-25 14:18 ` [Cluster-devel] Re: [NFS] " J. Bruce Fields
2007-04-25 14:10 ` Wendy Cheng
2007-04-25 15:21 ` Marc Eshel
2007-04-25 15:19 ` Wendy Cheng
2007-04-25 15:39 ` Wendy Cheng
2007-04-25 15:59 ` J. Bruce Fields
2007-04-25 15:52 ` Wendy Cheng
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=17970.53957.677739.642780@notabene.brown \
--to=neilb@suse.de \
/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).