[Top] [All Lists]

Re: [PATCH 24/23] xfs: convert buffer verifiers to an ops structure.

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 24/23] xfs: convert buffer verifiers to an ops structure.
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 24 Oct 2012 08:42:15 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121023123646.GJ7341@xxxxxxxxxxxxx>
References: <1350020669-19504-1-git-send-email-david@xxxxxxxxxxxxx> <1350020669-19504-23-git-send-email-david@xxxxxxxxxxxxx> <20121013160212.GA24337@xxxxxxxxxxxxx> <20121014001219.GR2739@dastard> <20121018045028.GQ2739@dastard> <20121023123646.GJ7341@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Oct 23, 2012 at 08:36:47AM -0400, Christoph Hellwig wrote:
> On Thu, Oct 18, 2012 at 03:50:28PM +1100, Dave Chinner wrote:
> > Here's a patch that does this. It adds on top of the series, and
> > points out more changes needed to growfs to support CRC checking
> > properly.
> I like this a lot, and I'm fine with having this at the end of the
> series if it makes your life easier.

Ok, cool, I'll keep it this way for the moment, then. If, for some
reason, I decide I need to rework the series again, I'll reorder it
then, but for now I don't see that happening.

> > -xfs_agfl_write_verify(
> > +xfs_agfl_read_verify(
> >     struct xfs_buf  *bp)
> >  {
> >     xfs_agfl_verify(bp);
> >  }
> >  
> >  static void
> > -xfs_agfl_read_verify(
> > +xfs_agfl_write_verify(
> >     struct xfs_buf  *bp)
> >  {
> >     xfs_agfl_verify(bp);
> > -   bp->b_pre_io = xfs_agfl_write_verify;
> > -   bp->b_iodone = NULL;
> > -   xfs_buf_ioend(bp, 0);
> >  }
> Any good reason to keep all these no-op wrappers?

I can remove them, but I'd just have to re-introduce them when CRC
checking is added. i.e. read will need to verify the CRC, write will
need to calculate it and inserting the value.

I don't mind either way at this point - I already had them so I kept
them in place, but it's relatively easy to remove them from this
patch and reapply them later (i.e. just add a temporary patch to the
series to remove them, copy it away, fold the temp patch into this
one so that this patch removes them, then later on reverse apply the
tmp patch to re-introduce the wrappers).

Either way, the read/write verifier functions will be there in the
end. ;)


Dave Chinner

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