mbox series

[0/7,v2] metadata_uuid misc cleanup and fixes part2

Message ID cover.1690792823.git.anand.jain@oracle.com (mailing list archive)
Headers show
Series metadata_uuid misc cleanup and fixes part2 | expand

Message

Anand Jain July 31, 2023, 11:16 a.m. UTC
v2:
The new patch 1/7 peels btrfs_sb_fsid_prt() helper function from 1/4 in v1,
This function is used in patch 2/7 and patch 4/7 in v2.

Patch 6/7, adds btrfs_sb_metadata_uuid_or_null() another helper func, used
in 7/7 in volumes.c. Further, used in the upcoming fsid_changing patch.
Pushing this set now which are ready. This has passed fstests -g quick.

----- original -----
These patches are cleanups related to metadata_uuid. Please ref to the
patch for details.

Anand Jain (7):
  btrfs: add a helper to read the superblock metadata_uuid
  btrfs: simplify memcpy either of metadata_uuid or fsid
  btrfs: fix fsid in btrfs_validate_super
  btrfs: fix metadata_uuid in btrfs_validate_super
  btrfs: drop redundant check to use fs_devices::metadata_uuid
  btrfs: add a superblock helper to read metadata_uuid or NULL
  btrfs: use btrfs_sb_metadata_uuid_or_null

 fs/btrfs/disk-io.c | 28 ++++++++++------------------
 fs/btrfs/volumes.c | 29 +++++++++++++++++++----------
 fs/btrfs/volumes.h |  1 +
 3 files changed, 30 insertions(+), 28 deletions(-)

Comments

Guilherme G. Piccoli Aug. 3, 2023, 1:32 p.m. UTC | #1
Thanks for the patches Anand! Feel free to add (to the whole series):

Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com>


I'm working a feature for btrfs that relies on metadata_uuid
infrastructure, so I did rebase on top of your patches and tested, it
works fine.

Cheers,


Guilherme
David Sterba Aug. 11, 2023, 3:45 p.m. UTC | #2
On Mon, Jul 31, 2023 at 07:16:31PM +0800, Anand Jain wrote:
> v2:
> The new patch 1/7 peels btrfs_sb_fsid_prt() helper function from 1/4 in v1,
> This function is used in patch 2/7 and patch 4/7 in v2.
> 
> Patch 6/7, adds btrfs_sb_metadata_uuid_or_null() another helper func, used
> in 7/7 in volumes.c. Further, used in the upcoming fsid_changing patch.
> Pushing this set now which are ready. This has passed fstests -g quick.
> 
> ----- original -----
> These patches are cleanups related to metadata_uuid. Please ref to the
> patch for details.
> 
> Anand Jain (7):
>   btrfs: add a helper to read the superblock metadata_uuid
>   btrfs: simplify memcpy either of metadata_uuid or fsid
>   btrfs: fix fsid in btrfs_validate_super
>   btrfs: fix metadata_uuid in btrfs_validate_super
>   btrfs: drop redundant check to use fs_devices::metadata_uuid

The above added to misc-next, thanks.

>   btrfs: add a superblock helper to read metadata_uuid or NULL
>   btrfs: use btrfs_sb_metadata_uuid_or_null

I think this can simplify the alloc_fs_devices a bit more as commented,
please resend. Thanks.