diff options
author | Rakesh Pandit <rakesh@tuxera.com> | 2014-04-22 16:30:27 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-05-02 17:03:14 +0200 |
commit | 726bc372b9529a11c79dea75f2bcc8ef8a34d67a (patch) | |
tree | 56e1c00de99154cce9aaa4d721e15114ff8de527 | |
parent | 802ed8c3520897369e65c56b204babbc28ebed40 (diff) |
Btrfs-progs: fix check to test trim support
It was added in 25d82d22 but broke recently in 4724d7b0 while making
discard interruptible.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -626,7 +626,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, * is not necessary for the mkfs functionality but just an * optimization. */ - if (discard_blocks(fd, 0, 0) == 0) { + if (discard_range(fd, 0, 0) == 0) { fprintf(stderr, "Performing full device TRIM (%s) ...\n", pretty_size(block_count)); discard_blocks(fd, 0, block_count); |