[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230329154950.19720-13-jack@suse.cz>
Date: Wed, 29 Mar 2023 17:49:44 +0200
From: Jan Kara <jack@...e.cz>
To: Ted Tso <tytso@....edu>
Cc: <linux-ext4@...r.kernel.org>, Jan Kara <jack@...e.cz>
Subject: [PATCH 13/13] Revert "ext4: Fix warnings when freezing filesystem with journaled data"
After making ext4_writepages() properly clean all pages there is no need
for special treatment of filesystem freezing. Revert commit
e6c28a26b799c7640b77daff3e4a67808c74381c.
Signed-off-by: Jan Kara <jack@...e.cz>
---
fs/ext4/inode.c | 15 +--------------
fs/ext4/super.c | 11 -----------
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 25a9e7586c50..5161221193f9 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2379,7 +2379,6 @@ static int mpage_journal_page_buffers(handle_t *handle,
static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
{
struct address_space *mapping = mpd->inode->i_mapping;
- struct super_block *sb = mpd->inode->i_sb;
struct folio_batch fbatch;
unsigned int nr_folios;
pgoff_t index = mpd->first_page;
@@ -2399,15 +2398,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
mpd->map.m_len = 0;
mpd->next_page = index;
- /*
- * Start a transaction for writeback of journalled data. We don't start
- * the transaction if the filesystem is frozen. In that case we
- * should not have any dirty data to write anymore but possibly there
- * are stray page dirty bits left by the checkpointing code so this
- * loop clears them.
- */
- if (ext4_should_journal_data(mpd->inode) &&
- sb->s_writers.frozen < SB_FREEZE_FS) {
+ if (ext4_should_journal_data(mpd->inode)) {
handle = ext4_journal_start(mpd->inode, EXT4_HT_WRITE_PAGE,
bpp);
if (IS_ERR(handle))
@@ -2496,15 +2487,11 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
* through a pin.
*/
if (!mpd->can_map) {
- WARN_ON_ONCE(sb->s_writers.frozen ==
- SB_FREEZE_COMPLETE);
err = mpage_submit_page(mpd, &folio->page);
if (err < 0)
goto out;
/* Pending dirtying of journalled data? */
if (PageChecked(&folio->page)) {
- WARN_ON_ONCE(sb->s_writers.frozen >=
- SB_FREEZE_FS);
err = mpage_journal_page_buffers(handle,
mpd, &folio->page);
if (err < 0)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b9f8dd0d6e46..b5b4734fc1b7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -6293,17 +6293,6 @@ static int ext4_freeze(struct super_block *sb)
if (error < 0)
goto out;
- /*
- * Do another sync. We really should not have any dirty data
- * anymore but our checkpointing code does not clear page dirty
- * bits due to locking constraints so writeback still can get
- * started for inodes with journalled data which triggers
- * annoying warnings.
- */
- error = sync_filesystem(sb);
- if (error < 0)
- goto out;
-
/* Journal blocked and flushed, clear needs_recovery flag. */
ext4_clear_feature_journal_needs_recovery(sb);
if (ext4_orphan_file_empty(sb))
--
2.35.3
Powered by blists - more mailing lists