All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Leah Rumancik <leah.rumancik@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH v5 1/3] ext4: add discard/zeroout flags to journal flush
Date: Tue, 22 Jun 2021 21:36:39 -0400	[thread overview]
Message-ID: <YNKQJ/dwQlvQiMKp@mit.edu> (raw)
In-Reply-To: <20210518151327.130198-1-leah.rumancik@gmail.com>

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@gmail.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;
 
 	/*

      parent reply	other threads:[~2021-06-23  1:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 15:13 [PATCH v5 1/3] ext4: add discard/zeroout flags to journal flush Leah Rumancik
2021-05-18 15:13 ` [PATCH v5 2/3] ext4: add ioctl EXT4_IOC_CHECKPOINT Leah Rumancik
2021-06-23  1:38   ` Theodore Ts'o
2021-05-18 15:13 ` [PATCH v5 3/3] ext4: update journal documentation Leah Rumancik
2021-06-03 18:00 ` [PATCH v5 1/3] ext4: add discard/zeroout flags to journal flush Theodore Ts'o
2021-06-23  1:36 ` Theodore Ts'o [this message]

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=YNKQJ/dwQlvQiMKp@mit.edu \
    --to=tytso@mit.edu \
    --cc=leah.rumancik@gmail.com \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.