All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalpak Shah <kalpak@clusterfs.com>
To: linux-ext4 <linux-ext4@vger.kernel.org>
Cc: Mingming Cao <cmm@us.ibm.com>,
	Andreas Dilger <adilger@clusterfs.com>,
	Jean noel Cordenner <jean-noel.cordenner@bull.net>
Subject: [PATCH 4/6] add noversion mount option
Date: Thu, 14 Jun 2007 21:26:19 +0530	[thread overview]
Message-ID: <1181836579.7779.46.camel@garfield> (raw)
In-Reply-To: <1181835073.7779.9.camel@garfield>

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

This patch adds a "noversion" mount option to disable inode version
updates.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
---
 fs/ext4/inode.c         |    4 +++-
 fs/ext4/super.c         |    6 +++++-
 include/linux/ext4_fs.h |    1 +
 3 files changed, 9 insertions(+), 2 deletions(-)


[-- Attachment #2: ext4_no_version.patch --]
[-- Type: text/x-patch, Size: 2228 bytes --]

Add a "noversion" mount option to disable inode version updates.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>

Index: linux-2.6.21/fs/ext4/super.c
===================================================================
--- linux-2.6.21.orig/fs/ext4/super.c
+++ linux-2.6.21/fs/ext4/super.c
@@ -725,7 +725,7 @@ enum {
 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
-	Opt_grpquota, Opt_extents, Opt_noextents,
+	Opt_grpquota, Opt_extents, Opt_noextents, Opt_noversion,
 };
 
 static match_table_t tokens = {
@@ -777,6 +777,7 @@ static match_table_t tokens = {
 	{Opt_barrier, "barrier=%u"},
 	{Opt_extents, "extents"},
 	{Opt_noextents, "noextents"},
+	{Opt_noversion, "noversion"},
 	{Opt_err, NULL},
 	{Opt_resize, "resize"},
 };
@@ -1115,6 +1116,9 @@ clear_qf_name:
 		case Opt_noextents:
 			clear_opt (sbi->s_mount_opt, EXTENTS);
 			break;
+		case Opt_noversion:
+			set_opt(sbi->s_mount_opt, NOVERSION);
+			break;
 		default:
 			printk (KERN_ERR
 				"EXT4-fs: Unrecognized mount option \"%s\" "
Index: linux-2.6.21/include/linux/ext4_fs.h
===================================================================
--- linux-2.6.21.orig/include/linux/ext4_fs.h
+++ linux-2.6.21/include/linux/ext4_fs.h
@@ -473,6 +473,7 @@ do {									       \
 #define EXT4_MOUNT_USRQUOTA		0x100000 /* "old" user quota */
 #define EXT4_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
 #define EXT4_MOUNT_EXTENTS		0x400000 /* Extents support */
+#define EXT4_MOUNT_NOVERSION		0x800000 /* No inode version updates */
 
 /* Compatibility, for having both ext2_fs.h and ext4_fs.h included at once */
 #ifndef _LINUX_EXT2_FS_H
Index: linux-2.6.21/fs/ext4/inode.c
===================================================================
--- linux-2.6.21.orig/fs/ext4/inode.c
+++ linux-2.6.21/fs/ext4/inode.c
@@ -3082,7 +3082,9 @@ int ext4_mark_iloc_dirty(handle_t *handl
 {
 	int err = 0;
 
-	inode->i_version++;
+	if (!test_opt(inode->i_sb, NOVERSION))
+		inode->i_version++;
+
 	/* the do_update_inode consumes one bh->b_count */
 	get_bh(iloc->bh);
 

  parent reply	other threads:[~2007-06-14 15:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1181835073.7779.9.camel@garfield>
2007-06-14 15:56 ` [PATCH 1/6] Separated 64-bit i_version patch Kalpak Shah
2007-06-14 20:58   ` Mingming Cao
2007-06-14 21:41     ` Andreas Dilger
2007-06-14 15:56 ` [PATCH 2/6] add i_version_hi to ext4_inode Kalpak Shah
2007-06-14 15:56 ` [PATCH 3/6] Changes for 64-bit i_version Kalpak Shah
2007-06-14 15:56 ` Kalpak Shah [this message]
2007-06-14 20:50   ` [PATCH 4/6] add noversion mount option Mingming Cao
2007-06-14 21:42     ` Andreas Dilger
2007-06-14 21:52     ` Kalpak Shah
2007-06-14 22:28       ` Mingming Cao
2007-06-14 15:59 ` Kalpak Shah
2007-06-14 15:59 ` [PATCH 5/6] VFS updates to i_version Kalpak Shah
2007-06-14 15:59 ` [PATCH 6/6] Updated series file Kalpak Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1181836579.7779.46.camel@garfield \
    --to=kalpak@clusterfs.com \
    --cc=adilger@clusterfs.com \
    --cc=cmm@us.ibm.com \
    --cc=jean-noel.cordenner@bull.net \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.