linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 9/9] xfs: get rid of the log item descriptor
Date: Tue, 8 May 2018 23:27:28 -0700	[thread overview]
Message-ID: <20180509062728.GB25104@infradead.org> (raw)
In-Reply-To: <20180508034202.10136-10-david@fromorbit.com>

>  	/* Chase down all the log items to see if the bp is there */
> -	list_for_each_entry(lidp, &cur->bc_tp->t_items, lid_trans) {
> -		struct xfs_buf_log_item	*bip;
> -		bip = (struct xfs_buf_log_item *)lidp->lid_item;
> +	list_for_each_entry(lip, &cur->bc_tp->t_items, li_trans) {
> +		struct xfs_buf_log_item	*bip = (struct xfs_buf_log_item *)lip;
> +
>  		if (bip->bli_item.li_type == XFS_LI_BUF &&

This isn't really new in this patch, but I think this code needs to
be fixed to respect typing.  That is:

  - do the li_type check on the original log item we iterate over
  - use containe_of to get at the buf_log_item
  - possible move this code into a helper function in xfs_buf_item.c,
    where it logically belongs and can use the BUF_ITEM() helper.

but that can be done in a separate fixup patch.

Otherwise looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  parent reply	other threads:[~2018-05-09  6:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  3:41 [PATCH 0/9 v2] xfs: log item and transaction cleanups Dave Chinner
2018-05-08  3:41 ` [PATCH 1/9] xfs: log item flags are racy Dave Chinner
2018-05-09 14:51   ` Darrick J. Wong
2018-05-08  3:41 ` [PATCH 2/9] xfs: add tracing to high level transaction operations Dave Chinner
2018-05-09 14:51   ` Darrick J. Wong
2018-05-08  3:41 ` [PATCH 3/9] xfs: adder caller IP to xfs_defer* tracepoints Dave Chinner
2018-05-09 14:52   ` Darrick J. Wong
2018-05-08  3:41 ` [PATCH 4/9] xfs: don't assert fail with AIL lock held Dave Chinner
2018-05-08 14:18   ` Brian Foster
2018-05-09  6:13   ` Christoph Hellwig
2018-05-09 14:52   ` Darrick J. Wong
2018-05-08  3:41 ` [PATCH 5/9] xfs: fix double ijoin in xfs_inactive_symlink_rmt() Dave Chinner
2018-05-08 14:18   ` Brian Foster
2018-05-09  0:24     ` Dave Chinner
2018-05-09 10:10       ` Brian Foster
2018-05-09 15:02         ` Darrick J. Wong
2018-05-11  2:04           ` Dave Chinner
2018-05-11 13:24             ` Brian Foster
2018-05-12  2:00               ` Dave Chinner
2018-05-12 14:17                 ` Brian Foster
2018-05-08  3:41 ` [PATCH 6/9] xfs: fix double ijoin in xfs_reflink_cancel_cow_range Dave Chinner
2018-05-08 14:18   ` Brian Foster
2018-05-09 15:17   ` Darrick J. Wong
2018-05-08  3:42 ` [PATCH 7/9] xfs: fix double ijoin in xfs_reflink_clear_inode_flag() Dave Chinner
2018-05-08 14:18   ` Brian Foster
2018-05-09  0:40     ` Dave Chinner
2018-05-09 10:12       ` Brian Foster
2018-05-09 15:19         ` Darrick J. Wong
2018-05-08  3:42 ` [PATCH 8/9] xfs: add some more debug checks to buffer log item reuse Dave Chinner
2018-05-08 14:18   ` Brian Foster
2018-05-09 15:19   ` Darrick J. Wong
2018-05-08  3:42 ` [PATCH 9/9] xfs: get rid of the log item descriptor Dave Chinner
2018-05-08 14:18   ` Brian Foster
2018-05-09  6:27   ` Christoph Hellwig [this message]
2018-05-09 15:19   ` Darrick J. Wong

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=20180509062728.GB25104@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).