linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: check return value of write_checkpoint during fstrim
@ 2016-08-21 15:21 Chao Yu
  2016-08-21 15:21 ` [PATCH 2/3] f2fs: schedule in between two continous batch discards Chao Yu
  2016-08-21 15:21 ` [PATCH 3/3] f2fs: remove redundant judgement condition in available_free_memory Chao Yu
  0 siblings, 2 replies; 8+ messages in thread
From: Chao Yu @ 2016-08-21 15:21 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu

From: Chao Yu <yuchao0@huawei.com>

During fstrim, if one of multiple write_checkpoint failed, break off and
return error number to caller.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/segment.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a394012..020767c 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1303,6 +1303,8 @@ int f2fs_trim_fs(struct f2fs_sb_info *sbi, struct fstrim_range *range)
 		mutex_lock(&sbi->gc_mutex);
 		err = write_checkpoint(sbi, &cpc);
 		mutex_unlock(&sbi->gc_mutex);
+		if (err)
+			break;
 	}
 out:
 	range->len = F2FS_BLK_TO_BYTES(cpc.trimmed);
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-26  3:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21 15:21 [PATCH 1/3] f2fs: check return value of write_checkpoint during fstrim Chao Yu
2016-08-21 15:21 ` [PATCH 2/3] f2fs: schedule in between two continous batch discards Chao Yu
2016-08-23 16:53   ` Jaegeuk Kim
2016-08-25  9:22     ` Chao Yu
2016-08-25 16:57       ` Jaegeuk Kim
2016-08-26  0:50         ` Chao Yu
2016-08-26  2:50           ` Jaegeuk Kim
2016-08-21 15:21 ` [PATCH 3/3] f2fs: remove redundant judgement condition in available_free_memory Chao Yu

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).