[PATCH 2/6] SQUASHME: pnfs-block: skip sectors already initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Peng Tao <bergwolf@xxxxxxxxx>

No need to test PageUptodate when checking for old pages.

Signed-off-by: Peng Tao <peng_tao@xxxxxxxxx>
---
 fs/nfs/blocklayout/blocklayout.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 331d687..804eee6 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -596,11 +596,11 @@ fill_invalid_ext:
 
 			/* PageDirty: Other will write this out
 			 * PageWriteback: Other is writing this out
-			 * PageUptodate && sector_initialized: already written out
+			 * PageUptodate: It was read before
+			 * sector_initialized: already written out
 			 */
 			if (PageDirty(page) || PageWriteback(page) ||
-			    (PageUptodate(page) &&
-			     is_sector_initialized(be->be_inval, isect))) {
+			    is_sector_initialized(be->be_inval, isect)) {
 				dprintk
 				    ("page %lu is uptodate %d dirty %d writeback %d\n",
 				     page->index, PageUptodate(page),
@@ -612,7 +612,7 @@ fill_invalid_ext:
 				extent_length -= PAGE_CACHE_SIZE >> 9;
 				continue;
 			}
-			if (!PageUptodate(page) && cow_read) {
+			if (!PageUptodate(page)) {
 				/* New page, readin or zero it */
 				init_page_for_write(page, cow_read);
 			}
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux