[PATCH] btrfs-progs: inspect-internal: add option '-k u64,u8,u64' of dump-tree

2018-07-15 Thread Su Yue
For big filesystems, there are many items in trees(extent tree specially). For example, to dump one extent, we usually dump extent tree then pipe result to grep. The time-consuming part is that dump tree traverses items. And it eats cpu and memory too. This patch introduces an option '-k

Re: [PATCH v4 1/2] btrfs: make fs_devices to be a local variable

2018-07-15 Thread Anand Jain
On 07/12/2018 02:23 PM, Gu Jinxiang wrote: fs_devices is always passed to btrfs_scan_one_device which overrides it. And in the call stack below fs_devices is passed to btrfs_scan_one_device from btrfs_mount_root. And in btrfs_mount_root the output fs_devices of this call stack is not used.

Re: [PATCH 2/3] btrfs: add helper btrfs_num_devices() to deduce num_devices

2018-07-15 Thread Anand Jain
On 07/13/2018 07:17 PM, Nikolay Borisov wrote: On 13.07.2018 14:17, Anand Jain wrote: On 07/12/2018 03:31 PM, Nikolay Borisov wrote: On 10.07.2018 21:22, Anand Jain wrote: When the replace is running the fs_devices::num_devices also includes the replace device, however in some

Re: [PATCH 3/3] btrfs: add helper function check device delete able

2018-07-15 Thread Anand Jain
On 07/13/2018 07:28 PM, Nikolay Borisov wrote: On 13.07.2018 14:27, Anand Jain wrote: On 07/12/2018 03:43 PM, Nikolay Borisov wrote: On 10.07.2018 21:22, Anand Jain wrote: Move the section of the code which performs the check if the device is indelible, move that into a helper

[PATCH] v2: btrfs-progs: Introduce 'btrfs inspect-internal dump-csum' option

2018-07-15 Thread Lakshmipathi.G
Dump csum for a given file. Sample usage: btrfs inspect-internal dump-csum /btrfs/50gbfile /dev/sda4 csum for /btrfs/50gbfile dumped to /btrfs/50gbfile.csumdump Signed-off-by: Lakshmipathi.G --- Makefile | 2 +- cmds-inspect-dump-csum.c | 256

Re: [PATCH 0/4] 3- and 4- copy RAID1

2018-07-15 Thread Hugo Mills
On Fri, Jul 13, 2018 at 08:46:28PM +0200, David Sterba wrote: [snip] > An interesting question is the naming of the extended profiles. I picked > something that can be easily understood but it's not a final proposal. > Years ago, Hugo proposed a naming scheme that described the > non-standard raid

Re: [PATCH 0/4] 3- and 4- copy RAID1

2018-07-15 Thread waxhead
David Sterba wrote: An interesting question is the naming of the extended profiles. I picked something that can be easily understood but it's not a final proposal. Years ago, Hugo proposed a naming scheme that described the non-standard raid varieties of the btrfs flavor: