linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: NFS list <linux-nfs@vger.kernel.org>, nfsv4 <nfsv4@ietf.org>
Subject: layout state simulator
Date: Thu, 09 Dec 2010 15:14:39 +0200	[thread overview]
Message-ID: <4D00D63F.5010904@panasas.com> (raw)

In order to help with verifying the layout-related algorithms presented
in RFC5661 I've built a simple simulator that generates random layout operations,
implements them on the server side and applies the results on the client side.
The simulator then verifies the resulting layout on both sides of the wire
to make sure they agree on the layout stateid and on the contents of the layout,
so that the client does not hold layout it is not supposed to.

So far, I've checked combinations of LAYOUTGET and LAYOUTRETURN and the only
addition to the protocol that was required was the serialization of the initial
LAYOUTGET carrying a non-layout stateid.
The reason for that, even without a forgetful client, is that in case the client sent
multiple layoutgets with the initial stateid and a layoutreturn that returns everything
(and thus resetting the layout stateid), without waiting for all the initial layoutgets,
then there will be a mixture of layout stateids before and after the layoutreturn
with colliding seqids.

I've implemented a simple synchronization scheme allowing a single layoutget with the
initial stateid although in theory we could allow multiple such layoutgets in parallel,
just fully serialized against a conflicting layoutreturn.  If we allow forgetful clients
to send a layoutget with the initial stateid to signal a "reset" of the layout (e.g., an
implicit layoutreturn for the whole file), it should be a singular operation as well.

The simulator is freely available (under GPLv2) here:
git://linux-nfs.org/~bhalevy/layout-sim.git

Next on my list are:
- CB_LAYOUTRECALL
- forgetful client
- return_on_close

Please feel free to use and improve it!

Benny

                 reply	other threads:[~2010-12-09 13:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4D00D63F.5010904@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfsv4@ietf.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).