public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* review: minor cleanup in xfs_read locking
@ 2006-09-04  0:17 Nathan Scott
  2006-09-04  0:31 ` Lachlan McIlroy
  2006-09-04  0:39 ` Lachlan McIlroy
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Scott @ 2006-09-04  0:17 UTC (permalink / raw)
  To: lachlan; +Cc: xfs

Hi Lachlan,

Could you check this for me - it just folds the second direct I/O
conditional added in your recent deadlock fix back into the prior
branch, which is also direct I/O specific...

thanks.

-- 
Nathan


Index: xfs-linux/linux-2.6/xfs_lrw.c
===================================================================
--- xfs-linux.orig/linux-2.6/xfs_lrw.c	2006-09-04 09:59:10.955973000 +1000
+++ xfs-linux/linux-2.6/xfs_lrw.c	2006-09-04 09:59:42.205926000 +1000
@@ -270,12 +270,12 @@ xfs_read(
 		}
 	}
 
-	if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp)))
-		bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)),
-						-1, FI_REMAPF_LOCKED);
-
-	if (unlikely(ioflags & IO_ISDIRECT))
+	if (unlikely((ioflags & IO_ISDIRECT))) {
+		if (VN_CACHED(vp))
+			bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)),
+						 -1, FI_REMAPF_LOCKED);
 		mutex_unlock(&inode->i_mutex);
+	}
 
 	xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore,
 				(void *)iovp, segs, *offset, ioflags);

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

* Re: review: minor cleanup in xfs_read locking
  2006-09-04  0:17 review: minor cleanup in xfs_read locking Nathan Scott
@ 2006-09-04  0:31 ` Lachlan McIlroy
  2006-09-04  0:39 ` Lachlan McIlroy
  1 sibling, 0 replies; 4+ messages in thread
From: Lachlan McIlroy @ 2006-09-04  0:31 UTC (permalink / raw)
  To: Nathan Scott; +Cc: xfs

Looks good Nathan.

I've made changes to check return codes from bhv_vop_flushinval_pages()
and friends so it's now dependent on this change.  I'll post a review
as soon as your change has gone in.

Nathan Scott wrote:
> Hi Lachlan,
> 
> Could you check this for me - it just folds the second direct I/O
> conditional added in your recent deadlock fix back into the prior
> branch, which is also direct I/O specific...
> 
> thanks.
> 

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

* Re: review: minor cleanup in xfs_read locking
  2006-09-04  0:17 review: minor cleanup in xfs_read locking Nathan Scott
  2006-09-04  0:31 ` Lachlan McIlroy
@ 2006-09-04  0:39 ` Lachlan McIlroy
  2006-09-04  1:09   ` Nathan Scott
  1 sibling, 1 reply; 4+ messages in thread
From: Lachlan McIlroy @ 2006-09-04  0:39 UTC (permalink / raw)
  To: Nathan Scott; +Cc: xfs

Looking a little closer... you could probably do away with the extra
pair of parentheses in the call to unlikely().

Nathan Scott wrote:
> Hi Lachlan,
> 
> Could you check this for me - it just folds the second direct I/O
> conditional added in your recent deadlock fix back into the prior
> branch, which is also direct I/O specific...
> 
> thanks.
> 

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

* Re: review: minor cleanup in xfs_read locking
  2006-09-04  0:39 ` Lachlan McIlroy
@ 2006-09-04  1:09   ` Nathan Scott
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Scott @ 2006-09-04  1:09 UTC (permalink / raw)
  To: Lachlan McIlroy; +Cc: xfs

On Mon, Sep 04, 2006 at 01:39:39AM +0100, Lachlan McIlroy wrote:
> Looking a little closer... you could probably do away with the extra
> pair of parentheses in the call to unlikely().
> 

Done, thanks - I'll push in most of my pending stuff shortly.

cheers.

-- 
Nathan

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

end of thread, other threads:[~2006-09-04  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-04  0:17 review: minor cleanup in xfs_read locking Nathan Scott
2006-09-04  0:31 ` Lachlan McIlroy
2006-09-04  0:39 ` Lachlan McIlroy
2006-09-04  1:09   ` Nathan Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox