linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] f2fs: flush journal nat entries for nat_bits during unmount
@ 2018-07-06 21:09 Jaegeuk Kim
  2018-07-06 21:09 ` [PATCH 2/4] f2fs: allow wrong configure dio to buffered write Jaegeuk Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Jaegeuk Kim @ 2018-07-06 21:09 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

Let's flush journal nat entries for speed up in the next run.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/node.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 29237aeca041..0f076fb0d828 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2613,6 +2613,13 @@ void f2fs_flush_nat_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
 	nid_t set_idx = 0;
 	LIST_HEAD(sets);
 
+	/* during unmount, let's flush nat_bits before checking dirty_nat_cnt */
+	if (enabled_nat_bits(sbi, cpc)) {
+		down_write(&nm_i->nat_tree_lock);
+		remove_nats_in_journal(sbi);
+		up_write(&nm_i->nat_tree_lock);
+	}
+
 	if (!nm_i->dirty_nat_cnt)
 		return;
 
-- 
2.17.0.441.gb46fe60e1d-goog


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

end of thread, other threads:[~2018-07-13 11:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 21:09 [PATCH 1/4] f2fs: flush journal nat entries for nat_bits during unmount Jaegeuk Kim
2018-07-06 21:09 ` [PATCH 2/4] f2fs: allow wrong configure dio to buffered write Jaegeuk Kim
2018-07-09 14:33   ` [f2fs-dev] " Chao Yu
2018-07-09 20:41     ` Jaegeuk Kim
2018-07-10  5:54       ` Chao Yu
2018-07-12 17:59     ` [f2fs-dev v2] " Jaegeuk Kim
2018-07-13 11:29       ` Chao Yu
2018-07-06 21:09 ` [PATCH 3/4] f2fs: indicate shutdown f2fs to allow unmount successfully Jaegeuk Kim
2018-07-09 14:42   ` [f2fs-dev] " Chao Yu
2018-07-06 21:09 ` [PATCH 4/4] f2fs: should check the type of end_io after pullback by fscrypto Jaegeuk Kim
2018-07-09 14:54   ` [f2fs-dev] " Chao Yu
2018-07-09 20:37     ` Jaegeuk Kim
2018-07-10 20:43     ` Jaegeuk Kim
2018-07-10 20:53       ` Jaegeuk Kim
2018-07-09 14:23 ` [f2fs-dev] [PATCH 1/4] f2fs: flush journal nat entries for nat_bits during unmount Chao Yu
2018-07-09 20:43   ` Jaegeuk Kim
2018-07-10  6:01     ` 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).