public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/7] xfs: let iop_format write directly into the linear buffer
Date: Tue, 26 Nov 2013 07:45:25 +1100	[thread overview]
Message-ID: <20131125204525.GF8803@dastard> (raw)
In-Reply-To: <20131125133755.GB21992@infradead.org>

On Mon, Nov 25, 2013 at 05:37:55AM -0800, Christoph Hellwig wrote:
> On Mon, Nov 25, 2013 at 08:15:27PM +1100, Dave Chinner wrote:
> > 	- xfs_buf_item_straddle() factoring
> 
> This could probably be split out.
> 
> > 	- removal of the special cases for no endian swapping around
> > 	  xfs_inode_item_format_extents()
> 
> This can only be done after we have the new iop_format, or rather must
> be because the old way doesn't work really well.  I'll have to see if
> it can be a separate one, but it would have to be after the actual
> iop_format change.

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...

> > 	- a separate patch to introduce xlog_first/next/last_iovec(),
> > 	  as I had to find those first to understand how the new
> > 	  code worked
> 
> What's the point of a separate patch if we don't make use of it yet?

The problem I had looking at the patch was that the actual
implementation of critical infrastructure the entire patch relies on
is the last thing in the patch.  I found myself constant scrolling
through the patch to check what the infrastructure changes did and
losing context because of this....

> > 	- a new xlog_copy_iovec() function instead of open coding
> > 	  the same 3 lines of code in 14 different places:
> > 
> > static inline void
> > xlog_copy_iovec(
> > 	struct xfs_log_iovec	*vec,
> > 	void			*src,
> > 	int			len,
> > 	int			type)
> > {
> > 	memcpy(vec->i_addr, src_ptr, len);
> > 	vec->i_len = len;
> > 	vec->i_type = type;
> > }
> 
> I went forth and back between having this a couple of times and found
> having the helper more confusing than not.  If there's enough strong
> opinion to have it I can add it back.

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....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-11-25 20:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-23 15:11 [PATCH 0/7] decouple the in-memory from the on-disk log format Christoph Hellwig
2013-11-23 15:11 ` [PATCH 1/7] xfs: let iop_format write directly into the linear buffer Christoph Hellwig
2013-11-25  9:15   ` Dave Chinner
2013-11-25 13:37     ` Christoph Hellwig
2013-11-25 20:45       ` Dave Chinner [this message]
2013-11-26  6:02         ` Christoph Hellwig
2013-11-23 15:11 ` [PATCH 2/7] xfs: remove the inode log format from the inode log item Christoph Hellwig
2013-11-23 15:11 ` [PATCH 3/7] xfs: remove the dquot log format from the dquot " Christoph Hellwig
2013-11-23 15:11 ` [PATCH 4/7] xfs: remove the quotaoff log format from the quotaoff " Christoph Hellwig
2013-11-23 15:11 ` [PATCH 5/7] xfs: defer EFI and EFD log formatting until iop_format time Christoph Hellwig
2013-11-24  9:18   ` Christoph Hellwig
2013-11-25  8:50     ` Dave Chinner
2013-11-25 13:40       ` Christoph Hellwig
2013-11-23 15:11 ` [PATCH 6/7] xfs: remove efi_next_extent Christoph Hellwig
2013-11-23 15:11 ` [PATCH 7/7] xfs: remove opencoded versions of xfs_bmap_cancel Christoph Hellwig
2013-11-25  8:54 ` [PATCH 0/7] decouple the in-memory from the on-disk log format Dave Chinner
2013-11-25 13:35   ` Christoph Hellwig

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=20131125204525.GF8803@dastard \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox