* [PATCH] e2fsprogs: e4defrag must open the file to be defragged in read/write mode
@ 2010-03-25 19:32 Darrick J. Wong
0 siblings, 0 replies; only message in thread
From: Darrick J. Wong @ 2010-03-25 19:32 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: linux-ext4
Akira Fujita merged a patch into 2.6.33 that adds a requirement that a file
being defragged must be opened with read and write access, so e2fsprogs needs
to satisfy that.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -1605,7 +1605,7 @@ static int file_defrag(const char *file, const struct stat64 *buf,
return 0;
}
- fd = open64(file, O_RDONLY);
+ fd = open64(file, O_RDWR);
if (fd < 0) {
if (mode_flag & DETAIL) {
PRINT_FILE_NAME(file);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-25 19:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25 19:32 [PATCH] e2fsprogs: e4defrag must open the file to be defragged in read/write mode Darrick J. Wong
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).