[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1226063563-16220-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Date: Fri, 7 Nov 2008 18:42:43 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To: cmm@...ibm.com, tytso@....edu, sandeen@...hat.com,
vallesroc@...il.com, Solofo.Ramangalahy@...l.net,
cryptooctoploid@...il.com
Cc: linux-ext4@...r.kernel.org,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: [PATCH -V2] ext4: Mark the buffer_heads as dirty and uptodate after prepare_write
We need to make sure we mark the buffer_heads as dirty and uptodate
so that block_write_full_page write them correctly.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
---
fs/ext4/inode.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 95d0d12..f9461d7 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2333,6 +2333,15 @@ static int ext4_da_writepage(struct page *page,
ret = block_prepare_write(page, 0, PAGE_CACHE_SIZE,
ext4_normal_get_block_write);
if (!ret) {
+ /*
+ * We mark the buffer_head dirty and uptodate even
+ * if we are not doing a block_write_full_page. This
+ * make sure when writeback see the page again with
+ * buffer_head present the buffer_head would have
+ * the right flags
+ */
+ block_commit_write(page, 0, PAGE_CACHE_SIZE);
+
page_bufs = page_buffers(page);
/* check whether all are mapped and non delay */
if (walk_page_buffers(NULL, page_bufs, 0, len, NULL,
--
1.6.0.3.640.g6331a
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists