From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Liu <jeff.liu@oracle.com>, "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH v2 05/10] xfs: fix error handling in xfs_bulkstat
Date: Mon, 28 Apr 2014 07:26:44 +1000 [thread overview]
Message-ID: <20140427212643.GY18672@dastard> (raw)
In-Reply-To: <20140425064815.GB20871@infradead.org>
On Thu, Apr 24, 2014 at 11:48:15PM -0700, Christoph Hellwig wrote:
> > Moreover, this fix also get rid of the redundant user buffer count
> > pre-checkups as it has already been validated in upper callers.
>
> > - if (!ubcountp || *ubcountp <= 0) {
> > - return EINVAL;
> > - }
>
> Probably better to have this as a separate patch.
>
> > - /*
> > - * Loop as long as we're unable to read the
> > - * inode btree.
> > - */
> > - while (error) {
> > - agino += XFS_INODES_PER_CHUNK;
> > - if (XFS_AGINO_TO_AGBNO(mp, agino) >=
> > - be32_to_cpu(agi->agi_length))
> > - break;
> > - error = xfs_inobt_lookup(cur, agino,
> > - XFS_LOOKUP_GE, &tmp);
> > - cond_resched();
> > - }
>
> This code goes back to 1995, but I still can't see how it would make
> sense. I think we should get rid of this, but I'd also love to have
> Dave and Eric double check it as well.
I can't see it makes much sense, except for handling IO errors
that occur during something like a path failover where a retry would
then succeed. However, I think that we'd do better for userspace to
handle this problem - a short bulkstat followed by userspace retry
rather than a potential endless loop in the kernel is a much better
way to handle the problem...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2014-04-27 21:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 0:58 [PATCH v2 05/10] xfs: fix error handling in xfs_bulkstat Jeff Liu
2014-04-25 6:48 ` Christoph Hellwig
2014-04-25 7:21 ` Jeff Liu
2014-04-27 21:26 ` Dave Chinner [this message]
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=20140427212643.GY18672@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jeff.liu@oracle.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.