| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfs: truncate_setsize should be outside transactions |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Thu, 1 May 2014 22:00:53 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20140502045443.GA8867@xxxxxxxxxxxxx> |
| References: | <1398983979-23696-1-git-send-email-david@xxxxxxxxxxxxx> <20140502045443.GA8867@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Thu, May 01, 2014 at 09:54:43PM -0700, Christoph Hellwig wrote:
> On Fri, May 02, 2014 at 08:39:39AM +1000, Dave Chinner wrote:
> > This issue with xfs_setattr_size() was introduced back in 2010 by
> > commit fa9b227 ("xfs: new truncate sequence") which moved the page
> > cache truncate from outside the transaction context (what was
> > xfs_itruncate_data()) to inside the transaction context as a call to
> > truncate_setsize().
>
> And it was moved because we should only call truncate_setsize once
> the truncate can't fail any more. So to move it out of transaction
> context it needs to move after the commit of the transaction(s).
Actually that's only true for the i_size update. So I guess
we need to call truncate_pagecache were you put the truncate_setsize
now, and then update i_size later, together with the updates of the
XFS di_size.
|
| Previous by Date: | Re: [PATCH] xfs: truncate_setsize should be outside transactions, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH] xfs: truncate_setsize should be outside transactions, Dave Chinner |
| Previous by Thread: | Re: [PATCH] xfs: truncate_setsize should be outside transactions, Christoph Hellwig |
| Next by Thread: | Re: [PATCH] xfs: truncate_setsize should be outside transactions, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |