projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
802ed8c
)
Btrfs-progs: fix check to test trim support
author
Rakesh Pandit
<rakesh@tuxera.com>
Tue, 22 Apr 2014 13:30:27 +0000
(16:30 +0300)
committer
David Sterba
<dsterba@suse.cz>
Fri, 2 May 2014 15:03:14 +0000
(17:03 +0200)
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>
utils.c
patch
|
blob
|
history
diff --git
a/utils.c
b/utils.c
index
3e9c527
..
187ad3b
100644
(file)
--- 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);