public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] xfs: don't truncate attribute extents if no extents exist
Date: Fri, 19 Jun 2015 11:45:23 -0400	[thread overview]
Message-ID: <20150619154522.GH12833@bfoster.bfoster> (raw)
In-Reply-To: <20150619151421.GC22842@infradead.org>

On Fri, Jun 19, 2015 at 08:14:21AM -0700, Christoph Hellwig wrote:
> > A '-p 2' fsstress run to ENOSPC on a relatively small fs (1GB)
> > reproduces these problems.
> 
> Any chance to add this test case to xfstests?
> 

I think so. I'll look into it.

> >  	/* invalidate and truncate the attribute fork extents */
> > -	if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
> > +	if (xfs_inode_hasattr(dp) &&
> > +	    dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
> 
> And please add a comment describing the condition here, especially
> as xfs_inode_hasattr doesn't have a very descriptive name.
> 

How about this?

        /*
         * Invalidate and truncate the attribute fork extents. Make sure the
         * fork actually has attributes as otherwise the invalidation has no
         * blocks to read and returns an error. In this case, just do the fork
         * removal below.
         */

Brian

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

  reply	other threads:[~2015-06-19 15:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 12:48 [PATCH 0/2] xfs: misc. attribute and log recovery fixes Brian Foster
2015-06-18 12:49 ` [PATCH 1/2] xfs: don't truncate attribute extents if no extents exist Brian Foster
2015-06-19 15:14   ` Christoph Hellwig
2015-06-19 15:45     ` Brian Foster [this message]
2015-06-21  9:22       ` Christoph Hellwig
2015-06-22 13:38   ` [PATCH v2] " Brian Foster
2015-06-18 12:49 ` [PATCH 2/2] xfs: validate transaction header length on log recovery Brian Foster
2015-06-21  9:27   ` Christoph Hellwig
2015-06-21 20:25     ` Brian Foster
2015-06-21 23:05       ` Dave Chinner
2015-06-22 13:59         ` Brian Foster

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=20150619154522.GH12833@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=hch@infradead.org \
    --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