mbox series

[0/4] Parameter cleanup

Message ID cover.1666103172.git.dsterba@suse.com (mailing list archive)
Headers show
Series Parameter cleanup | expand

Message

David Sterba Oct. 18, 2022, 2:27 p.m. UTC
A few more cases where value passed by parameter can be used directly.

David Sterba (4):
  btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
  btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
  btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
  btrfs: sink gfp_t parameter to alloc_scrub_sector

 fs/btrfs/backref.c    |  5 ++---
 fs/btrfs/backref.h    |  3 +--
 fs/btrfs/qgroup.c     | 17 +++++++----------
 fs/btrfs/qgroup.h     |  2 +-
 fs/btrfs/relocation.c |  2 +-
 fs/btrfs/scrub.c      | 14 +++++++-------
 fs/btrfs/tree-log.c   |  3 +--
 7 files changed, 20 insertions(+), 26 deletions(-)

Comments

Johannes Thumshirn Oct. 19, 2022, 10:28 a.m. UTC | #1
On 18.10.22 16:27, David Sterba wrote:
> A few more cases where value passed by parameter can be used directly.
> 
> David Sterba (4):
>   btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
>   btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
>   btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
>   btrfs: sink gfp_t parameter to alloc_scrub_sector
> 
>  fs/btrfs/backref.c    |  5 ++---
>  fs/btrfs/backref.h    |  3 +--
>  fs/btrfs/qgroup.c     | 17 +++++++----------
>  fs/btrfs/qgroup.h     |  2 +-
>  fs/btrfs/relocation.c |  2 +-
>  fs/btrfs/scrub.c      | 14 +++++++-------
>  fs/btrfs/tree-log.c   |  3 +--
>  7 files changed, 20 insertions(+), 26 deletions(-)
> 

What base is this on?

I got the following when applying it for review:

[johannes@redsun91:linux (review)]$ b4 am -o - cover.1666103172.git.dsterba@suse.com | git am
Looking up https://lore.kernel.org/r/cover.1666103172.git.dsterba%40suse.com
Grabbing thread from lore.kernel.org/all/cover.1666103172.git.dsterba%40suse.com/t.mbox.gz
Analyzing 5 messages in the thread
Checking attestation on all messages, may take a moment...
---
  ✓ [PATCH 1/4] btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
  ✓ [PATCH 2/4] btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
  ✓ [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
  ✓ [PATCH 4/4] btrfs: sink gfp_t parameter to alloc_scrub_sector
  ---
  ✓ Signed: DKIM/suse.com
---
Total patches: 4
---
 Link: https://lore.kernel.org/r/cover.1666103172.git.dsterba@suse.com
 Base: not specified
Applying: btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc

Error in reading or end of file.

Error in reading or end of file.

Error in reading or end of file.

Error in reading or end of file.

Error in reading or end of file.

Error in reading or end of file.
fs/btrfs/relocation.c: In function ‘build_backref_tree’:
fs/btrfs/relocation.c:474:16: error: too many arguments to function ‘btrfs_backref_iter_alloc’
  474 |         iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info, GFP_NOFS);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/btrfs/relocation.c:25:
fs/btrfs/backref.h:158:28: note: declared here
  158 | struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:250: fs/btrfs/relocation.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:500: fs/btrfs] Error 2
make[1]: *** [scripts/Makefile.build:500: fs] Error 2
David Sterba Oct. 19, 2022, 3:16 p.m. UTC | #2
On Wed, Oct 19, 2022 at 10:28:53AM +0000, Johannes Thumshirn wrote:
> On 18.10.22 16:27, David Sterba wrote:
> > A few more cases where value passed by parameter can be used directly.
> > 
> > David Sterba (4):
> >   btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
> >   btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
> >   btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
> >   btrfs: sink gfp_t parameter to alloc_scrub_sector
> > 
> >  fs/btrfs/backref.c    |  5 ++---
> >  fs/btrfs/backref.h    |  3 +--
> >  fs/btrfs/qgroup.c     | 17 +++++++----------
> >  fs/btrfs/qgroup.h     |  2 +-
> >  fs/btrfs/relocation.c |  2 +-
> >  fs/btrfs/scrub.c      | 14 +++++++-------
> >  fs/btrfs/tree-log.c   |  3 +--
> >  7 files changed, 20 insertions(+), 26 deletions(-)
> > 
> 
> What base is this on?
> 
> I got the following when applying it for review:
> 
> [johannes@redsun91:linux (review)]$ b4 am -o - cover.1666103172.git.dsterba@suse.com | git am
> Looking up https://lore.kernel.org/r/cover.1666103172.git.dsterba%40suse.com
> Grabbing thread from lore.kernel.org/all/cover.1666103172.git.dsterba%40suse.com/t.mbox.gz
> Analyzing 5 messages in the thread
> Checking attestation on all messages, may take a moment...
> ---
>   ✓ [PATCH 1/4] btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
>   ✓ [PATCH 2/4] btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
>   ✓ [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
>   ✓ [PATCH 4/4] btrfs: sink gfp_t parameter to alloc_scrub_sector
>   ---
>   ✓ Signed: DKIM/suse.com
> ---
> Total patches: 4
> ---
>  Link: https://lore.kernel.org/r/cover.1666103172.git.dsterba@suse.com
>  Base: not specified
> Applying: btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
> 
> Error in reading or end of file.
> fs/btrfs/relocation.c: In function ‘build_backref_tree’:
> fs/btrfs/relocation.c:474:16: error: too many arguments to function ‘btrfs_backref_iter_alloc’
>   474 |         iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info, GFP_NOFS);
>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from fs/btrfs/relocation.c:25:
> fs/btrfs/backref.h:158:28: note: declared here
>   158 | struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info);
>       |                            ^~~~~~~~~~~~~~~~~~~~~~~~

