btrfs-progs/common
David Sterba c50c448518 btrfs-progs: do sysfs detection of device discard capability
The detection of the discard status of a device is done by issuing a
real discard request but on an empty range. This works in most cases.
However there's a case of a VirtualBox driver that returns 'Operation
not supported' in that case, and then discard is skipped during mkfs.

The other tools like fstrim check the sysfs queue file
discard_granularity which is the recommended way. Do that as well.

Issue: #390
Signed-off-by: David Sterba <dsterba@suse.com>
2021-10-06 16:49:30 +02:00
..
box.h
defs.h
device-scan.c btrfs-progs: do not BUG_ON if btrfs_add_to_fsid succeeded to write superblock 2021-05-12 16:00:14 +02:00
device-scan.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
device-utils.c btrfs-progs: do sysfs detection of device discard capability 2021-10-06 16:49:30 +02:00
device-utils.h btrfs-progs: add helper to read zone size from sysfs 2021-07-02 17:27:53 +02:00
extent-cache.c btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
extent-cache.h btrfs-progs: move extent-cache.c to common/ 2020-08-31 17:01:04 +02:00
format-output.c btrfs-progs: split unit related helpers from utils.c 2021-05-06 16:41:47 +02:00
format-output.h
fsfeatures.c btrfs-progs: move btrfs_tree_search2_ioctl_supported to fsfeatures.c 2021-09-07 16:20:17 +02:00
fsfeatures.h btrfs-progs: move btrfs_tree_search2_ioctl_supported to fsfeatures.c 2021-09-07 16:20:17 +02:00
help.c btrfs-progs: split global help HELPINFO_INSERT_GLOBALS 2020-06-12 19:30:36 +02:00
help.h btrfs-progs: add global verbose and quiet options and helper functions 2020-06-12 19:30:43 +02:00
internal.h
messages.c btrfs-progs: add global verbose and quiet options and helper functions 2020-06-12 19:30:43 +02:00
messages.h btrfs-progs: add separate verbosity level for on-by-default messages 2020-06-12 19:32:29 +02:00
open-utils.c btrfs-progs: split open/close helpers from utils.c 2021-05-06 16:41:47 +02:00
open-utils.h btrfs-progs: split open/close helpers from utils.c 2021-05-06 16:41:47 +02:00
parse-utils.c btrfs-progs: move parse_qgroupid to parse utils 2021-09-07 14:20:42 +02:00
parse-utils.h btrfs-progs: move parse_qgroupid to parse utils 2021-09-07 14:20:42 +02:00
path-utils.c btrfs-progs: receive: fix btrfs_mount_root substring bug 2021-02-19 16:29:40 +01:00
path-utils.h btrfs-progs: remove unnecessary linux/*.h includes 2021-05-06 16:41:47 +02:00
rbtree-utils.c
rbtree-utils.h
repair.c btrfs-progs: move repair.[ch] to common/ 2021-05-06 16:41:47 +02:00
repair.h btrfs-progs: move repair.[ch] to common/ 2021-05-06 16:41:47 +02:00
send-stream.c btrfs-progs: move send.h to kernel-shared/ 2021-09-07 19:26:46 +02:00
send-stream.h btrfs-progs: move send-stream.c to common/ 2020-08-31 17:01:04 +02:00
send-utils.c btrfs-progs: open code btrfs_list_get_path_rootid 2021-09-08 16:35:47 +02:00
send-utils.h btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
string-table.c
string-table.h
task-utils.c
task-utils.h
units.c btrfs-progs: split unit related helpers from utils.c 2021-05-06 16:41:47 +02:00
units.h btrfs-progs: split unit related helpers from utils.c 2021-05-06 16:41:47 +02:00
utils-lib.c btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
utils.c btrfs-progs: rename and move group_profile_max_safe_loss 2021-09-07 16:38:56 +02:00
utils.h btrfs-progs: rename and move group_profile_max_safe_loss 2021-09-07 16:38:56 +02:00