Re: [PATCH 00/16] btrfs-progs: Split lowmem mode check to its own

2018-01-31 Thread Qu Wenruo


On 2018年02月01日 02:26, David Sterba wrote:
> On Fri, Jan 19, 2018 at 01:37:15PM +0800, Qu Wenruo wrote:
>> The long planned cmds-check re-construction is finally here.
>>
>> As the original cmds-check.c is getting larger and larger (already over
>> 15K lines), it's always a good idea to split it into its own check/
>> directory.
>>
>> This patchset do the following work:
>> 1) Move cmds-check.c to check/main.c
>> 2) Put codes shared by both original and lowmem mode into
>>check/common.[ch]
>> 3) Put lowmem code into check/lowmem.[ch]
>>With minor renaming to get rid of unnecessary _v2 suffix.
>>
>> The modification looks scary, but no functional change at all.
>>
>> And considering how much the file structure changed, it's a good idea to
>> put PART1 as quick as possible, and there will be less pressure to
>> rebase new incoming fsck related codes.
> 
> I agree with the way you split check, my attempts were going along the
> same lines. The question whether to split first and then add fixes shall
> be resolved as I'm going to merge the split first. This would need
> refreshing the lowmem fixes but the other way around would not avoid the
> merge conflicts anyway.
> 
> The patch 15 does not apply cleanly to current devel, the conflict did
> not seem big, but I did not try to resolve it and merge the last patch.
> So, 1-14 goes to devel, please refresh 15 and 16.

No problem.

Update under way.

> 
>> The real move work happens in the 15th patch, which due to its size
>> (500KB+), it may not be able to reach mail list.
>> So please fetch the whole patchset from github:
>> https://github.com/adam900710/btrfs-progs/tree/split_check
>>
>> There will be a part 2, mostly moving original mode to its own
>> check/original.[ch], along with extra comment explaining how the two
>> different modes work.
> 
> I'm going to do a few file renames, eg. original.c -> mode-original.c
> and similar.
> It would be better if you send part 2 after that.

Of course.
It would be a while for part 2.

> I'm
> expecting more patches that would do no functional change so we can
> settle down with the new check/ structure.
> 
> As 'check' is the 1st level command, the cmds-check.c will need to be
> restored at some point, but it will be only a simple wrapper around the
> commandline handling.

OK, I think it would be part of PART 2 to restore it.

Thanks,
Qu

> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



signature.asc
Description: OpenPGP digital signature


Re: [PATCH 00/16] btrfs-progs: Split lowmem mode check to its own

2018-01-31 Thread David Sterba
On Fri, Jan 19, 2018 at 01:37:15PM +0800, Qu Wenruo wrote:
> The long planned cmds-check re-construction is finally here.
> 
> As the original cmds-check.c is getting larger and larger (already over
> 15K lines), it's always a good idea to split it into its own check/
> directory.
> 
> This patchset do the following work:
> 1) Move cmds-check.c to check/main.c
> 2) Put codes shared by both original and lowmem mode into
>check/common.[ch]
> 3) Put lowmem code into check/lowmem.[ch]
>With minor renaming to get rid of unnecessary _v2 suffix.
> 
> The modification looks scary, but no functional change at all.
> 
> And considering how much the file structure changed, it's a good idea to
> put PART1 as quick as possible, and there will be less pressure to
> rebase new incoming fsck related codes.

I agree with the way you split check, my attempts were going along the
same lines. The question whether to split first and then add fixes shall
be resolved as I'm going to merge the split first. This would need
refreshing the lowmem fixes but the other way around would not avoid the
merge conflicts anyway.

The patch 15 does not apply cleanly to current devel, the conflict did
not seem big, but I did not try to resolve it and merge the last patch.
So, 1-14 goes to devel, please refresh 15 and 16.

> The real move work happens in the 15th patch, which due to its size
> (500KB+), it may not be able to reach mail list.
> So please fetch the whole patchset from github:
> https://github.com/adam900710/btrfs-progs/tree/split_check
> 
> There will be a part 2, mostly moving original mode to its own
> check/original.[ch], along with extra comment explaining how the two
> different modes work.

I'm going to do a few file renames, eg. original.c -> mode-original.c
and similar. It would be better if you send part 2 after that. I'm
expecting more patches that would do no functional change so we can
settle down with the new check/ structure.

As 'check' is the 1st level command, the cmds-check.c will need to be
restored at some point, but it will be only a simple wrapper around the
commandline handling.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/16] btrfs-progs: Split lowmem mode check to its own

2018-01-18 Thread Su Yue



On 01/19/2018 01:37 PM, Qu Wenruo wrote:

The long planned cmds-check re-construction is finally here.

As the original cmds-check.c is getting larger and larger (already over
15K lines), it's always a good idea to split it into its own check/
directory.

This patchset do the following work:
1) Move cmds-check.c to check/main.c
2) Put codes shared by both original and lowmem mode into
check/common.[ch]
3) Put lowmem code into check/lowmem.[ch]
With minor renaming to get rid of unnecessary _v2 suffix.

The modification looks scary, but no functional change at all.

