Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 0/8] btrfs: separate/simplify/unify subpage handling
Date: Fri, 7 Feb 2025 20:30:41 +0100	[thread overview]
Message-ID: <20250207193041.GN5777@twin.jikos.cz> (raw)
In-Reply-To: <cover.1738902149.git.wqu@suse.com>

On Fri, Feb 07, 2025 at 02:55:59PM +1030, Qu Wenruo wrote:
> [CHANGELOG]
> v2:
> - Fix a crash in 4K page sized system caused by
>   btrfs_clear_buffer_dirty()
>   It looks like using btrfs_meta_folio_set_writeback() and
>   btrfs_meta_folio_clear_writeback() is screwing up the btree inode map.
>   
>   Fix it by reverting to the old manually clearing of
>   PAGECACHE_DIRTY_TAG.
> 
> [METADATA SUBPAGE CHECKS]
> Currently we only have one btrfs_is_subpage() check, utilized by data
> and metadata.
> 
> But the truth is, btrfs_is_subpage() can return incorrect result if the
> target folio belongs to a dummy extent buffer.
> 
> This means we have quite some metadata call sites doing their own
> metadata specific subpage check.
> 
> [SUBPAGE SPECIFIC HANDLINGS]
> There are several functions that split the metadata subpage handling
> into a dedicated path.
> 
> But the truth is, a lot of such paths only have minor differences
> compared to the regular routine.
> 
> [THIS SERIES]
> This series address the above problems and prepare for the incoming data
> larger folio support by:
> 
> - Remove btrfs_fs_info::sectors_per_page
>   This is mostly a preparation for the future data larger folio support.
> 
> - Introduce a dedicated metadata specific subpage check
> 
> - Unify/simplify metadata subpage handling
>   So that we have a single unified path for metadata
> 
> Qu Wenruo (8):
>   btrfs: remove btrfs_fs_info::sectors_per_page
>   btrfs: extract metadata subpage detection into a dedicated helper
>   btrfs: make subpage attach and detach to handle metadata properly
>   btrfs: use metadata specific helpers to simplify extent buffer helpers
>   btrfs: simplify btrfs_clear_buffer_dirty()
>   btrfs: simplify write_one_eb()
>   btrfs: simplify read_extent_buffer_pages_nowait()
>   btrfs: require strict data/metadata split for subpage check

All look good to me.

Reviewed-by: David Sterba <dsterba@suse.com>

Please update the subjects in the simplify patches in what regard they
simplify the functions. For example "sipmlify subpage handling in ...".
Thanks.

      parent reply	other threads:[~2025-02-07 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07  4:25 [PATCH v2 0/8] btrfs: separate/simplify/unify subpage handling Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 1/8] btrfs: remove btrfs_fs_info::sectors_per_page Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 2/8] btrfs: extract metadata subpage detection into a dedicated helper Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 3/8] btrfs: make subpage attach and detach to handle metadata properly Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 4/8] btrfs: use metadata specific helpers to simplify extent buffer helpers Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 5/8] btrfs: simplify btrfs_clear_buffer_dirty() Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 6/8] btrfs: simplify write_one_eb() Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 7/8] btrfs: simplify read_extent_buffer_pages_nowait() Qu Wenruo
2025-02-07  4:26 ` [PATCH v2 8/8] btrfs: require strict data/metadata split for subpage check Qu Wenruo
2025-02-07 19:30 ` David Sterba [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=20250207193041.GN5777@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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