Bug#670505: [3.2.12 - 3.2.14 regression] BUG: unable to handle kernel paging request in nfs_mark_delegation_referenced

2012-04-26 Thread Jonathan Nieder
notfound 669270 linux-2.6/3.2.7-1
merge 670505 669270
tags 670505 + upstream patch moreinfo
quit

Hi Rik,

Rik Theys wrote:

 It seems stable update 3.2.14 or 3.2.15 introduced a regression regarding 
 NFS4 delegations.
 It seems to be the same issue as reported here[1] against the 3.3 kernel. It 
 was also intruduced
 there between 3.3.0 and 3.3.1.
[...]
 BUG: unable to handle kernel paging request at ffb8
 IP: [a048f016] nfs_mark_delegation_referenced+0x6/0x6 [nfs]

In [1], Jeff Layton says it looks like a regression introduced by

  3114ea7a24d3 NFSv4: Return the delegation if the server returns
   NFS4ERR_OPENMODE

and suggests a fix.  Does this patch help?

-- 8 --
From: Trond Myklebust trond.mykleb...@netapp.com
Date: Tue, 27 Mar 2012 18:31:25 -0400
Subject: NFSv4: Minor cleanups for nfs4_handle_exception and 
nfs4_async_handle_error

commit 14977489ffdb80d4caf5a184ba41b23b02fbacd9 upstream.

Signed-off-by: Trond Myklebust trond.mykleb...@netapp.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
Thanks,
Jonathan

 fs/nfs/nfs4proc.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 757293b66dbb..626945f23afb 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -265,7 +265,7 @@ static int nfs4_handle_exception(struct nfs_server *server, 
int errorcode, struc
case 0:
return 0;
case -NFS4ERR_OPENMODE:
-   if (nfs_have_delegation(inode, FMODE_READ)) {
+   if (inode  nfs_have_delegation(inode, FMODE_READ)) {
nfs_inode_return_delegation(inode);
exception-retry = 1;
return 0;
@@ -277,10 +277,9 @@ static int nfs4_handle_exception(struct nfs_server 
*server, int errorcode, struc
case -NFS4ERR_DELEG_REVOKED:
case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_BAD_STATEID:
-   if (state != NULL)
-   nfs_remove_bad_delegation(state-inode);
if (state == NULL)
break;
+   nfs_remove_bad_delegation(state-inode);
nfs4_schedule_stateid_recovery(server, state);
goto wait_on_recovery;
case -NFS4ERR_EXPIRED:
@@ -3730,8 +3729,9 @@ nfs4_async_handle_error(struct rpc_task *task, const 
struct nfs_server *server,
case -NFS4ERR_DELEG_REVOKED:
case -NFS4ERR_ADMIN_REVOKED:
case -NFS4ERR_BAD_STATEID:
-   if (state != NULL)
-   nfs_remove_bad_delegation(state-inode);
+   if (state == NULL)
+   break;
+   nfs_remove_bad_delegation(state-inode);
case -NFS4ERR_OPENMODE:
if (state == NULL)
break;
-- 
1.7.10




-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120426165127.GA3639@burratino



Bug#670505: [3.2.12 - 3.2.14 regression] BUG: unable to handle kernel paging request in nfs_mark_delegation_referenced

2012-04-26 Thread Rik Theys

Hi Jonathan,

On Thu, 26 Apr 2012, Jonathan Nieder wrote:

Rik Theys wrote:


It seems stable update 3.2.14 or 3.2.15 introduced a regression regarding NFS4 
delegations.
It seems to be the same issue as reported here[1] against the 3.3 kernel. It 
was also intruduced
there between 3.3.0 and 3.3.1.

[...]

BUG: unable to handle kernel paging request at ffb8
IP: [a048f016] nfs_mark_delegation_referenced+0x6/0x6 [nfs]


In [1], Jeff Layton says it looks like a regression introduced by

 3114ea7a24d3 NFSv4: Return the delegation if the server returns
  NFS4ERR_OPENMODE

and suggests a fix.  Does this patch help?

-- 8 --
From: Trond Myklebust trond.mykleb...@netapp.com
Date: Tue, 27 Mar 2012 18:31:25 -0400
Subject: NFSv4: Minor cleanups for nfs4_handle_exception and 
nfs4_async_handle_error

commit 14977489ffdb80d4caf5a184ba41b23b02fbacd9 upstream.


If I read [1] correctly this patch was pushed in a Fedora update, and results 
in the following message being spewed at syslog by the thousands (filling the 
disk):


NFS: nfs4_reclaim_open_state: Lock reclaim failed!

I will try applying the patch to the Debian kernel next week, but I assume it 
will have the same result. If so, I believe it would be better to revert the 
bad commit for now, and apply a complete fix later when it becomes available.


Regards,

Rik




--
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/alpine.lrh.2.00.1204262107540.28...@helium.esat.kuleuven.be



Bug#670505: [3.2.12 - 3.2.14 regression] BUG: unable to handle kernel paging request in nfs_mark_delegation_referenced

2012-04-26 Thread Jonathan Nieder
Rik Theys wrote:

 If I read [1] correctly this patch was pushed in a Fedora update,
 and results in the following message being spewed at syslog by the
 thousands (filling the disk):

 NFS: nfs4_reclaim_open_state: Lock reclaim failed!

Mm, sounds unpleasant.  Here's a workaround, though it doesn't
leave me thrilled.

-- 8 --
From: William Dauchy wdau...@gmail.com
Date: Wed, 14 Mar 2012 12:32:04 +0100
Subject: NFSv4: Rate limit the state manager for lock reclaim warning messages

commit 96dcadc2fdd111dca90d559f189a30c65394451a upstream.

Adding rate limit on `Lock reclaim failed` messages since it could fill
up system logs

Signed-off-by: William Dauchy wdau...@gmail.com
Signed-off-by: Trond Myklebust trond.mykleb...@netapp.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
 fs/nfs/nfs4state.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 66020acf2ecd..9464a349f833 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1186,7 +1186,8 @@ restart:
spin_lock(state-state_lock);
list_for_each_entry(lock, state-lock_states, 
ls_locks) {
if (!(lock-ls_flags  
NFS_LOCK_INITIALIZED))
-   printk(%s: Lock reclaim 
failed!\n,
+   pr_warn_ratelimited(
+   %s: Lock reclaim 
failed!\n,
__func__);
}
spin_unlock(state-state_lock);
-- 
1.7.10




-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120426192415.GF3639@burratino