[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1234435026.15433.7.camel@sebastian.kern.oss.ntt.co.jp>
Date: Thu, 12 Feb 2009 19:37:06 +0900
From: Fernando Luis Vázquez Cao
<fernando@....ntt.co.jp>
To: Jan Kara <jack@...e.cz>
Cc: Theodore Tso <tytso@....EDU>, Alan Cox <alan@...rguk.ukuu.org.uk>,
Pavel Machek <pavel@...e.cz>,
kernel list <linux-kernel@...r.kernel.org>,
Jens Axboe <jens.axboe@...cle.com>, sandeen@...hat.com,
fernando@....ac.jp
Subject: util-linux: Add new mount options flushonfsync and noflushonfsync
to mount
This mount flag will be used to determine whether the block device's write
cache should be flush or not on fsync()/fdatasync().
Signed-off-by: Fernando Luis Vazquez Cao <fernando@....ntt.co.jp>
---
diff -urp mount-orig/mount.c mount/mount.c
--- mount-orig/mount.c 2009-01-29 15:50:50.000000000 +0900
+++ mount/mount.c 2009-01-29 14:56:19.000000000 +0900
@@ -185,6 +185,13 @@ static const struct opt_map opt_map[] =
{ "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
to mtime/ctime */
#endif
+#ifdef MS_FLUSHONFSYNC
+ { "flushonfsync", 0, 0, MS_FLUSHONFSYNC }, /* Force block device flush on
+ fsync()/fdatasync() */
+ { "noflushonfsync", 0, 1, MS_FLUSHONFSYNC }, /* Do not force block device
+ flush on
+ fsync()/fdatasync() */
+#endif
{ "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
{ NULL, 0, 0, 0 }
};
diff -urp mount-orig/mount_constants.h mount/mount_constants.h
--- mount-orig/mount_constants.h 2008-04-22 17:59:53.000000000 +0900
+++ mount/mount_constants.h 2009-01-29 13:40:42.000000000 +0900
@@ -56,6 +56,10 @@
#ifndef MS_SHARED
#define MS_SHARED (1<<20) /* 1048576 Shared*/
#endif
+#ifndef MS_FLUSHONFSYNC
+#define MS_FLUSHONFSYNC (1<<24) /* Force block device flush on
+ fsync()/fdatasync() */
+#endif
/*
* Magic mount flag number. Had to be or-ed to the flag values.
*/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists