Re: [PATCH v2] btrfs-progs: dump-super: Refactor print function and add extra check

2018-04-11 Thread Qu Wenruo
On 2018年04月12日 01:15, Goffredo Baroncelli wrote: > On 04/11/2018 02:32 AM, Qu Wenruo wrote: > [...] > so to get rid of generate_tab_indent and indent_str And we need to call such functions in each helper macros, with duplicated codes. >>> >>> Please look at the asm generated:

Re: [PATCH v2] btrfs-progs: dump-super: Refactor print function and add extra check

2018-04-11 Thread Nikolay Borisov
On 11.04.2018 20:15, Goffredo Baroncelli wrote: > On 04/11/2018 02:32 AM, Qu Wenruo wrote: > [...] > so to get rid of generate_tab_indent and indent_str And we need to call such functions in each helper macros, with duplicated codes. >>> >>> Please look at the asm generated:

Re: [PATCH v2] btrfs-progs: dump-super: Refactor print function and add extra check

2018-04-11 Thread Goffredo Baroncelli
On 04/11/2018 02:32 AM, Qu Wenruo wrote: [...] so to get rid of generate_tab_indent and indent_str >>> >>> And we need to call such functions in each helper macros, with >>> duplicated codes. >> >> Please look at the asm generated: even if the "source generated" by the >> expansion of the

Re: [PATCH v2] btrfs-progs: dump-super: Refactor print function and add extra check

2018-04-09 Thread Qu Wenruo
On 2018年04月10日 05:50, Goffredo Baroncelli wrote: > Hi Qu, > > On 04/09/2018 11:19 AM, Qu Wenruo wrote: >> When manually patching super blocks, current validation check is pretty >> weak (limited to magic number and csum) and doesn't provide extra check >> for some obvious corruption (like

Re: [PATCH v2] btrfs-progs: dump-super: Refactor print function and add extra check

2018-04-09 Thread Goffredo Baroncelli
Hi Qu, On 04/09/2018 11:19 AM, Qu Wenruo wrote: > When manually patching super blocks, current validation check is pretty > weak (limited to magic number and csum) and doesn't provide extra check > for some obvious corruption (like invalid sectorsize). [...] > > Signed-off-by: Qu Wenruo

[PATCH v2] btrfs-progs: dump-super: Refactor print function and add extra check

2018-04-09 Thread Qu Wenruo
When manually patching super blocks, current validation check is pretty weak (limited to magic number and csum) and doesn't provide extra check for some obvious corruption (like invalid sectorsize). This patch will enhance dump-super by: 1) Refactor print function and add checker helper macro