All of lore.kernel.org
 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 0/5] btrfs-progs: enhance --subvol/--inode-flags options
Date: Mon, 18 Aug 2025 17:01:33 +0200	[thread overview]
Message-ID: <20250818150133.GK22430@twin.jikos.cz> (raw)
In-Reply-To: <cover.1755474438.git.wqu@suse.com>

On Mon, Aug 18, 2025 at 10:01:42AM +0930, Qu Wenruo wrote:
> Currently both --subvol and --inode-flags save the full path into their
> structures, and check each inode against those full path.
> 
> For long paths it can be time consuming, and this introduces extra
> memory for each structure.
> 
> This series enhance the handling of those options by:
> 
> - Extract the validation part into a dedicated helper inside
>   rootdir.[ch]
> 
> - Use st_dev/st_ino to replace full_path
>   This reduces runtime and memory usage for the involved structures.
> 
> - Remove the memory usage warning note
>   Even with the old 8K per structure memory usage, 1024 options will
>   only 8M memory, that's accetable even for a lot of micro-controllers,
>   not to mention modern desktop/servers.
> 
>   I'm a little paranoid at that time, with the memory usage almost
>   halved, we can safely remove that warning note.
> 
> Qu Wenruo (5):
>   btrfs-progs: mkfs/rootdir: extract subvol validation code into a
>     helper
>   btrfs-progs: mkfs/rootdir: extract inode flags validation code into a
>     helper
>   btrfs-progs: mkfs/rootdir: enhance subvols detection
>   btrfs-progs: mkfs/rootdir: enhance inode flags detection
>   btrfs-progs: doc/mkfs: remove the note about memory usage

Looks good thanks, please add it do devel.

      parent reply	other threads:[~2025-08-18 15:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18  0:31 [PATCH 0/5] btrfs-progs: enhance --subvol/--inode-flags options Qu Wenruo
2025-08-18  0:31 ` [PATCH 1/5] btrfs-progs: mkfs/rootdir: extract subvol validation code into a helper Qu Wenruo
2025-08-18  0:31 ` [PATCH 2/5] btrfs-progs: mkfs/rootdir: extract inode flags " Qu Wenruo
2025-08-18  0:31 ` [PATCH 3/5] btrfs-progs: mkfs/rootdir: enhance subvols detection Qu Wenruo
2025-08-18  0:31 ` [PATCH 4/5] btrfs-progs: mkfs/rootdir: enhance inode flags detection Qu Wenruo
2025-08-18  0:31 ` [PATCH 5/5] btrfs-progs: doc/mkfs: remove the note about memory usage Qu Wenruo
2025-08-18 15:01 ` 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=20250818150133.GK22430@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 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.