The commands fix-device-size, clear-uuid-tree and clear-ino-cache have
been missing in the completion file since the command implementation was
added.
Signed-off-by: David Sterba <dsterba@suse.com>
Currently "btrfs filesystem du" auto-completes for directories only,
but it can also be used against files to determine shared vs exclusive
extents.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Verify if a given file is suitable for a swapfile and print the physical
offset (ie. the ultimate on-device physical offset), and the resume
offset value (physical / page size).
This can be the kernel parameter or written to /sys/power/resume_offset
before hibernation. Option -r or --resume-offset prints just the value.
Copied and simplified from Omar Sandoval's tool to print extents:
https://github.com/osandov/osandov-linux/blob/master/scripts/btrfs_map_physical.c
Issue: #544
Issue: #533
Signed-off-by: David Sterba <dsterba@suse.com>
Add a new subcommand 'btrfs rescue create-control-device' that creates
/dev/btrfs-control. This is helpful on systems that may not have `mknod`
installed and the device node is missing for some reason.
Issue: #223
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
[ update docs ]
Signed-off-by: David Sterba <dsterba@suse.com>
For dump-tree/dump-super the completion uses default filedir -d, which
is far from convenient. Use filedir for
dump-tree/dump-super/inode-resolve just like rootid.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
For developers it's pretty common to call "btrfs check" on a raw image
dump other than real block device. It's also possible to end users to
do some tests on loop devices.
So current _btrfs_devs() is really making things worse. Use _filedir()
to replace _btrfs_devs() so it can complete any filenames, no matter if
it's just a file or a real block device.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Clean up spaces and use only tabs. No functional change.
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This patch updates btrfs-completion:
- add "filesystem du" and "rescure zero-log"
- restrict _btrfs_mnts to show btrfs type only
- add more completion in last case statements
(This file contains both spaces/tabs and may need cleanup.)
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Previously in 'filesystem resize get_min_size', now
'inspect-internal min-dev-size'. We'd like to avoid cluttering the
'resize' syntax further.
The test has been updated to exercise the new option.
Signed-off-by: David Sterba <dsterba@suse.com>
Original authors:
Alfredo Esteban <aedelatorre at gmail.com>
Joseph Wang <joequant at gmail.com>
John C F <john.ch.fr at gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>