I have it in a branch on top of some misc-next snapshot, the date is
from 3 days ago and rebase to current misc-next is clean and builds.
Johannes Thumshirn Oct. 19, 2022, 3:23 p.m. UTC | #3
On 19.10.22 17:16, David Sterba wrote:
> On Wed, Oct 19, 2022 at 10:28:53AM +0000, Johannes Thumshirn wrote:
>> On 18.10.22 16:27, David Sterba wrote:
>>> A few more cases where value passed by parameter can be used directly.
>>>
>>> David Sterba (4):
>>>   btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
>>>   btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
>>>   btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
>>>   btrfs: sink gfp_t parameter to alloc_scrub_sector
>>>
>>>  fs/btrfs/backref.c    |  5 ++---
>>>  fs/btrfs/backref.h    |  3 +--
>>>  fs/btrfs/qgroup.c     | 17 +++++++----------
>>>  fs/btrfs/qgroup.h     |  2 +-
>>>  fs/btrfs/relocation.c |  2 +-
>>>  fs/btrfs/scrub.c      | 14 +++++++-------
>>>  fs/btrfs/tree-log.c   |  3 +--
>>>  7 files changed, 20 insertions(+), 26 deletions(-)
>>>
>>
>> What base is this on?
>>
>> I got the following when applying it for review:
>>
>> [johannes@redsun91:linux (review)]$ b4 am -o - cover.1666103172.git.dsterba@suse.com | git am
>> Looking up https://lore.kernel.org/r/cover.1666103172.git.dsterba%40suse.com
>> Grabbing thread from lore.kernel.org/all/cover.1666103172.git.dsterba%40suse.com/t.mbox.gz
>> Analyzing 5 messages in the thread
>> Checking attestation on all messages, may take a moment...
>> ---
>>   ✓ [PATCH 1/4] btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
>>   ✓ [PATCH 2/4] btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
>>   ✓ [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
>>   ✓ [PATCH 4/4] btrfs: sink gfp_t parameter to alloc_scrub_sector
>>   ---
>>   ✓ Signed: DKIM/suse.com
>> ---
>> Total patches: 4
>> ---
>>  Link: https://lore.kernel.org/r/cover.1666103172.git.dsterba@suse.com
>>  Base: not specified
>> Applying: btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
>>
>> Error in reading or end of file.
>> fs/btrfs/relocation.c: In function ‘build_backref_tree’:
>> fs/btrfs/relocation.c:474:16: error: too many arguments to function ‘btrfs_backref_iter_alloc’
>>   474 |         iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info, GFP_NOFS);
>>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/relocation.c:25:
>> fs/btrfs/backref.h:158:28: note: declared here
>>   158 | struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info);
>>       |                            ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> I have it in a branch on top of some misc-next snapshot, the date is
> from 3 days ago and rebase to current misc-next is clean and builds.
> 

My topmost commit is 8ffce84c9455 ("btrfs: send: fix send failure of a subcase of orphan inodes")
and I still experience build failures.
David Sterba Oct. 19, 2022, 4:05 p.m. UTC | #4
On Wed, Oct 19, 2022 at 03:23:23PM +0000, Johannes Thumshirn wrote:
> On 19.10.22 17:16, David Sterba wrote:
> > On Wed, Oct 19, 2022 at 10:28:53AM +0000, Johannes Thumshirn wrote:
> >> On 18.10.22 16:27, David Sterba wrote:
> >>> A few more cases where value passed by parameter can be used directly.
> >>   ✓ [PATCH 2/4] btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent
> >>   ✓ [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
> >>   ✓ [PATCH 4/4] btrfs: sink gfp_t parameter to alloc_scrub_sector
> >>   ---
> >>   ✓ Signed: DKIM/suse.com
> >> ---
> >> Total patches: 4
> >> ---
> >>  Link: https://lore.kernel.org/r/cover.1666103172.git.dsterba@suse.com
> >>  Base: not specified
> >> Applying: btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc
> >>
> >> Error in reading or end of file.
> >> fs/btrfs/relocation.c: In function ‘build_backref_tree’:
> >> fs/btrfs/relocation.c:474:16: error: too many arguments to function ‘btrfs_backref_iter_alloc’
> >>   474 |         iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info, GFP_NOFS);
> >>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
> >> In file included from fs/btrfs/relocation.c:25:
> >> fs/btrfs/backref.h:158:28: note: declared here
> >>   158 | struct btrfs_backref_iter *btrfs_backref_iter_alloc(struct btrfs_fs_info *fs_info);
> >>       |                            ^~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > I have it in a branch on top of some misc-next snapshot, the date is
> > from 3 days ago and rebase to current misc-next is clean and builds.
> > 
> 
> My topmost commit is 8ffce84c9455 ("btrfs: send: fix send failure of a subcase of orphan inodes")
> and I still experience build failures.

Works for me:

- checkout commit 8ffce84c9455
- b4 ... | git am (same as yours)
- make

And also on my current misc-next 81c7fe2157e5182.