All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: mpatocka@redhat.com, xfs@oss.sgi.com
Subject: Re: [PATCH 2/5] [XFS] Make inode flush at ENOSPC synchronous
Date: Mon, 16 Mar 2009 21:46:06 +1100	[thread overview]
Message-ID: <20090316104606.GI26138@disturbed> (raw)
In-Reply-To: <20090316091235.GB2636@infradead.org>

On Mon, Mar 16, 2009 at 05:12:35AM -0400, Christoph Hellwig wrote:
> On Sun, Mar 15, 2009 at 10:31:44PM +1100, Dave Chinner wrote:
> >  	} else {
> > +		int enospc = 0;
> > +		ssize_t ret2 = 0;
> > +
> > +write_retry:
> >  		xfs_rw_enter_trace(XFS_WRITE_ENTER, xip, (void *)iovp, segs,
> >  				*offset, ioflags);
> > -		ret = generic_file_buffered_write(iocb, iovp, segs,
> > +		ret2 = generic_file_buffered_write(iocb, iovp, segs,
> >  				pos, offset, count, ret);
> > +		/*
> > +		 * if we just got an ENOSPC, flush the inode now we
> > +		 * aren't holding any page locks and retry *once*
> > +		 */
> > +		if (ret2 == -ENOSPC && !enospc) {
> > +			error = xfs_flush_pages(xip, 0, -1, 0, FI_NONE);
> > +			if (error)
> > +				goto out_unlock_internal;
> > +			enospc = 1;
> > +			goto write_retry;
> > +		}
> > +		ret = ret2;
> 
> Just use filemap_fdatawrite here directly..

OK. will fix.

-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2009-03-16 10:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-15 11:31 [PATCH 0/5, RESEND] [XFS] Spurious ENOSPC fixes Dave Chinner
2009-03-15 11:31 ` [PATCH 1/5] [XFS] Use xfs_sync_inodes() for device flushing Dave Chinner
2009-03-16  9:08   ` Christoph Hellwig
2009-03-16 10:45     ` Dave Chinner
2009-03-15 11:31 ` [PATCH 2/5] [XFS] Make inode flush at ENOSPC synchronous Dave Chinner
2009-03-16  9:12   ` Christoph Hellwig
2009-03-16 10:46     ` Dave Chinner [this message]
2009-03-15 11:31 ` [PATCH 3/5] [XFS] Block callers of xfs_flush_inodes() correctly Dave Chinner
2009-03-16  9:13   ` Christoph Hellwig
2009-03-16 10:27     ` Dave Chinner
2009-03-17 13:15     ` Mikulas Patocka
2009-03-15 11:31 ` [PATCH 4/5] [XFS] Flush delayed allcoation blocks on ENOSPC in create Dave Chinner
2009-03-16  9:14   ` Christoph Hellwig
2009-03-15 11:31 ` [PATCH 5/5] [XFS] Remove xfs_flush_space Dave Chinner
2009-03-16  9:15   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2009-03-15 10:57 [PATCH 0/5] [XFS] Spurious ENOSPC fixes Dave Chinner
2009-03-15 10:57 ` [PATCH 2/5] [XFS] Make inode flush at ENOSPC synchronous 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=20090316104606.GI26138@disturbed \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=mpatocka@redhat.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.