mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pnfs: Increase the refcount when LAYOUTGET fails the first time
@ 2013-01-04 12:19 ycnian
  2013-01-04 15:51 ` Myklebust, Trond
  0 siblings, 1 reply; 2+ messages in thread
From: ycnian @ 2013-01-04 12:19 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs, linux-kernel, Yanchuan Nian

From: Yanchuan Nian <ycnian@gmail.com>

The layout will be set unusable if LAYOUTGET fails. Is it reasonable to
increase the refcount iff LAYOUTGET fails the first time?

Signed-off-by: Yanchuan Nian <ycnian@gmail.com>
---
 fs/nfs/pnfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e7165d9..d00260b 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -254,7 +254,7 @@ static void
 pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit)
 {
 	lo->plh_retry_timestamp = jiffies;
-	if (test_and_set_bit(fail_bit, &lo->plh_flags))
+	if (!test_and_set_bit(fail_bit, &lo->plh_flags))
 		atomic_inc(&lo->plh_refcount);
 }
 
-- 
1.7.4.4


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

end of thread, other threads:[~2013-01-04 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-04 12:19 [PATCH] pnfs: Increase the refcount when LAYOUTGET fails the first time ycnian
2013-01-04 15:51 ` Myklebust, Trond

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®