cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2] Don't flush everything on fdatasync [70/70]
@ 2006-11-30 12:24 Steven Whitehouse
  2006-12-01  7:01 ` [Cluster-devel] " Andrew Morton
  0 siblings, 1 reply; 15+ messages in thread
From: Steven Whitehouse @ 2006-11-30 12:24 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From 33c3de32872ef3c075e4dac04c0de8f86ac39f6f Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Thu, 30 Nov 2006 10:14:32 -0500
Subject: [PATCH] [GFS2] Don't flush everything on fdatasync

The gfs2_fsync() function was doing a journal flush on each
and every call. While this is correct, its also a lot of
overhead. This patch means that on fdatasync flushes we
rely on the VFS to flush the data for us and we don't do
a journal flush unless we really need to.

We have to do a journal flush for stuffed files though because
they have the data and the inode metadata in the same block.
Journaled files also need a journal flush too of course.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
 fs/gfs2/ops_file.c |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index c2be216..7bd971b 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -22,6 +22,7 @@ #include <linux/gfs2_ondisk.h>
 #include <linux/ext2_fs.h>
 #include <linux/crc32.h>
 #include <linux/lm_interface.h>
+#include <linux/writeback.h>
 #include <asm/uaccess.h>
 
 #include "gfs2.h"
@@ -503,16 +504,39 @@ static int gfs2_close(struct inode *inod
  * @file: the file that points to the dentry (we ignore this)
  * @dentry: the dentry that points to the inode to sync
  *
+ * The VFS will flush "normal" data for us. We only need to worry
+ * about metadata here. For journaled data, we just do a log flush
+ * as we can't avoid it. Otherwise we can just bale out if datasync
+ * is set. For stuffed inodes we must flush the log in order to
+ * ensure that all data is on disk.
+ *
  * Returns: errno
  */
 
 static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync)
 {
-	struct gfs2_inode *ip = GFS2_I(dentry->d_inode);
+	struct inode *inode = dentry->d_inode;
+	int sync_state = inode->i_state & (I_DIRTY_SYNC|I_DIRTY_DATASYNC);
+	int ret = 0;
+	struct writeback_control wbc = {
+		.sync_mode = WB_SYNC_ALL,
+		.nr_to_write = 0,
+	};
+
+	if (gfs2_is_jdata(GFS2_I(inode))) {
+		gfs2_log_flush(GFS2_SB(inode), GFS2_I(inode)->i_gl);
+		return 0;
+	}
 
-	gfs2_log_flush(ip->i_gl->gl_sbd, ip->i_gl);
+	if (sync_state != 0) {
+		if (!datasync)
+			ret = sync_inode(inode, &wbc);
 
-	return 0;
+		if (gfs2_is_stuffed(GFS2_I(inode)))
+			gfs2_log_flush(GFS2_SB(inode), GFS2_I(inode)->i_gl);
+	}
+
+	return ret;
 }
 
 /**
-- 
1.4.1





^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [Cluster-devel] [GFS2 & DLM] Proposed patches for 2.6.20 merge window [0/54]
@ 2007-02-05 14:07 Steven Whitehouse
  2007-02-07 13:20 ` [Cluster-devel] [GFS2 & DLM] Pull request Steven Whitehouse
  0 siblings, 1 reply; 15+ messages in thread
From: Steven Whitehouse @ 2007-02-05 14:07 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Following this message are the patches which currently make up the GFS2
-nmw (next merge window) git tree. Mostly they are bug fixes and clean
ups, but there are one or two other changes, the highlights being:

 [26/54] Changes "writeback" mounts to not require buffer heads in
writepages and also results in fewer I/Os.
 [29/54] This is probably the most notable since it effectively shrinks
the amount of memory per struct gfs2_inode by half.
 [27/54] Removes the attempt at directory readahead in readdir and
results in a substantial speed improvement for readdir without noticably
slowing readdir+stat performance.

Steve.




