[Top] [All Lists]

[PATCH 1/3] xfs: flag all buffers as metadata

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/3] xfs: flag all buffers as metadata
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 26 Jul 2011 11:06:44 -0400
In-reply-to: <20110726150633.GA17400@xxxxxxxxxxxxx>
References: <20110726150633.GA17400@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
Now that REQ_META bios aren't treated specially in the CFQ I/O schedule
anymore, we can tag all buffers as metadata to make blktrace traces more
meaningful.  Note that we use buffers also to zero out partial blocks
in the preallocation / hole punching code, and while they operate on
data blocks the zeros written certainly aren't data.  I think this case
is borderline metadata enough to not bother special casing it.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.c
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_buf.c   2011-07-25 23:50:03.288230279 
+++ linux-2.6/fs/xfs/linux-2.6/xfs_buf.c        2011-07-25 23:50:22.208230167 
@@ -1224,6 +1224,9 @@ _xfs_buf_ioapply(
                rw = READ;
+       /* we only use the buffer cache for meta-data */
+       rw |= REQ_META;
        nr_pages = BIO_MAX_SECTORS >> (PAGE_SHIFT - BBSHIFT);

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