All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ben Myers <bpm@sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues
Date: Thu, 17 Nov 2011 02:40:03 -0500	[thread overview]
Message-ID: <20111117074003.GC3733@infradead.org> (raw)
In-Reply-To: <20111116190120.GG29840@sgi.com>

On Wed, Nov 16, 2011 at 01:01:20PM -0600, Ben Myers wrote:
> On Tue, Nov 15, 2011 at 03:14:09PM -0500, Christoph Hellwig wrote:
> > commit 77d7a0c "xfs: Non-blocking inode locking in IO completion" introduced
> > a trylocked and defer scheme in xfs_setfilesize to avoid deadlocks when on
> > XFS filesystem is used ontop of another using the loop device, and we
> > fsync in the loop filesystem.
> > 
> > Now that we have the cheap enough concurrency managed workqueues, we can
> > create per-filesystem instead of global workqueues and remove this scheme
> > again, given that it has the potential of delaying size updates and is not
> > helpful once we start to log the inode size.
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> ...
> 
> >  /*
> > @@ -168,10 +161,12 @@ xfs_finish_ioend(
> >  	struct xfs_ioend	*ioend)
> >  {
> >  	if (atomic_dec_and_test(&ioend->io_remaining)) {
> > +		struct xfs_mount	*mp = XFS_I(ioend->io_inode)->i_mount;
> > +
> >  		if (ioend->io_type == IO_UNWRITTEN)
> > -			queue_work(xfsconvertd_workqueue, &ioend->io_work);
> > +			queue_work(mp->m_unwritten_workqueue, &ioend->io_work);
> >  		else if (xfs_ioend_is_append(ioend))
> 
> I wonder if we could skip size updates due to the 'fast and loose'
> nature of xfs_ioend_is_append, and end up destroying the ioend below,
> without updating the file size.  It's not strictly related to your patch
> though.

No - xfs_ioend_is_append check that the offset is beyond the on-disk
inode size.  The loose part is that we don't bother with the in-core
i_size and i_new_size which could change due to I/O errors.  di_size
on the other hand will only go downwards during truncate, and we make
sure all outstanding buffered I/Os have finished first.

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

  reply	other threads:[~2011-11-17  7:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 20:14 [PATCH 0/5] for-3.2 queue Christoph Hellwig
2011-11-15 20:14 ` [PATCH 1/5] [PATCH] xfs: fix attr2 vs large data fork assert Christoph Hellwig
2011-11-16 23:15   ` Dave Chinner
2011-11-17  7:30     ` Christoph Hellwig
2011-11-29 18:48       ` Ben Myers
2011-11-29 18:55         ` Christoph Hellwig
2011-11-19 17:44   ` [PATCH v2] " Christoph Hellwig
2011-11-15 20:14 ` [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues Christoph Hellwig
2011-11-16 19:01   ` Ben Myers
2011-11-17  7:40     ` Christoph Hellwig [this message]
2011-11-16 23:24   ` Dave Chinner
2011-11-17  7:25     ` Christoph Hellwig
2011-11-15 20:14 ` [PATCH 3/5] xfs: do not require an ioend for new EOF calculation Christoph Hellwig
2011-11-16 18:09   ` Ben Myers
2011-11-16 23:28   ` Dave Chinner
  -- strict thread matches above, loose matches on Subject: below --
2011-11-08  8:56 [PATCH 0/5] log all file size updates Christoph Hellwig
2011-11-08  8:56 ` [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues Christoph Hellwig
2011-11-08 23:11   ` Dave Chinner
2011-11-09  7:58     ` Christoph Hellwig
2011-11-10 17:42       ` Ben Myers
2011-11-14 10:34         ` Christoph Hellwig
2011-11-14 10:34           ` Christoph Hellwig
2011-11-14 18:13           ` Tejun Heo
2011-11-14 18:13             ` Tejun Heo

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=20111117074003.GC3733@infradead.org \
    --to=hch@infradead.org \
    --cc=bpm@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 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.