linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Malahal Naineni <malahal@us.ibm.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-nfs@vger.kernel.org, Trond.Myklebust@netapp.com,
	Bryan Schumaker <bjschuma@netapp.com>
Subject: Re: corruption due to loss of lock
Date: Thu, 11 Jul 2013 09:12:06 -0500	[thread overview]
Message-ID: <20130711141206.GA14374@us.ibm.com> (raw)
In-Reply-To: <20130711071346.03b946bd@corrin.poochiereds.net>

Jeff Layton [jlayton@redhat.com] wrote:
> On Thu, 13 Jun 2013 13:47:37 -0500
> Malahal Naineni <malahal@us.ibm.com> wrote:
> 
> > Hi Trond,
> > 
> > I saw Bryan's patches here https://patchwork.kernel.org/patch/987402/
> > that fix issues after loss of a lock.  What is the status on this patch
> > set? Do they need more work? We have an application that uses range
> > locks on a file. Two threads from two different clients end up writing
> > to the same a file due to this bug after a lease expiry from a client.
> > 
> > Regards, Malahal.
> 
> (cc'ing Bryan since he did the original set)
> 
> Yeah, this set would be a nice thing to have. A couple of comments:
> 
> - I still think it would be best to make SIGLOST its own signal, but as
>   Bryan points out, it would need to be larger than SIGRTMAX. I'm
>   not sure that's possible on all arches with the way the RT signals
>   were done. It's probably worth investigating that though before
>   settling on SIGIO since it would be hard to change that retroactively.

Our application doesn't handle SIGIO, so it was terminating due to
SIGIO. We tested without SIGIO/SIGLOST part of the patch, it stopped
sending writes to NFS server as expected but the application didn't
receive EIO because the original patch set some task fields and didn't
call rpc_exit(). I just had to modify nfs_write_prepare() to call
rpc_exit(task) rather than modifying task status and action fields
directly.

I will post my patch after some more testing.

> 
> - This is not really a v4.1 specific thing. It should also be done for
>   v4.0 and v2/3, though the latter two really need to be done within
>   lockd.

Correct.

Regards, Malahal.


  reply	other threads:[~2013-07-11 14:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13 18:47 corruption due to loss of lock Malahal Naineni
2013-07-11 11:13 ` Jeff Layton
2013-07-11 14:12   ` Malahal Naineni [this message]
2013-07-11 14:19   ` Myklebust, Trond
2013-07-11 14:28     ` Jeff Layton
2013-07-11 14:33       ` Myklebust, Trond
2013-07-11 15:20         ` Jeff Layton
2013-07-11 15:39           ` Malahal Naineni
2013-07-11 16:28           ` Myklebust, Trond

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=20130711141206.GA14374@us.ibm.com \
    --to=malahal@us.ibm.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bjschuma@netapp.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.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).