* [PATCH] Btrfs-progs: fix check to test trim support
@ 2014-04-22 13:30 Rakesh Pandit
0 siblings, 0 replies; only message in thread
From: Rakesh Pandit @ 2014-04-22 13:30 UTC (permalink / raw)
To: linux-btrfs
It was added in 25d82d22 but broke recently in 4724d7b0 while making
discard interruptible.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils.c b/utils.c
index 0bfb9d9..068b4f3 100644
--- a/utils.c
+++ b/utils.c
@@ -629,7 +629,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);
--
1.8.5.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-22 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 13:30 [PATCH] Btrfs-progs: fix check to test trim support Rakesh Pandit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).