xfs
[Top] [All Lists]

[PATCH 01/11] xfs: remove delwri buffer handling from xfs_buf_iorequest

To: xfs@xxxxxxxxxxx
Subject: [PATCH 01/11] xfs: remove delwri buffer handling from xfs_buf_iorequest
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 23 Aug 2011 04:28:03 -0400
References: <20110823082802.335389799@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.48-1
We cannot ever reach xfs_buf_iorequest for a buffer with XBF_DELWRI set,
given that all write handlers make sure that the buffer is remove from
the delwri queue before, and we never do reads with the XBF_DELWRI flag
set (which the code would not handle correctly anyway).

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

--- xfs.orig/fs/xfs_buf.c       2011-08-10 10:33:22.758525637 +0200
+++ xfs/fs/xfs/xfs_buf.c        2011-08-11 22:24:09.236752446 +0200
@@ -1275,15 +1276,10 @@ xfs_buf_iorequest(
 {
        trace_xfs_buf_iorequest(bp, _RET_IP_);
 
-       if (bp->b_flags & XBF_DELWRI) {
-               xfs_buf_delwri_queue(bp, 1);
-               return 0;
-       }
+       ASSERT(!(bp->b_flags & XBF_DELWRI));
 
-       if (bp->b_flags & XBF_WRITE) {
+       if (bp->b_flags & XBF_WRITE)
                xfs_buf_wait_unpin(bp);
-       }
-
        xfs_buf_hold(bp);
 
        /* Set the count to 1 initially, this will stop an I/O

<Prev in Thread] Current Thread [Next in Thread>