[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNKQJ/dwQlvQiMKp@mit.edu>
Date: Tue, 22 Jun 2021 21:36:39 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Leah Rumancik <leah.rumancik@...il.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH v5 1/3] ext4: add discard/zeroout flags to journal flush
On Tue, May 18, 2021 at 03:13:25PM +0000, Leah Rumancik wrote:
> Add a flags argument to jbd2_journal_flush to enable discarding or
> zero-filling the journal blocks while flushing the journal.
>
> Signed-off-by: Leah Rumancik <leah.rumancik@...il.com>
>
> Changes in v4:
> - restructured code division between patches
> - changed jbd2_journal_flush flags arg from bool to unsigned long long
>
> Changes in v5:
> - changed jbd2_journal_flush flags to unsigned int
> - changed name of jbd2_journal_flush flags from JBD2_ERASE* to
> JBD2_JOURNAL_FLUSH*
> - cleaned up loop in jbd2_journal_erase which finds contiguous regions
> - updated flag checking
> ---
I noticed a minor issue in this commit, and so I've made the following
change to this commit in the ext4 tree.
- Ted
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 521ce41c242c..3a2ed60ea8b7 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1715,7 +1715,7 @@ static int __jbd2_journal_erase(journal_t *journal, unsigned int flags)
if (!q)
return -ENXIO;
- if (JBD2_JOURNAL_FLUSH_DISCARD & !blk_queue_discard(q))
+ if ((flags & JBD2_JOURNAL_FLUSH_DISCARD) && !blk_queue_discard(q))
return -EOPNOTSUPP;
/*
Powered by blists - more mailing lists