From: Dave Chinner <david@fromorbit.com>
To: Alli <allison.henderson@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/8] xfs: hide log iovec alignment constraints
Date: Tue, 12 Apr 2022 20:13:58 +1000 [thread overview]
Message-ID: <20220412101358.GG1544202@dread.disaster.area> (raw)
In-Reply-To: <aa95f0d19f78a94e8bcdbcf76979253bf97f8bcb.camel@oracle.com>
On Sun, Apr 10, 2022 at 10:23:09PM -0700, Alli wrote:
> On Tue, 2022-03-15 at 09:06 +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@redhat.com>
> >
> > Callers currently have to round out the size of buffers to match the
> > aligment constraints of log iovecs and xlog_write(). They should not
> > need to know this detail, so introduce a new function to calculate
> > the iovec length (for use in ->iop_size implementations). Also
> > modify xlog_finish_iovec() to round up the length to the correct
> > alignment so the callers don't need to do this, either.
> >
> > Convert the only user - inode forks - of this alignment rounding to
> > use the new interface.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
.....
> > void *xlog_prepare_iovec(struct xfs_log_vec *lv, struct
> > xfs_log_iovec **vecp,
> > uint type);
> >
> > @@ -29,6 +40,12 @@ xlog_finish_iovec(struct xfs_log_vec *lv, struct
> > xfs_log_iovec *vec, int len)
> > {
> > struct xlog_op_header *oph = vec->i_addr;
> >
> > + /*
> > + * Always round up the length to the correct alignment so
> > callers don't
> > + * need to know anything about this log vec layout requirement.
> > + */
> > + len = xlog_calc_iovec_len(len);Hmm, what code base was this on?
> > >
> Hmm, I'm getting some merge conflicts in this area. It looks like the
> round_up logic was already added in:
>
> bde7cff67c39227c6ad503394e19e58debdbc5e3
> "xfs: format log items write directly into the linear CIL buffer"
>
> So I think it's ok to drop this bit about rounding length.
Ok, I think that's why you are getting rounding assert failures in
the log code - this code replaces the fixed 4 byte allocation
roundup that is done for the inode fork data buffers, and if you
remove both the round-up I added to xlog_finish_iovec() and the
inode fork roundup, you get unaligned regions and assert failures in
xlog_write()....
The posted patchset was based on top of the xlog-write-rewrite
patchset I posted before this one, so I'd say that's where the
conflicts applying this to a base 5.18-rc2 kernel came from.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-04-12 11:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 22:06 [PATCH 0/8 v3] xfs: intent whiteouts Dave Chinner
2022-03-14 22:06 ` [PATCH 1/8] xfs: hide log iovec alignment constraints Dave Chinner
2022-04-11 5:23 ` Alli
2022-04-12 10:13 ` Dave Chinner [this message]
2022-03-14 22:06 ` [PATCH 2/8] xfs: don't commit the first deferred transaction without intents Dave Chinner
2022-04-11 5:22 ` Alli
2022-04-12 10:21 ` Dave Chinner
2022-03-14 22:06 ` [PATCH 3/8] xfs: add log item flags to indicate intents Dave Chinner
2022-04-11 5:23 ` Alli
2022-03-14 22:06 ` [PATCH 4/8] xfs: tag transactions that contain intent done items Dave Chinner
2022-04-11 5:23 ` Alli
2022-03-14 22:06 ` [PATCH 5/8] xfs: factor and move some code in xfs_log_cil.c Dave Chinner
2022-04-11 5:24 ` Alli
2022-04-12 10:25 ` Dave Chinner
2022-03-14 22:06 ` [PATCH 6/8] xfs: add log item method to return related intents Dave Chinner
2022-04-11 5:24 ` Alli
2022-03-14 22:06 ` [PATCH 7/8] xfs: whiteouts release intents that are not in the AIL Dave Chinner
2022-04-11 5:27 ` Alli
2022-03-14 22:06 ` [PATCH 8/8] xfs: intent item whiteouts Dave Chinner
2022-04-11 5:22 ` [PATCH 0/8 v3] xfs: intent whiteouts Alli
-- strict thread matches above, loose matches on Subject: below --
2022-04-27 2:22 [PATCH 0/8 v5] " Dave Chinner
2022-04-27 2:22 ` [PATCH 1/8] xfs: hide log iovec alignment constraints Dave Chinner
2022-04-27 3:14 ` Darrick J. Wong
2022-04-27 4:50 ` Dave Chinner
2022-04-27 16:45 ` Darrick J. Wong
2022-04-28 13:00 ` 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=20220412101358.GG1544202@dread.disaster.area \
--to=david@fromorbit.com \
--cc=allison.henderson@oracle.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