linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/3 v2] f2fs: check the page status filled from disk
Date: Tue, 5 Jan 2016 20:10:46 -0800	[thread overview]
Message-ID: <20160106040727.GA8472@jaegeuk.gateway> (raw)
In-Reply-To: <1451784366-14261-1-git-send-email-jaegeuk@kernel.org>

Change log from v1:
 - use get_lock_data_page and return error, suggested by Chao

>From 4882f227e71b482c53e55a5c3ad559d33f620a20 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Fri, 1 Jan 2016 22:03:47 -0800
Subject: [PATCH] f2fs: check the page status filled from disk

After reading a page, we need to check whether there is any error.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/data.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 89a978c..0bfa02a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -442,12 +442,11 @@ repeat:
 	} else {
 		f2fs_put_page(page, 1);
 
-		page = get_read_data_page(inode, index, READ_SYNC, true);
+		/* if ipage exists, blkaddr should be NEW_ADDR */
+		f2fs_bug_on(F2FS_I_SB(inode), ipage);
+		page = get_lock_data_page(inode, index, true);
 		if (IS_ERR(page))
-			goto repeat;
-
-		/* wait for read completion */
-		lock_page(page);
+			return page;
 	}
 got_it:
 	if (new_i_size && i_size_read(inode) <
-- 
2.6.3


  parent reply	other threads:[~2016-01-06  4:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03  1:26 [PATCH 1/3] f2fs: check the page status filled from disk Jaegeuk Kim
2016-01-03  1:26 ` [PATCH 2/3] f2fs: cover more area with nat_tree_lock Jaegeuk Kim
2016-01-05  9:33   ` [f2fs-dev] " Chao Yu
2016-01-05 17:57     ` Jaegeuk Kim
2016-01-06  3:57       ` Chao Yu
2016-01-03  1:26 ` [PATCH 3/3] Revert "f2fs: check the node block address of newly allocated nid" Jaegeuk Kim
2016-01-05  9:31 ` [f2fs-dev] [PATCH 1/3] f2fs: check the page status filled from disk Chao Yu
2016-01-05 17:48   ` Jaegeuk Kim
2016-01-06  1:21     ` Chao Yu
2016-01-06  2:30       ` Jaegeuk Kim
2016-01-06  4:10 ` Jaegeuk Kim [this message]
2016-01-06  5:20   ` [f2fs-dev] [PATCH 1/3 v2] " Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160106040727.GA8472@jaegeuk.gateway \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).