All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Fixing lease renewal
@ 2014-09-24 13:11 Olga Kornievskaia
  2014-09-24 13:46 ` Anna Schumaker
  0 siblings, 1 reply; 14+ messages in thread
From: Olga Kornievskaia @ 2014-09-24 13:11 UTC (permalink / raw)
  To: linux-nfs

Commit c9fdeb28 removed a 'continue' after checking if the lease needs
to be renewed. However, if client hasn't moved, the code falls down to
starting reboot recovery erroneously (ie., sends open reclaim and gets
back stale_clientid error) before recovering from getting stale_clientid
on the renew operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs4state.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 22fe351..4616598 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2340,11 +2340,13 @@ static void nfs4_state_manager(struct nfs_client *clp)
                        continue;
                }

-               if (test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
+               if (!test_bit(NFS4CLNT_MOVED, &clp->cl_state) &&
+                    test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
                        section = "check lease";
                        status = nfs4_check_lease(clp);
                        if (status < 0)
                                goto out_error;
+                       continue;
                }

                if (test_and_clear_bit(NFS4CLNT_MOVED, &clp->cl_state)) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 1/1] Fixing lease renewal
@ 2014-09-24 22:11 Olga Kornievskaia
  2014-09-24 22:24 ` Trond Myklebust
  0 siblings, 1 reply; 14+ messages in thread
From: Olga Kornievskaia @ 2014-09-24 22:11 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Commit c9fdeb28 removed a 'continue' after checking if the lease needs
to be renewed. However, if client hasn't moved, the code falls down to
starting reboot recovery erroneously (ie., sends open reclaim and gets
back stale_clientid error) before recovering from getting stale_clientid
on the renew operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs4state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 22fe351..6678769 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2345,6 +2345,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
 			status = nfs4_check_lease(clp);
 			if (status < 0)
 				goto out_error;
+			continue;
 		}
 
 		if (test_and_clear_bit(NFS4CLNT_MOVED, &clp->cl_state)) {
-- 
1.8.5.2 (Apple Git-48)


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 1/1] Fixing lease renewal
@ 2014-09-24 16:08 Olga Kornievskaia
  2014-09-24 18:05 ` Trond Myklebust
  0 siblings, 1 reply; 14+ messages in thread
From: Olga Kornievskaia @ 2014-09-24 16:08 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Commit c9fdeb28 removed a 'continue' after checking if the lease needs
to be renewed. However, if client hasn't moved, the code falls down to
starting reboot recovery erroneously (ie., sends open reclaim and gets
back stale_clientid error) before recovering from getting stale_clientid
on the renew operation.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs4state.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 22fe351..4616598 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2340,11 +2340,13 @@ static void nfs4_state_manager(struct nfs_client *clp)
 			continue;
 		}
 
-		if (test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
+		if (!test_bit(NFS4CLNT_MOVED, &clp->cl_state) &&
+		     test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) {
 			section = "check lease";
 			status = nfs4_check_lease(clp);
 			if (status < 0)
 				goto out_error;
+			continue;
 		}
 
 		if (test_and_clear_bit(NFS4CLNT_MOVED, &clp->cl_state)) {
-- 
1.8.5.2 (Apple Git-48)


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 1/1] Fixing lease renewal
@ 2014-09-23 21:36 Olga Kornievskaia
  2014-09-23 21:51 ` Trond Myklebust
  0 siblings, 1 reply; 14+ messages in thread
From: Olga Kornievskaia @ 2014-09-23 21:36 UTC (permalink / raw)
  To: linux-nfs

Commit c9fdeb28 removed a 'continue' after checking if the lease needs
to be renewed. However, if client hasn't moved, the code falls down to
starting reboot recovery erroneously (ie., sends open reclaim and gets
back stale_clientid error) before recovering from getting stale_clientid
on the renew operation.

---
 fs/nfs/nfs4state.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 22fe351..790aed3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2345,6 +2345,8 @@ static void nfs4_state_manager(struct nfs_client *clp)
                        status = nfs4_check_lease(clp);
                        if (status < 0)
                                goto out_error;
+                       if (!test_bit(NFS4CLNT_MOVED, &clp->cl_state))
+                               continue;
                }

                if (test_and_clear_bit(NFS4CLNT_MOVED, &clp->cl_state)) {
--
1.7.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-09-24 22:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24 13:11 [PATCH 1/1] Fixing lease renewal Olga Kornievskaia
2014-09-24 13:46 ` Anna Schumaker
2014-09-24 15:08   ` Olga Kornievskaia
  -- strict thread matches above, loose matches on Subject: below --
2014-09-24 22:11 Olga Kornievskaia
2014-09-24 22:24 ` Trond Myklebust
2014-09-24 16:08 Olga Kornievskaia
2014-09-24 18:05 ` Trond Myklebust
2014-09-24 18:21   ` Olga Kornievskaia
2014-09-24 18:29   ` Olga Kornievskaia
2014-09-24 20:11     ` Trond Myklebust
2014-09-24 22:12       ` Olga Kornievskaia
2014-09-23 21:36 Olga Kornievskaia
2014-09-23 21:51 ` Trond Myklebust
2014-09-24 13:10   ` Olga Kornievskaia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.