[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B031A4F.5080105@redhat.com>
Date: Tue, 17 Nov 2009 15:49:03 -0600
From: Eric Sandeen <sandeen@...hat.com>
To: ext4 development <linux-ext4@...r.kernel.org>
Subject: [PATCH] e2fsprogs: open device writable for trim/discard
Sorry about that, the discard ioctl doesn't actually work
unless you open the file with write capabilities...
Signed-off-by: Eric Sandeen <sandeen@...hat.com>
---
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 94b4c81..0aa31d8 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1877,7 +1877,7 @@ static void mke2fs_discard_blocks(ext2_filsys fs)
range[0] = 0;
range[1] = blocks * blocksize;
- fd = open64(fs->device_name, O_RDONLY);
+ fd = open64(fs->device_name, O_RDWR);
/*
* We don't care about whether the ioctl succeeds; it's only an
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists