xfs
[Top] [All Lists]

Re: [PATCH 1/7] xfs: let iop_format write directly into the linear buffe

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/7] xfs: let iop_format write directly into the linear buffer
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 25 Nov 2013 22:02:48 -0800
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131125204525.GF8803@dastard>
References: <20131123151151.716201348@xxxxxxxxxxxxxxxxxxxxxx> <20131123151533.726941044@xxxxxxxxxxxxxxxxxxxxxx> <20131125091527.GD8803@dastard> <20131125133755.GB21992@xxxxxxxxxxxxx> <20131125204525.GF8803@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Nov 26, 2013 at 07:45:25AM +1100, Dave Chinner wrote:
> I think the current code could be changed first, just to remove the
> special cases (i.e. the ifdef NATIVE_HOST/else conditionals) by
> always calling xfs_inode_item_format_extents(). That's easy enough
> to do and then the iop_format change can simple change it to calling
> xfs_iextent_copy() directly...

Ok, I can do that.

> I'd prefer to have a helper than have the same boilerplate code
> repeated 14 times purely from a maintenance POV. It's easy to find
> all the callers, it's easy to check that they do the right thing,
> and in future there's only one piece of code to modify for all the
> simple log item formatting operations....

I'll resent with it re-added.  The reason it confused me is that only
the len argument ever got used twice in the helper, otherwise it's
just a bunch of assignment using a disjoint arguments.

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