summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2013-09-17 16:54:00 +0200
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:20:43 -0400
commit15ac848f8a376d62a14d5f97ac5106f10f920c5a (patch)
tree227c648ad013157c6a9ea898e29648cbf0d2378d /mkfs.c
parentf3ba66263473660aa4b2bde1623db7b969abdbae (diff)
btrfs-progs: use better name for nodiscard variable and flip the logic
Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'mkfs.c')
-rw-r--r--mkfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mkfs.c b/mkfs.c
index 3ac00bae..40da546d 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1324,7 +1324,7 @@ int main(int ac, char **av)
int mixed = 0;
int data_profile_opt = 0;
int metadata_profile_opt = 0;
- int nodiscard = 0;
+ int discard = 1;
int ssd = 0;
int force_overwrite = 0;
@@ -1409,7 +1409,7 @@ int main(int ac, char **av)
source_dir_set = 1;
break;
case 'K':
- nodiscard=1;
+ discard = 0;
break;
default:
print_usage();
@@ -1507,7 +1507,7 @@ int main(int ac, char **av)
}
first_file = file;
ret = btrfs_prepare_device(fd, file, zero_end, &dev_block_count,
- block_count, &mixed, nodiscard);
+ block_count, &mixed, discard);
if (block_count && block_count > dev_block_count) {
fprintf(stderr, "%s is smaller than requested size\n", file);
exit(1);
@@ -1614,7 +1614,7 @@ int main(int ac, char **av)
continue;
}
ret = btrfs_prepare_device(fd, file, zero_end, &dev_block_count,
- block_count, &mixed, nodiscard);
+ block_count, &mixed, discard);
mixed = old_mixed;
BUG_ON(ret);