On Fri, May 29, 2020 at 02:25:32PM +0000, Johannes Thumshirn wrote:
> On 27/05/2020 10:12, Johannes Thumshirn wrote:
> > While trying to learn the Block Group code I've found some cleanup
> > possibilities for find_first_block_group().
> >
> > Here's a proposal to make $ffbg a bit more easier to read by untangling the
> > gotos and if statements.
> >
> > The patch set is based on misc-next from May 26 morning with
> > HEAD 3f4a266717ed ("btrfs: split btrfs_direct_IO to read and write part")
> > and xfstests showed no regressions to the base misc-next in my test setup.
> >
> > Changes to v1:
> > - Pass btrfs_path instead of leaf & slot to read_bg_from_eb (Nikolay)
> > - Don't comment about the size change (Nikolay)
> > - Add Nikolay's Reviewed-by's
> >
> > Johannes Thumshirn (3):
> > btrfs: remove pointless out label in find_first_block_group
> > btrfs: get mapping tree directly from fsinfo in find_first_block_group
> > btrfs: factor out reading of bg from find_frist_block_group
> >
> > fs/btrfs/block-group.c | 108 ++++++++++++++++++++++-------------------
> > 1 file changed, 58 insertions(+), 50 deletions(-)
>
> David, any comment if you will consider this series? Patch 2/3 actually makes
> the function more complainant to the kernel's coding style.
2/3 and 3/3 are good cleanups, please resend, thanks.