Re: [PATCH] btrfs-progs: skip fs with no seed when build seed/sprout mapping for fi show

2014-11-07 Thread David Sterba
On Fri, Nov 07, 2014 at 10:07:41AM +0800, Gui Hecheng wrote: > +static int no_seed_devices(struct btrfs_fs_devices *fs_devices) Please reverse the meaning of the function, ie. something like 'has_seed_devices'. It's more natural to deal with negation operators when they're explicit rather than hid

[PATCH] btrfs-progs: skip fs with no seed when build seed/sprout mapping for fi show

2014-11-06 Thread Gui Hecheng
There is no need to try to build seed/sprout mapping for those btrfs without seed devices, so just skip such fs. We could get the total number of devices from the disk super block, if it equals the number of items in list @fs_devices->devices, then there shouldn't be any seed devices. Signed-off-b