summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils.c b/utils.c
index 134bf808..bb1bcdb3 100644
--- a/utils.c
+++ b/utils.c
@@ -569,7 +569,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
}
int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret,
- u64 max_block_count, int *mixed, int nodiscard)
+ u64 max_block_count, int *mixed, int discard)
{
u64 block_count;
u64 bytenr;
@@ -596,7 +596,7 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret,
*mixed = 1;
}
- if (!nodiscard) {
+ if (discard) {
/*
* We intentionally ignore errors from the discard ioctl. It is
* not necessary for the mkfs functionality but just an optimization.