summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 3e9c527a..187ad3b9 100644
--- a/utils.c
+++ b/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);