Re: [PATCH 00/31] btrfs: simplify use of struct btrfs_root pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/24/16 6:14 PM, jeffm@xxxxxxxx wrote:
> From: Jeff Mahoney <jeffm@xxxxxxxx>
> 
> One of the common complaints I've heard from new and experienced
> developers alike about the btrfs code is the ubiquity of
> struct btrfs_root.  There is one for every tree on disk and it's not
> always obvious which root is needed in a particular call path.  It can
> be frustrating to spend time figuring out which root is required only
> to discover that it's not actually used for anything other than
> getting the fs-global struct btrfs_fs_info.
> 
> The patchset contains several sections.
> 
> 1) The fsid trace event patchset I posted earlier; I can rebase without this
>    but I'd prefer not to.
> 
> 2) Converting btrfs_test_opt and friends to use an fs_info.
> 
> 3) Converting tests to use an fs_info pointer whenever a root is used.
> 
> 4) Moving sectorsize and nodesize to fs_info and cleaning up the
>    macros used to access them.

This change was a little overzealous in free-space-cache.c, which hit
block_group->sectorsize as well as root->sectorsize by accident.  While
the change is fine for general btrfs usage, it breaks the sanity tests
since dummy block groups now depend on a dummy fs_info as well.

-Jeff

-- 
Jeff Mahoney
SUSE Labs

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux