mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
To: Ken Moffat <zarniwhoop@ntlworld.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: nfs3 problem with -rc{2,3} : blame
Date: Tue, 19 Jun 2012 17:46:28 +0000	[thread overview]
Message-ID: <1340127987.3754.16.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20120619165520.GA11015@milliways>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2886 bytes --]

On Tue, 2012-06-19 at 17:55 +0100, Ken Moffat wrote:
> On Tue, Jun 19, 2012 at 04:23:23PM +0000, Myklebust, Trond wrote:
> > On Tue, 2012-06-19 at 12:20 -0400, Trond Myklebust wrote:
> > > 
> > > However you are saying that the problem is there when you compile a
> > > kernel with this commit as the head, and it goes away when you compile a
> > > kernel with commit 3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c as the head?
> > > 
>  Provided I apply 4f97615d as well, so that it compiles, yes.
> 
> > > I'm confused as to how a bug in that patch could depend on
> > > CONFIG_NFS_V4, but I'll see what I can find.
> 
>  Thanks
> > 
> > By the way, I thought your test-case was doing firefox downloads. Do
> > those really use O_DIRECT?
> > 
>  I originally saw the problem doing that, but it was on the second
> download.  Or perhaps third or fourth - I tend not to remember
> successful downloads when I've got a lot of packages to check for new
> versions.  Using my backup script seemed a more reliable way to
> trigger a problem (but, only if there is something substantial to
> back up, such as a new vmlinuz).
> 
>  Thinking about this, it is almost certain that between the first
> download and the one that failed (several hours later) my backup
> script did run, from fcron, so I now think the rsync problem is what
> leads to issues when other programs later try to update the same nfs
> directory.

Does the following patch make any difference?

You probably want to ensure that you also have commit
906369e43c29001c39c7dfed8a01b9dff24ace75 (which is in 3.5-rc3) since
that corrects a similar issue.

Cheers
  Trond
8<------------------------------------------------------------
>From ed3b97f9af6421f326de413e6d6556d1ecc3399d Mon Sep 17 00:00:00 2001
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 19 Jun 2012 13:39:14 -0400
Subject: [PATCH] NFS: Fix a refcounting issue in O_DIRECT

In nfs_direct_write_reschedule(), the requests from nfs_scan_commit_list
have a refcount of 2, whereas the operations in
nfs_direct_write_completion_ops expect them to have a refcount of 1.

This patch adds a call to release the extra references.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
 fs/nfs/direct.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 3168f6e..9a4cbfc 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -490,6 +490,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
 			dreq->error = -EIO;
 			spin_unlock(cinfo.lock);
 		}
+		nfs_release_request(req);
 	}
 	nfs_pageio_complete(&desc);
 
-- 
1.7.10.2


-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2012-06-19 17:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-17 20:07 nfs3 problem with -rc{2,3} Ken Moffat
2012-06-18  1:11 ` Ken Moffat
2012-06-18 13:42 ` Myklebust, Trond
2012-06-18 13:45   ` Myklebust, Trond
2012-06-18 14:18     ` Ken Moffat
2012-06-18 14:53       ` Myklebust, Trond
2012-06-18 16:00         ` Ken Moffat
2012-06-18 20:05           ` Ken Moffat
2012-06-18 20:11             ` Myklebust, Trond
2012-06-18 23:38               ` Ken Moffat
2012-06-18 23:44                 ` Ken Moffat
2012-06-18 21:53             ` Ken Moffat
2012-06-18 22:03               ` Myklebust, Trond
2012-06-18 22:10                 ` Ken Moffat
2012-06-19  1:06                   ` nfs3 problem with -rc{2,3} : blame Ken Moffat
2012-06-19 16:20                     ` Myklebust, Trond
2012-06-19 16:23                       ` Myklebust, Trond
2012-06-19 16:55                         ` Ken Moffat
2012-06-19 17:46                           ` Myklebust, Trond [this message]
2012-06-19 19:35                             ` Ken Moffat
2012-06-19 22:44                               ` Myklebust, Trond
2012-06-19 23:31                                 ` Ken Moffat

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=1340127987.3754.16.camel@lade.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zarniwhoop@ntlworld.com \
    /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

all inboxes | Powered by JetHome®