^ permalink raw reply	[flat|nested] 15+ messages in thread
* [Cluster-devel] [DLM] Fix compile warning [1/2]
@ 2006-12-18  9:54 Steven Whitehouse
  2006-12-18  9:57 ` [Cluster-devel] [GFS2] Fix Kconfig [2/2] Steven Whitehouse
  0 siblings, 1 reply; 15+ messages in thread
From: Steven Whitehouse @ 2006-12-18  9:54 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From c80e7c83d56866a735236b45441f024b589f9e88 Mon Sep 17 00:00:00 2001
From: Patrick Caulfield <pcaulfie@redhat.com>
Date: Fri, 8 Dec 2006 14:31:12 -0500
Subject: [PATCH] [DLM] fix compile warning

This patch fixes a compile warning in lowcomms-tcp.c indicating that
kmem_cache_t is deprecated.

Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
 fs/dlm/lowcomms-tcp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c
index 8f2791f..9be3a44 100644
--- a/fs/dlm/lowcomms-tcp.c
+++ b/fs/dlm/lowcomms-tcp.c
@@ -143,7 +143,7 @@ static DECLARE_WAIT_QUEUE_HEAD(lowcomms_
 /* An array of pointers to connections, indexed by NODEID */
 static struct connection **connections;
 static DECLARE_MUTEX(connections_lock);
-static kmem_cache_t *con_cache;
+static struct kmem_cache *con_cache;
 static int conn_array_size;
 
 /* List of sockets that have reads pending */
-- 
1.4.1





^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [Cluster-devel] [GFS2 & DLM] Pull request
@ 2006-11-24  9:42 Steven Whitehouse
  0 siblings, 0 replies; 15+ messages in thread
From: Steven Whitehouse @ 2006-11-24  9:42 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Please consider pulling the following GFS2 & DLM bug fixes. The DLM fixes have
all been very well tested and in addition have been in -mm for some time. The
GFS2 fixes are both trivial "one liners" and have also been in -mm for a little
while,

Steve.

The following changes since commit 1abbfb412b1610ec3a7ec0164108cee01191d9f5:
  Mel Gorman:
        x86_64: fix bad page state in process 'swapper'

are found in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git

David Teigland:
      [DLM] res_recover_locks_count not reset when recover_locks is aborted
      [DLM] status messages ping-pong between unmounted nodes
      [DLM] fix requestqueue race
      [DLM] fix aborted recovery during node removal
      [DLM] fix stopping unstarted recovery
      [DLM] do full recover_locks barrier
      [DLM] clear sbflags on lock master

Steven Whitehouse:
      [GFS2] Fix Kconfig wrt CRC32
      [GFS2] Fix memory allocation in glock.c

 fs/dlm/lock.c         |   16 ++++++++++++----
 fs/dlm/member.c       |    8 ++++++++
 fs/dlm/rcom.c         |    7 ++++---
 fs/dlm/recover.c      |    1 +
 fs/dlm/recoverd.c     |   20 +++++++++++++++++++-
 fs/dlm/requestqueue.c |   21 +++++++++++++++++----
 fs/dlm/requestqueue.h |    2 +-
 fs/gfs2/Kconfig       |    1 +
 fs/gfs2/glock.c       |    2 +-
 9 files changed, 64 insertions(+), 14 deletions(-)




^ permalink raw reply	[flat|nested] 15+ messages in thread
* [Cluster-devel] [GFS2 & DLM] Pull request
@ 2006-11-06 11:13 Steven Whitehouse
  0 siblings, 0 replies; 15+ messages in thread
From: Steven Whitehouse @ 2006-11-06 11:13 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Please consider pulling the following GFS2 & DLM bug fixes,

Steve.

The following changes since commit d1ed6a3ea10aa7b199c434f6ffd1b6761896567a:
  Linus Torvalds:
        Merge master.kernel.org:/.../davem/net-2.6

are found in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git

Alexey Dobriyan:
      [GFS2] don't panic needlessly

Patrick Caulfield:
      [DLM] Fix kref_put oops
      [DLM] fix oops in kref_put when removing a lockspace

Steven Whitehouse:
      [GFS2] Fix incorrect fs sync behaviour.
      [GFS2] Fix OOM error handling

 fs/dlm/lockspace.c  |   14 +++++++++++++-
 fs/gfs2/inode.c     |    3 +++
 fs/gfs2/main.c      |    4 ++--
 fs/gfs2/ops_super.c |   44 ++++++++++++++++++++++++++++----------------
 4 files changed, 46 insertions(+), 19 deletions(-)




^ permalink raw reply	[flat|nested] 15+ messages in thread
* [Cluster-devel] [GFS2 & DLM] Pull request
@ 2006-10-20  9:24 Steven Whitehouse
  0 siblings, 0 replies; 15+ messages in thread
From: Steven Whitehouse @ 2006-10-20  9:24 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Please consider pulling the following changes from the GFS2 -fixes git tree,

Steve.

-----------------------------------------------------------------------------------------
The following changes since commit ce9e3d9953c8cb67001719b5516da2928e956be4:
  Linus Torvalds:
        Merge branch 'ubuntu-updates' of master.kernel.org:/.../bcollins/ubuntu-2.6

are found in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes.git

Adrian Bunk:
      [GFS2] fs/gfs2/dir.c:gfs2_dir_write_data(): remove dead code
      [GFS2] fs/gfs2/ops_fstype.c:gfs2_get_sb_meta(): remove unused variable
      [GFS2] fs/gfs2/dir.c:gfs2_dir_write_data(): don't use an uninitialized variable
      [GFS2] fs/gfs2/ops_fstype.c:fill_super_meta(): fix NULL dereference
      [GFS2] gfs2_dir_read_data(): fix uninitialized variable usage

Al Viro:
      [GFS2] gfs2 endianness bug: be16 assigned to be32 field

Patrick Caulfield:
      [DLM] fix iovec length in recvmsg

Steven Whitehouse:
      [GFS2] Fix bmap to map extents properly

 fs/dlm/lowcomms.c     |    1 +
 fs/gfs2/bmap.c        |   13 +++++++------
 fs/gfs2/bmap.h        |    2 +-
 fs/gfs2/dir.c         |   10 +++-------
 fs/gfs2/log.c         |    6 ++++--
 fs/gfs2/ops_address.c |    6 +++---
 fs/gfs2/ops_fstype.c  |    7 ++-----
 fs/gfs2/quota.c       |    5 +++--
 fs/gfs2/recovery.c    |    5 +++--
 9 files changed, 27 insertions(+), 28 deletions(-)




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-02-07 13:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-30 12:24 [Cluster-devel] [GFS2] Don't flush everything on fdatasync [70/70] Steven Whitehouse
2006-12-01  7:01 ` [Cluster-devel] " Andrew Morton
2006-12-01 10:58   ` Steven Whitehouse
2006-12-01 19:09     ` Andrew Morton
2006-12-05 14:36       ` Steven Whitehouse
2006-12-07  9:11       ` Steven Whitehouse
2006-12-07 19:05         ` Wendy Cheng
2006-12-08 10:29           ` Steven Whitehouse
2006-12-08 10:29             ` Steven Whitehouse
2006-12-07 12:17       ` [Cluster-devel] [GFS2 & DLM] Pull request Steven Whitehouse
  -- strict thread matches above, loose matches on Subject: below --
2007-02-05 14:07 [Cluster-devel] [GFS2 & DLM] Proposed patches for 2.6.20 merge window [0/54] Steven Whitehouse
2007-02-07 13:20 ` [Cluster-devel] [GFS2 & DLM] Pull request Steven Whitehouse
2006-12-18  9:54 [Cluster-devel] [DLM] Fix compile warning [1/2] Steven Whitehouse
2006-12-18  9:57 ` [Cluster-devel] [GFS2] Fix Kconfig [2/2] Steven Whitehouse
2006-12-18 10:01   ` [Cluster-devel] [GFS2 & DLM] Pull request Steven Whitehouse
2006-11-24  9:42 Steven Whitehouse
2006-11-06 11:13 Steven Whitehouse
2006-10-20  9:24 Steven Whitehouse

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).