Btrfs-progs: fix check to test trim support
It was added in25d82d22
but broke recently in4724d7b0
while making discard interruptible. Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
802ed8c352
commit
726bc372b9
2
utils.c
2
utils.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue