xfs
[Top] [All Lists]

Re: [PATCH v2 02/10] xfs: consolidate xfs_bulkstat_single

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 02/10] xfs: consolidate xfs_bulkstat_single
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 22 Apr 2014 09:52:49 +1000
Cc: Jeff Liu <jeff.liu@xxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140421141148.GA27064@xxxxxxxxxxxxx>
References: <535078AD.5050209@xxxxxxxxxx> <20140421141148.GA27064@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Apr 21, 2014 at 07:11:48AM -0700, Christoph Hellwig wrote:
> On Fri, Apr 18, 2014 at 08:58:21AM +0800, Jeff Liu wrote:
> > From: Jie Liu <jeff.liu@xxxxxxxxxx>
> > 
> > In xfs_bulkstat_single(), call xfs_bulkstat_one() and xfs_bulkstat()
> > would return different error if either failed, we'd better return the
> > proper error in this case.  Moreover, the function argument done is
> > useless in terms of xfs_ioc_bulkstat(), hence we can get rid of it.
> 
> I've looked at xfs_bulkstat_single I really can't see how falling back
> to the full xfs_bulkstat could fix any error.  We probably should just
> get rid of the fallback and instead do something like the (lightly tested)
> patch below:
> 
> ---
> From: Christoph Hellwig <hch@xxxxxx>
> Subject: xfs: remove xfs_bulkstat_single
> 
> xfs_bukstat_one doesn't have any failure case that would go away when
> called through xfs_bulkstat, so remove the fallback and the now unessecary
> xfs_bulkstat_single function.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

*nod*

I like this approach :)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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