xfs
[Top] [All Lists]

Re: [RFC PATCH 4/4] xfs: implement parallism quota check

To: Jeff Liu <jeff.liu@xxxxxxxxxx>
Subject: Re: [RFC PATCH 4/4] xfs: implement parallism quota check
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 18 Nov 2013 03:04:49 -0800
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5288BE14.1050302@xxxxxxxxxx>
References: <5281F527.3040200@xxxxxxxxxx> <20131115172626.GD16942@xxxxxxxxxxxxx> <5288BE14.1050302@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sun, Nov 17, 2013 at 09:01:08PM +0800, Jeff Liu wrote:
> On 11/16 2013 01:26 AM, Christoph Hellwig wrote:
> > As Dave pointed out this really should be xfs_bukstat_ag.  But looking
> > at the code you're almost 90% there anyway.
> One main reason I did not make a per ag bulkstat is because bulkstat() will
> skip an allocation group if read agi buffer failed, i.e,
> 
> while (XFS_BULKSTAT_UBLEFT(ubleft) && agno < mp->m_sb.sb_agcount) {
>       cond_resched();
>       error = xfs_ialloc_read_agi(mp, NULL, agno, &agbp);
>       if (error) {
>               /*
>                * Skip this allocation group and go to the next one.
>                */
>               agno++;
>                 agino = 0;
>               continue;
>       }
>       ....
> }
>
> Should it capture this issue and drop a warning in this case?

I've been thinking hard about this, but I can't really see any reason
why we would skip an AG instead of propagating the error.  The only
error xfs_ialloc_read_agi can return is an I/O error from reading
the buffer from disk, and we'd really want to propagate that sort
of I/O errror.  I'd suggest a patch at the beginning of the series
to just change that behavior for all the two places in bulkstat that
call xfs_ialloc_read_agi.  None of the other callers seem to behave
this way either.

<Prev in Thread] Current Thread [Next in Thread>