linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 6/7] f2fs: flush quota blocks after turnning it off
Date: Tue, 29 Jan 2019 07:47:16 +0800	[thread overview]
Message-ID: <20190128234717.77225-6-jaegeuk@kernel.org> (raw)
In-Reply-To: <20190128234717.77225-1-jaegeuk@kernel.org>

After quota_off, we'll get some dirty blocks. If put_super don't have a chance
to flush them by checkpoint, it causes NULL pointer exception in end_io after
iput(node_inode). (e.g., by checkpoint=disable)

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

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 5e1f8573a17f..7694cb350734 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2026,6 +2026,12 @@ void f2fs_quota_off_umount(struct super_block *sb)
 			set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
 		}
 	}
+	/*
+	 * In case of checkpoint=disable, we must flush quota blocks.
+	 * This can cause NULL exception for node_inode in end_io, since
+	 * put_super already dropped it.
+	 */
+	sync_filesystem(sb);
 }
 
 static void f2fs_truncate_quota_inode_pages(struct super_block *sb)
-- 
2.19.0.605.g01d371f741-goog

  parent reply	other threads:[~2019-01-28 23:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 23:47 [PATCH 1/7] f2fs: run discard jobs when put_super Jaegeuk Kim
2019-01-28 23:47 ` [PATCH 2/7] f2fs: add quick mode of checkpoint=disable for QA Jaegeuk Kim
2019-02-01 15:48   ` [f2fs-dev] " Chao Yu
2019-02-04 16:55     ` Jaegeuk Kim
2019-02-13  3:26       ` Chao Yu
2019-01-28 23:47 ` [PATCH 3/7] f2fs: try to keep CP_TRIMMED_FLAG after successful umount Jaegeuk Kim
2019-02-01 15:58   ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` [PATCH 4/7] f2fs: don't wake up too frequently, if there is lots of IOs Jaegeuk Kim
2019-02-01 15:58   ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` [PATCH 5/7] f2fs: avoid null pointer exception in dcc_info Jaegeuk Kim
2019-02-01 16:00   ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` Jaegeuk Kim [this message]
2019-02-01 16:08   ` [f2fs-dev] [PATCH 6/7] f2fs: flush quota blocks after turnning it off Chao Yu
2019-02-04 16:59     ` Jaegeuk Kim
2019-02-13  3:27       ` Chao Yu
2019-01-28 23:47 ` [PATCH 7/7] f2fs: sync filesystem after roll-forward recovery Jaegeuk Kim
2019-02-01 14:12 ` [f2fs-dev] [PATCH 1/7] f2fs: run discard jobs when put_super 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=20190128234717.77225-6-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --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).