Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ce7387
)
mke2fs: open device writable for trim/discard
author
Eric Sandeen
<sandeen@redhat.com>
Tue, 17 Nov 2009 21:49:03 +0000
(15:49 -0600)
committer
Theodore Ts'o
<tytso@mit.edu>
Wed, 25 Nov 2009 12:05:37 +0000
(07:05 -0500)
Sorry about that, the discard ioctl doesn't actually work
unless you open the file with write capabilities...
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c
patch
|
blob
|
history
diff --git
a/misc/mke2fs.c
b/misc/mke2fs.c
index
02cd1b7
..
80b9c0b
100644
(file)
--- a/
misc/mke2fs.c
+++ b/
misc/mke2fs.c
@@
-1929,7
+1929,7
@@
static void mke2fs_discard_blocks(ext2_filsys fs)
range[0] = 0;
range[1] = blocks * blocksize;
- fd = open64(fs->device_name, O_RD
ONLY
);
+ fd = open64(fs->device_name, O_RD
WR
);
/*
* We don't care about whether the ioctl succeeds; it's only an