All of lore.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 5/9] xfs: struct xfs_buf_log_format isn't variable sized.
Date: Wed, 20 Jun 2012 17:01:47 +1000	[thread overview]
Message-ID: <20120620070147.GH30705@dastard> (raw)
In-Reply-To: <20120620063612.GB5467@infradead.org>

On Wed, Jun 20, 2012 at 02:36:12AM -0400, Christoph Hellwig wrote:
> I like this patch with two minor nitpicks below.  Given that it's a mostly
> unrelated cleanup I'd also propagate it to the first patch in the
> series.

it's not unrelated - it makes the multiple buffer support so much
easier to implement it's not funny....

> > +	base_size = sizeof(struct xfs_buf_log_format) -
> > +		    ((XFS_BLF_DATAMAP_SIZE - bip->bli_format.blf_map_size) *
> > +								sizeof(uint));
> 
> I'd really move this calculation and the comment describing it into a
> macro/inline in the header, next to the defintion of struct xfs_buf_log_format.
> 
> Also I'd probably rewrite the expressions as:
> 
> 	offsetoff(struct xfs_buf_log_format, blf_map) +
> 		(blf->blf_map_size * sizeof(blf->blf_data_map[0]));

Yeah, probably cleaner that way...

> >  /*
> > + * Minimum and maximum blocksize and sectorsize.
> > + * The blocksize upper limit is pretty much arbitrary.
> > + * The sectorsize upper limit is due to sizeof(sb_sectsize).
> > + */
> > +#define XFS_MIN_BLOCKSIZE_LOG	9	/* i.e. 512 bytes */
> > +#define XFS_MAX_BLOCKSIZE_LOG	16	/* i.e. 65536 bytes */
> > +#define XFS_MIN_BLOCKSIZE	(1 << XFS_MIN_BLOCKSIZE_LOG)
> > +#define XFS_MAX_BLOCKSIZE	(1 << XFS_MAX_BLOCKSIZE_LOG)
> > +#define XFS_MIN_SECTORSIZE_LOG	9	/* i.e. 512 bytes */
> > +#define XFS_MAX_SECTORSIZE_LOG	15	/* i.e. 32768 bytes */
> > +#define XFS_MIN_SECTORSIZE	(1 << XFS_MIN_SECTORSIZE_LOG)
> > +#define XFS_MAX_SECTORSIZE	(1 << XFS_MAX_SECTORSIZE_LOG)
> 
> While I agree with the move of these constants, what does it have to do
> with this patch?

XFS_MAX_BLOCKSIZE is now needed xfs_buf_item.h, so rather than
introduce a dependency on xfs_alloc_btree.h, I moved them to where
the other limits are defined (i.e. xfs_types.h).

Cheers,

dave.

-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2012-06-20  7:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08  5:38 [PATCH 0/9] xfs: discontiguous directory buffer support Dave Chinner
2012-06-08  5:38 ` [PATCH 1/9] xfs: separate buffer indexing from block map Dave Chinner
2012-06-18 20:39   ` Ben Myers
2012-06-20  6:44   ` Christoph Hellwig
2012-06-20  7:36     ` Dave Chinner
2012-06-08  5:38 ` [PATCH 2/9] xfs: convert internal buffer functions to pass maps Dave Chinner
2012-06-18 20:43   ` Ben Myers
2012-06-18 21:07     ` Ben Myers
2012-06-19  7:15       ` Christoph Hellwig
2012-06-19 15:59         ` Ben Myers
2012-06-19 17:03           ` Christoph Hellwig
2012-06-19 17:11             ` Ben Myers
2012-06-20  5:56               ` Dave Chinner
2012-06-20  6:04                 ` Christoph Hellwig
2012-06-20  6:29                   ` Dave Chinner
2012-06-20  6:46                     ` Dave Chinner
2012-06-20 15:39                       ` Ben Myers
2012-06-20 15:36                     ` Ben Myers
2012-06-20 23:04                       ` Dave Chinner
2012-06-20  6:35                   ` Dave Chinner
2012-06-20 15:48                     ` Ben Myers
2012-06-20  6:29               ` Christoph Hellwig
2012-06-20  6:37                 ` Dave Chinner
2012-06-20 15:51                   ` Ben Myers
2012-06-20  6:48   ` Christoph Hellwig
2012-06-22  6:48     ` Dave Chinner
2012-06-08  5:38 ` [PATCH 3/9] xfs: add discontiguous buffer map interface Dave Chinner
2012-06-20  6:53   ` Christoph Hellwig
2012-06-08  5:38 ` [PATCH 4/9] xfs: add discontiguous buffer support to transactions Dave Chinner
2012-06-20  6:54   ` Christoph Hellwig
2012-06-08  5:38 ` [PATCH 5/9] xfs: struct xfs_buf_log_format isn't variable sized Dave Chinner
2012-06-20  6:36   ` Christoph Hellwig
2012-06-20  7:01     ` Dave Chinner [this message]
2012-06-20  7:05       ` Christoph Hellwig
2012-06-08  5:38 ` [PATCH 6/9] xfs: support discontiguous buffers in the xfs_buf_log_item Dave Chinner
2012-06-20  7:15   ` Christoph Hellwig
2012-06-08  5:38 ` [PATCH 7/9] xfs: use multiple irec xfs buf support in dabuf Dave Chinner
2012-06-20  7:18   ` Christoph Hellwig
2012-06-08  5:38 ` [PATCH 8/9] xfs: remove struct xfs_dabuf and infrastructure Dave Chinner
2012-06-20  7:20   ` Christoph Hellwig
2012-06-08  5:38 ` [PATCH 9/9] xfs: factor buffer reading from xfs_dir2_leaf_getdents Dave Chinner
2012-06-20  7:27   ` Christoph Hellwig
2012-06-20  7:41     ` Dave Chinner

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=20120620070147.GH30705@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.