summaryrefslogtreecommitdiff
path: root/cmds-filesystem.c
Commit message (Collapse)AuthorAge
* btrfs-progs: cleanup option index argument from getopt_longDavid Sterba2015-04-08
| | | | | | | We're not using it anywhere. The best practice is to add enums with values > 255 for the long options, option index counting is error prone. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: use standard PACKAGE_* macrosKarel Zak2015-01-28
| | | | | | | | | | | | | - use standard PACKAGE_{NAME,VERSION,STRING,URL,...} autoconf macros rather than homemade BTRFS_BUILD_VERSION - don't #include version.h, now the file is necessary for library API only Note that "btrfs version" returns "btrfs-progs <version>" instead of the original confusing "btrfs <version>". Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: drop feature defines from C files, in favour of CFLAGS definesDimitri John Ledkov2015-01-27
| | | | | | | | | | | | | | | | | | | | | | glibc 2.10+ (5+ years old) enables all the desired features: _XOPEN_SOURCE 700, __XOPEN2K8, POSIX_C_SOURCE, DEFAULT_SOURCE; with a single _GNU_SOURCE define in the makefile alone. For portability to other libc implementations (e.g. dietlibc) _XOPEN_SOURCE=700 is also defined. This also resolves Debian bug report filed by Michael Tautschnig - "Inconsistent use of _XOPEN_SOURCE results in conflicting declarations". Whilst I was not able to reproduce the results, the reported fact is that _XOPEN_SOURCE set to 500 in one set of files (e.g. cmds-filesystem.c) generates/defines different struct stat from other files (cmds-replace.c). This patch thus cleans up all feature defines, and sets them at a consistent level. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747969 Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: unify getopt table terminatorsDavid Sterba2015-01-21
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: add --human-readable option where applicableDavid Sterba2015-01-21
| | | | | | | Add an alias to -h to 'filesystem usage', 'filesystem df' and 'device usage' commands, same as the traditional 'df'. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: make getopt tables static constDavid Sterba2015-01-19
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix wrong return value when executing 'fi show' on umounted device.Qu Wenruo2015-01-14
| | | | | | | | | | | | | | | | When executing 'btrfs fi show' on unmounted device, even no problem happens, the return value is still 1 not 0. The problem lies in search_umounted_fs_uuids(), where when it finds the given uuid, it should return 1, but later uuid copy overwrites the return value, causing it always return 0 under that case. Fix it by pass found as pointer, and return value only indicates whether anything wrong happens, whether found or not is stored in the new parameter. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fix minor leak of dev_info in btrfs_scan_kernelDavid Sterba2014-12-30
| | | | | Resolves-coverity-id: 1127098 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fi show, don't leak canonical pathDavid Sterba2014-12-30
| | | | | Resolves-coverity-id: 1260252 Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: move check_arg_type() to util.cGui Hecheng2014-12-29
| | | | | | | | | The check_arg_type() function does quite generic thing, move it to utils.c. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix btrfs fi show by uuid and labelJustin Maggard2014-12-29
| | | | | | | | | | | | | | | | Commit 8be2fff (btrfs-progs: apply realpath for btrfs fi show when mount point is given) changed the behavior of btrfs fi show to return an error if the call to realpath() failed. This broke the ability to specify a filesystem by uuid or label. So let's not consider a failed call to realpath() as an error. If the user really specified a bad device, just return nothing like we did before. Signed-off-by: Justin Maggard <jmaggard10@gmail.com> Reviewed-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: cleanup: avoid to use literal for getopt valSatoru Takeuchi2014-12-19
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: skip fs with no seed when build seed/sprout mapping for fi showGui Hecheng2014-12-04
| | | | | | | | | | | 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-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: make the search target device routine more clear for fi showGui Hecheng2014-12-04
| | | | | | | | Extract the procedure of searching for a target device for fi show from the @map_seed_devices() function to make it more clear. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: add original 'df' and rename 'disk_usage' to 'usage'David Sterba2014-12-04
| | | | | | | | | Add back the original output of the 'btrfs fi df' command for backward compatibility. The rich output is moved from 'disk_usage' to 'usage'. Agreed in http://www.spinics.net/lists/linux-btrfs/msg31698.html Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add command btrfs filesystem disk-usageGoffredo Baroncelli2014-12-04
| | | | | Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Enhance the command btrfs filesystem dfGoffredo Baroncelli2014-12-04
| | | | | | | | | | Enhance the command "btrfs filesystem df" to show space usage information for a mount point(s). It shows also an estimation of the space available, on the basis of the current one used. Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> [code moved under #if 0 instead of deletion] Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: move group type and profile pretty printers to utilsDavid Sterba2014-12-04
| | | | | | Move and add the btrfs_ prefix. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: apply realpath for btrfs fi show when mount point is givenGui Hecheng2014-11-27
| | | | | | | | | | | | | | | | For now, # btrfs fi show /mnt/btrfs gives info correctly, while # btrfs fi show /mnt/btrfs/ gives nothing. This implies that the @realpath() function should be applied to unify the behavior. Made a more clear comment right above the call as well. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: use canonical name for device in btrfs fi show when mountedGui Hecheng2014-11-14
| | | | | | | | | | | | | | | | When using lvm volumes to check fstests: btrfs/006, it fails like: Label: 'TestLabel.006' uuid: <UUID> Total devices <EXACTNUM> FS bytes used <SIZE> devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV + devid <DEVID> size <SIZE> used <SIZE> path /dev/dm-4 + devid <DEVID> size <SIZE> used <SIZE> path /dev/dm-5 + devid <DEVID> size <SIZE> used <SIZE> path /dev/dm-6 The /dev/dm-* points to lvm volumes, use @canonicalize_path() to convert them and we will make it through. Of course we should do the same thing for dev stat. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: use the correct SI prefixesDavid Sterba2014-11-04
| | | | | | The SI standard defines lowercase 'k' and uppercase for the rest. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: optimize btrfs_scan_lblkid() for multiple callsAnand Jain2014-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btrfs_scan_lblikd() is called by most the device related command functions. And btrfs_scan_lblkid() is most expensive function and it becomes more expensive as number of devices in the system increase. Further some threads call this function more than once for absolutely no extra benefit and the real waste of resources. Below list of threads and number of times btrfs_scan_lblkid() is called in that thread. btrfs-find-root 1 btrfs rescue super-recover 2 btrfs-debug-tree 1 btrfs-image -r 2 btrfs check 2 btrfs restore 2 calc-size NC btrfs-corrupt-block NC btrfs-image NC btrfs-map-logical 1 btrfs-select-super NC btrfstune 2 btrfs-zero-log NC tester NC quick-test.c NC btrfs-convert 0 mkfs #number of devices to be mkfs btrfs label set unmounted 2 btrfs get label unmounted 2 This patch will: move out calling register_one_device with in btrfs_scan_lblkid() and so function setting the BTRFS_UPDATE_KERNEL to yes will call btrfs_register_all_devices() separately. introduce a global variable scan_done, which is set when scan is done succssfully per thread. So that following calls to this function will just return success. Further if any function needs to force scan after scan_done is set, then it can be done when there is such a requirement, but as of now there isn't any such requirement. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: skip mounted fs when deal with umounted ones for fi showGui Hecheng2014-11-03
| | | | | | | | | | | | | | | | | | Stalling problems may happen when exec balance & fi show cmds concurrently. With the following commit: commit 915902c500 btrfs-progs: fix device missing of btrfs fi show with seed devices The fi show cmd will bother the mounted fs when only umounted fs should be handled after @btrfs_can_kernel() has finished showing all mounted ones. We could skip the mounted fs after @btrfs_can_kernel() is done, then tasks keeps going on mounted fs while fi show continues on umounted ones separately. Reported-by: Petr Janecek <janecek@ucw.cz> Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix number of arguments check of 'btrfs fi df'Qu Wenruo2014-11-03
| | | | | | | | | | | | | | | | 'btrfs fi df' needs exactly one arguments as mount option, but as 3.17 we can run 'btrfs fi df' without any argument, and it will error as "ERROR: can't access '%s'" which means the argument number does not do what it should. The bug is caused by manually modify the optind and use check_argc_max() instead of the original check_argc_exact(). This patch fixes it by not modifying the optind and use check_argc_exact() again. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: add options to tune units for fi df outputDavid Sterba2014-10-10
| | | | | | | | | | | | | The size unit format is a longstanding annoyance. This patch is based on the work of Nils and Alexandre and enhances the options. It's possible to select raw bytes, SI-based or IEC-based compact units (human frientdly) or a fixed base from kilobytes to terabytes. The default is compact human readable IEC-based, no change to current version. CC: Nils Steinger <nst@voidptr.de> CC: Alexandre Oliva <oliva@gnu.org> Reviewed-by: Hugo Mills <hugo@carfax.org.uk> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fix device missing of btrfs fi show with seed devicesGui Hecheng2014-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *Note* this handles the problem under umounted state, the similar problem under mounted state is already fixed by Anand. Steps to reproduce: # mkfs.btrfs -f /dev/sda1 # btrfstune -S 1 /dev/sda1 # mount /dev/sda1 /mnt # btrfs dev add /dev/sda2 /mnt # umount /mnt <== (umounted) # btrfs fi show /dev/sda2 result: Label: none uuid: XXXXXXXXXXXXXXXXXX Total devices 2 FS bytes used 368.00KiB devid 2 size 9.31GiB used 1.25GiB path /dev/sda2 *** Some devices missing Btrfs v3.16-67-g69f54ea-dirty It is because @btrfs_scan_lblkid() won't establish mappinig between the seed and sprout devices. So seeding devices are missing. We could use @open_ctree_* to detect all seed/sprout mappings for each fs scanned after @btrfs_scan_lblkid(). sth worthes mention: o If there are multi-level of seeds, all devices in them will be shown in the ascending order of @devid o If device replace is execed on a sprout fs with a device in a seed fs, the replaced device still exist in the seed fs together with the replacing device in the sprout fs, so we only keep the latest device with the newest generation Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: remove BTRFS_SCAN_PROC scan methodAnand Jain2014-10-10
| | | | | | | | | | | The libblkid scan method which was introduced later, will also scan devices under /proc/partitions. So we don't have to do the explicit scan of the same. Remove the scan method BTRFS_SCAN_PROC. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: scan /proc/partitions not all of /dev with "-d"Eric Sandeen2014-10-10
| | | | | | | | | | | | | | | We can scan for btrfs devices in a few ways. By default libblkid is used for "device scan" and "filesystem show"; with the -m option only mounted filesystems are scanned, and with -d we physically read every system device. But there's no reason for the complexity of a descent through /dev; /proc/partitions has every device known to the kernel, so just use that when -d is specified. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: read global reserve size from space infosDavid Sterba2014-08-28
| | | | | | | | Kernels >= 3.15 export the global block reserve as a space info presented by 'btrfs fi df' but would display 'unknown' instead of some meaningful string. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: avoid to use numeric literal for the size of uuid bufferSatoru Takeuchi2014-08-22
| | | | | | | | | Replace a numeric literal to more descriptive macro for the size of uuid buffer. Signed-of-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: remove unnecessary NULL check after get_df()Satoru Takeuchi2014-08-22
| | | | | | | | If get_df() returns 0, "sargs" surely points to malloc'ed region. So NULL check of sargs is not necessary. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for super_recover.Qu Wenruo2014-08-22
| | | | | | | | | | | | | | Btrfs-progs superblock checksum check is somewhat too restricted for super-recover, since current btrfs-progs will only read the 1st superblock and if you need super-recover the 1st superblock is possibly already damaged. The fix is introducing super_recover parameter for btrfs_read_dev_super() and callers to allow scan backup superblocks if needed. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Avoid double-free of fs_devices->listSatoru Takeuchi2014-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found the following patch is insufficient. =============================================================================== commit 6e6b32ddf58db54f714d0f263c2589f4859e8b5e Author: Adam Buchbinder <abuchbinder@google.com> Date: Fri Jun 13 16:43:56 2014 -0700 btrfs-progs: Fix a use-after-free in the volumes code. =============================================================================== "btrfs filesystem show <dev>" with this patch causes segmentation fault if "<dev>" is a not-mounted Btrfs filesystem. =============================================================================== Label: none uuid: <cut here> Total devices 1 FS bytes used 112.00KiB devid 1 size 59.12GiB used 2.04GiB path /dev/sdd1 Segmentation fault (core dumped) =============================================================================== It's due to double-free of fs_devices->list as follows. =============================================================================== cmd_show -> list_del(&fs_devices->list) # 1st one. -> btrfs_close_devices(fs_devices) -> list_del(&fs_devices->list) # <- 2nd one introduced at 6e6b32dd. Double-free happens here. =============================================================================== First list_del() can safely be removed because fs_devices->list will be deleted by second one, soon. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Cc: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: update manpage for btrfs resize support size unit t/p/eGui Hecheng2014-08-22
| | | | | | | | btrfs resize now support size unit parse of k/m/g/t/p/e in kernel space, adopt the changes in userspace manpage. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix the return value of btrfs_scan_kernel()Qu Wenruo2014-04-22
| | | | | | | | | | | | | | btrfs_scan_kernel() is only used in 'btrfs fi show' but returns wrong return value. When search parameter is passed, it will never return 0 even the search can be matched. This patch will change the whatever strange logic to a more easy to understand one using 'found' var. Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Cc: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: return with -ENOMEM if malloc failsRakesh Pandit2014-03-21
| | | | | | | | | Prevent segfault if memory allocation fails for sargs in get_df (cmds-filesystem.c). Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: Fix a memleak in btrfs_scan_one_device.Qu Wenruo2014-03-21
| | | | | | | | | | | | Valgrind reports memleak in btrfs_scan_one_device() about allocating btrfs_device but on btrfs_close_devices() they are not reclaimed. Although not a bug since after btrfs_close_devices() btrfs will exit so memory will be reclaimed by system anyway, it's better to fix it anyway. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: fix uninit variable in btrfs_scan_kernelChris Mason2014-03-21
| | | | Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: Fix check_arg_type() which doesn't use realpath() result.Qu Wenruo2014-03-21
| | | | | | | | | | Fix a problem that does not use the result of realpath(), which caused check_arg_type() can't handle mount point which ends with a final '/'. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Cc: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: Add missing devices check for mounted btrfs.Qu Wenruo2014-03-21
| | | | | | | | | | | | | | In btrfs/003 of xfstest, it will check whether btrfs fi show can find missing devices. But before the patch, btrfs-progs will not check whether device missing if given a mounted btrfs mountpoint/block device. This patch fixes the bug and will pass btrfs/003. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Cc: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: return non zero when label is not foundAnand Jain2014-01-31
| | | | | | | | btrfs filesystem show <not-found-label> should return non zero Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: lblkid wouldn't find non mapper path inputAnand Jain2014-01-31
| | | | | | | | | | | | A new test case when disk is unmounted and if the non mapper disk path is given as the argument to the btrfs filesystem show <arg> we still need this to work but lblkid will pull only mapper disks, it won't match. So this will normalize the input to find btrfs by fsid and pass it to the search. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: fix minor grammar issuesMitchel Humpherys2014-01-31
| | | | | | | | Remove the extraneous `to' from `Can't access to X'. Signed-off-by: Mitchel Humpherys <mitch.special@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: skip non-regular files while defragmentingPascal VITOUX2014-01-31
| | | | | | | | | | | Skip non-regular files to avoid ioctl errors while defragmenting. They are silently ignored in recursive mode but reported as errors when used as command-line arguments. Signed-off-by: Pascal VITOUX <vitoux.pascal@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: fix improper error prompt for defragmentGui Hecheng2014-01-31
| | | | | | | | | | | | The error msg: "ERROR: defrag range ioctl not supported in this kernel, please try without any options." should only show up when failing to do a range defraging, not upon non-range defraging. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: call endmntent in btrfs_scan_kernelDavid Sterba2014-01-31
| | | | | | | | | | | btrfs_scan_kernel() does a getmntent() but never releases the filedescriptor it gets back from that. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64711 Reported-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: define BTRFS_UUID_UNPARSE_SIZE for uuid unparse buf sizeAnand Jain2014-01-31
| | | | | | | | | we use 37 as the allocation size to hold the uuid_unparse, here it defines BTRFS_UUID_UNPARSE_SIZE for the same. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* Btrfs-progs: let get_label return the label instead of printing itFilipe David Borba Manana2014-01-31
| | | | | | | | | get_label prints the label at the moment. Change this so that the label is returned and printing is done by the caller. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs-progs: make filesystem show by label workAnand Jain2014-01-31
| | | | | | | | | | with design revamp around filesystem show the fsid filter by label wasn't planned. but apparently that seemed to be necessary. this patch will fix it. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
* btrfs filesystem show: skip duplicate fsidsChris Mason2013-11-18
| | | | | | | | | If a given filesystem is mounted more than once, btrfs fi show will print dups. This adds a quick and dirty hash table of fsids it has already printed and makes sure we don't print any fsid more than once. Signed-off-by: Chris Mason <chris.mason@fusionio.com>