And considering how much the file structure changed, it's a good idea to
put PART1 as quick as possible, and there will be less pressure to
rebase new incoming fsck related codes.

The real move work happens in the 15th patch, which due to its size
(500KB+), it may not be able to reach mail list.
So please fetch the whole patchset from github:
https://github.com/adam900710/btrfs-progs/tree/split_check

There will be a part 2, mostly moving original mode to its own
check/original.[ch], along with extra comment explaining how the two
different modes work.


It's fine to do cleanup and extra comment in part2.
So, all patches except patch[4] with wrong title
are

Reviewed-by: Su Yue 

Qu Wenruo (16):
   btrfs-progs: Moves cmds-check.c to check/main.c
   btrfs-progs: check: Move original mode definitions to check/original.h
   btrfs-progs: check: Move definitions of lowmem mode to check/lowmem.h
   btrfs-progs: check: Move node_ptr structure to check/common.h
   btrfs-progs: check: Export check global variables to check/common.h
   btrfs-progs: check: Move imode_to_type function to check/common.h
   btrfs-progs: check: Move fs_root_objectid function to check/common.h
   btrfs-progs: check: Move count_csum_range function to check/common.c
   btrfs-progs: check: Move __create_inode_item function to
 check/common.c
   btrfs-progs: check: Move link_inode_to_lostfound function to common.c
   btrfs-progs: check: Move check_dev_size_alignment to check/common.c
   btrfs-progs: check: move reada_walk_down to check/common.c
   btrfs-progs: check: Move check_child_node to check/common.c
   btrfs-progs: check: Move reset_cached_block_groups to check/common.c
   btrfs-progs: check: Move lowmem check code to its own
 check/lowmem.[ch]
   btrfs-progs: check/lowmem: Cleanup unnecessary _v2 suffix

  Makefile | 6 +-
  check/common.c   |   351 +
  check/common.h   |   100 +
  check/lowmem.c   |  4571 
  check/lowmem.h   |67 +
  cmds-check.c => check/main.c | 16389 ++---
  check/original.h |   293 +
  7 files changed, 11007 insertions(+), 10770 deletions(-)
  create mode 100644 check/common.c
  create mode 100644 check/common.h
  create mode 100644 check/lowmem.c
  create mode 100644 check/lowmem.h
  rename cmds-check.c => check/main.c (65%)
  create mode 100644 check/original.h




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/16] btrfs-progs: Split lowmem mode check to its own

2018-01-18 Thread Qu Wenruo
The long planned cmds-check re-construction is finally here.

As the original cmds-check.c is getting larger and larger (already over
15K lines), it's always a good idea to split it into its own check/
directory.

This patchset do the following work:
1) Move cmds-check.c to check/main.c
2) Put codes shared by both original and lowmem mode into
   check/common.[ch]
3) Put lowmem code into check/lowmem.[ch]
   With minor renaming to get rid of unnecessary _v2 suffix.

The modification looks scary, but no functional change at all.

And considering how much the file structure changed, it's a good idea to
put PART1 as quick as possible, and there will be less pressure to
rebase new incoming fsck related codes.

The real move work happens in the 15th patch, which due to its size
(500KB+), it may not be able to reach mail list.
So please fetch the whole patchset from github:
https://github.com/adam900710/btrfs-progs/tree/split_check

There will be a part 2, mostly moving original mode to its own
check/original.[ch], along with extra comment explaining how the two
different modes work.

Qu Wenruo (16):
  btrfs-progs: Moves cmds-check.c to check/main.c
  btrfs-progs: check: Move original mode definitions to check/original.h
  btrfs-progs: check: Move definitions of lowmem mode to check/lowmem.h
  btrfs-progs: check: Move node_ptr structure to check/common.h
  btrfs-progs: check: Export check global variables to check/common.h
  btrfs-progs: check: Move imode_to_type function to check/common.h
  btrfs-progs: check: Move fs_root_objectid function to check/common.h
  btrfs-progs: check: Move count_csum_range function to check/common.c
  btrfs-progs: check: Move __create_inode_item function to
check/common.c
  btrfs-progs: check: Move link_inode_to_lostfound function to common.c
  btrfs-progs: check: Move check_dev_size_alignment to check/common.c
  btrfs-progs: check: move reada_walk_down to check/common.c
  btrfs-progs: check: Move check_child_node to check/common.c
  btrfs-progs: check: Move reset_cached_block_groups to check/common.c
  btrfs-progs: check: Move lowmem check code to its own
check/lowmem.[ch]
  btrfs-progs: check/lowmem: Cleanup unnecessary _v2 suffix

 Makefile | 6 +-
 check/common.c   |   351 +
 check/common.h   |   100 +
 check/lowmem.c   |  4571 
 check/lowmem.h   |67 +
 cmds-check.c => check/main.c | 16389 ++---
 check/original.h |   293 +
 7 files changed, 11007 insertions(+), 10770 deletions(-)
 create mode 100644 check/common.c
 create mode 100644 check/common.h
 create mode 100644 check/lowmem.c
 create mode 100644 check/lowmem.h
 rename cmds-check.c => check/main.c (65%)
 create mode 100644 check/original.h

-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html