[PATCH 2/2] NFS: debugging code for nfs_wb_page()
From: Trond Myklebust
Date: Sat May 22 2010 - 10:46:41 EST
Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
---
fs/nfs/write.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index b8a6d7a..0558fab 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1519,12 +1519,21 @@ int nfs_wb_page(struct inode *inode, struct page *page)
int ret;
while(PagePrivate(page)) {
+ unsigned dirty;
+ int syncing;
+
wait_on_page_writeback(page);
if (clear_page_dirty_for_io(page)) {
ret = nfs_writepage_locked(page, &wbc);
if (ret < 0)
goto out_error;
+ continue;
}
+
+ dirty = inode->i_state & I_DIRTY;
+ syncing = inode->i_state & I_SYNC;
+ WARN_ON(!syncing && !dirty && PagePrivate(page));
+
ret = sync_inode(inode, &wbc);
if (ret < 0)
goto out_error;
--
1.7.0.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/