Re: [PATCH 2/3] xfs: use rhashtable to track buffer cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static int
> +_xfs_buf_cmp(
> +	struct rhashtable_compare_arg *arg,
> +	const void *obj)
> +{
> +	const struct xfs_buf_map *map = arg->key;
> +	const struct xfs_buf *bp = obj;

How about aligning the parameter / variable names here like we
normally do in XFS?

> +static const struct rhashtable_params xfs_buf_hash_params = {
> +	.min_size = 32,		/* empty/unused AGs have minimal footprint */
> +	.nelem_hint = 16,
> +	.key_len = sizeof(xfs_daddr_t),
> +	.key_offset = offsetof(struct xfs_buf, b_bn),
> +	.head_offset = offsetof(struct xfs_buf, b_rhash_head),
> +	.automatic_shrinking = true,
> +	.obj_cmpfn = _xfs_buf_cmp,

Some tab alignments before the equal signs here?

Also please name the compare function so that it fits the field name,
as that makes grepping so much easier..

	.obj_cmpfn	= xfs_buf_obj_cmpfn,


Otherwise this looks fine to me and seems to survive testing so far:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux