public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 5/9] btrfs: open code set_extent_bits_nowait
Date: Thu, 25 May 2023 02:02:33 -0700	[thread overview]
Message-ID: <ZG8kKU16PA8SF3Pg@infradead.org> (raw)
In-Reply-To: <a497320d91b1e08e0766f44844746e235478630e.1684967923.git.dsterba@suse.com>

The change itself looks ok to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

.. but:

> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index bda301a55cbe..b82a350c4c59 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -1611,8 +1611,8 @@ void btrfs_redirty_list_add(struct btrfs_transaction *trans,
>  	memzero_extent_buffer(eb, 0, eb->len);
>  	set_bit(EXTENT_BUFFER_NO_CHECK, &eb->bflags);
>  	set_extent_buffer_dirty(eb);
> -	set_extent_bits_nowait(&trans->dirty_pages, eb->start,
> -			       eb->start + eb->len - 1, EXTENT_DIRTY);
> +	set_extent_bit(&trans->dirty_pages, eb->start, eb->start + eb->len - 1,
> +			EXTENT_DIRTY, NULL, GFP_NOWAIT);

.. there is no point in even using GFP_NOWAIT here, as we are always
called in a context that can sleep, set_extent_buffer_dirty relies on
that as well as it calls lock_page.

  reply	other threads:[~2023-05-25  9:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 23:04 [PATCH 0/9] Parameter cleanups in extent state helpers David Sterba
2023-05-24 23:04 ` [PATCH 1/9] btrfs: open code set_extent_defrag David Sterba
2023-05-25  8:58   ` Christoph Hellwig
2023-05-25 10:31   ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 2/9] btrfs: open code set_extent_delalloc David Sterba
2023-05-25  8:59   ` Christoph Hellwig
2023-05-25 10:31   ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 3/9] btrfs: open code set_extent_new David Sterba
2023-05-25  8:59   ` Christoph Hellwig
2023-05-25 10:32   ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 4/9] btrfs: open code set_extent_dirty David Sterba
2023-05-25  9:00   ` Christoph Hellwig
2023-05-25 10:33   ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 5/9] btrfs: open code set_extent_bits_nowait David Sterba
2023-05-25  9:02   ` Christoph Hellwig [this message]
2023-05-25 22:45     ` David Sterba
2023-05-25 10:33   ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 6/9] btrfs: open code set_extent_bits David Sterba
2023-05-25  9:03   ` Christoph Hellwig
2023-05-25 10:34   ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 7/9] btrfs: drop NOFAIL from set_extent_bit allocation masks David Sterba
2023-05-25  9:06   ` Christoph Hellwig
2023-05-25 23:25     ` David Sterba
2023-05-25 10:38   ` Qu Wenruo
2023-05-25 23:00     ` David Sterba
2023-05-25 23:26       ` Qu Wenruo
2023-05-24 23:04 ` [PATCH 8/9] btrfs: pass NOWAIT for set/clear extent bits as another bit David Sterba
2023-05-24 23:04 ` [PATCH 9/9] btrfs: drop gfp from parameter extent state helpers David Sterba
2023-05-25 10:25 ` [PATCH 0/9] Parameter cleanups in " Qu Wenruo

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=ZG8kKU16PA8SF3Pg@infradead.org \
    --to=hch@infradead.org \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@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