public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Mark Tinguely <tinguely@sgi.com>
Cc: Dave Chinner <dchinner@redhat.com>, xfs@oss.sgi.com
Subject: Re: [patch v4 06/13] [PATCH 06/13] xfs: xfs_sync_data is redundant.
Date: Fri, 5 Oct 2012 13:04:46 -0500	[thread overview]
Message-ID: <20121005180446.GN25175@sgi.com> (raw)
In-Reply-To: <506F1F21.6000104@sgi.com>

Hey Mark,

On Fri, Oct 05, 2012 at 12:55:45PM -0500, Mark Tinguely wrote:
> On 10/05/12 12:18, Ben Myers wrote:
> >Index: xfs/fs/xfs/xfs_mount.h
> >===================================================================
> >--- xfs.orig/fs/xfs/xfs_mount.h
> >+++ xfs/fs/xfs/xfs_mount.h
> >@@ -198,7 +198,6 @@ typedef struct xfs_mount {
> >  #endif
> >  	struct xfs_mru_cache	*m_filestream;  /* per-mount filestream data */
> >  	struct delayed_work	m_reclaim_work;	/* background inode reclaim */
> >-	struct work_struct	m_flush_work;	/* background inode flush */
> >  	__int64_t		m_update_flags;	/* sb flags we need to update
> >  						   on the next remount,rw */
> >  	struct shrinker		m_inode_shrink;	/* inode reclaim shrinker */
> >@@ -381,6 +380,27 @@ extern int	xfs_dev_is_read_only(struct x
> >
> >  extern void	xfs_set_low_space_thresholds(struct xfs_mount *);
> >
> >+/*
> >+ * Flush all dirty data to disk. Must not be called while holding an XFS_ILOCK
> >+ * or a page lock.
> >+ *
> >+ * We have to hold the s_umount lock here, but because this call can nest
> >+ * inside i_mutex (the parent directory in the create case, held by the VFS),
> >+ * we have to use down_read_trylock() to avoid potential deadlocks. In
> >+ * practice, this trylock will succeed on almost every attempt as
> >+ * unmount/remount type operations are exceedingly rare.
> >+ */
> >+static inline void
> >+xfs_flush_inodes(struct xfs_mount *mp)
> >+{
> >+	struct super_block *sb = mp->m_super;
> >+
> >+	if (down_read_trylock(&sb->s_umount)) {
> >+		sync_inodes_sb(sb);
> >+		up_read(&sb->s_umount);
> >+	}
> >+}
> >+
> 
> 
> Was this suppose to be in xfs_inode.h? Otherwise....

Christoph suggested that xfs_flush_inodes should take an xfs_mount instead of
an inode.  It is operating on the super_block level to flush multiple inodes
rather than the single inode whose pointer was passed in, so I moved it from
xfs_inode.h to xfs_mount.h.

Regards,
	Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-10-05 18:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 17:18 [patch v4 00/13] xfs: remove the xfssyncd mess Ben Myers
2012-10-05 17:18 ` [patch v4 01/13] [PATCH 01/13] xfs: xfs_syncd_stop must die Ben Myers
2012-10-05 17:18 ` [patch v4 02/13] [PATCH 02/13] xfs: rationalise xfs_mount_wq users Ben Myers
2012-10-05 17:18 ` [patch v4 03/13] [PATCH 03/13] xfs: dont run the sync work if the filesystem is Ben Myers
2012-10-05 17:18 ` [patch v4 04/13] [PATCH 04/13] xfs: sync work is now only periodic log work Ben Myers
2012-10-05 18:16   ` Christoph Hellwig
2012-10-05 18:31     ` Mark Tinguely
2012-10-05 17:18 ` [patch v4 05/13] [PATCH 05/13] xfs: Bring some sanity to log unmounting Ben Myers
2012-10-05 17:18 ` [patch v4 06/13] [PATCH 06/13] xfs: xfs_sync_data is redundant Ben Myers
2012-10-05 17:55   ` Mark Tinguely
2012-10-05 18:04     ` Ben Myers [this message]
2012-10-05 18:15       ` Christoph Hellwig
2012-10-05 18:15       ` Mark Tinguely
2012-10-05 17:19 ` [patch v4 07/13] [PATCH 07/13] xfs: syncd workqueue is no more Ben Myers
2012-10-05 17:59   ` Mark Tinguely
2012-10-05 17:19 ` [patch v4 08/13] [PATCH 08/13] xfs: xfs_sync_fsdata is redundant Ben Myers
2012-10-05 17:19 ` [patch v4 09/13] [PATCH 09/13] xfs: move xfs_quiesce_attr() into xfs_super.c Ben Myers
2012-10-05 17:19 ` [patch v4 10/13] [PATCH 10/13] xfs: xfs_quiesce_attr() should quiesce the log like Ben Myers
2012-10-05 17:19 ` [patch v4 11/13] [PATCH 11/13] xfs: rename xfs_sync.[ch] to xfs_icache.[ch] Ben Myers
2012-10-05 17:19 ` [patch v4 12/13] [PATCH 12/13] xfs: move inode locking functions to xfs_inode.c Ben Myers
2012-10-05 17:19 ` [patch v4 13/13] [PATCH 13/13] xfs: remove xfs_iget.c Ben Myers
2012-10-06  1:31 ` [patch v4 00/13] xfs: remove the xfssyncd mess Dave Chinner
2012-10-06 17:37   ` Ben Myers
2012-10-08  0:33     ` Dave Chinner

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=20121005180446.GN25175@sgi.com \
    --to=bpm@sgi.com \
    --cc=dchinner@redhat.com \
    --cc=tinguely@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox