From: John Garry <john.g.garry@oracle.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: chandan.babu@oracle.com, dchinner@redhat.com, hch@lst.de,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH RFC 1/2] xfs: Fix xfs_flush_unmap_range() range for RT
Date: Wed, 8 May 2024 07:40:25 +0100 [thread overview]
Message-ID: <c59c5e87-7460-4ac7-8533-87d96d890b1f@oracle.com> (raw)
In-Reply-To: <20240507205822.GR360919@frogsfrogsfrogs>
On 07/05/2024 21:58, Darrick J. Wong wrote:
>> - rounding = max_t(xfs_off_t, mp->m_sb.sb_blocksize, PAGE_SIZE);
>> + /*
>> + * Make sure we extend the flush out to extent alignment
>> + * boundaries so any extent range overlapping the start/end
>> + * of the modification we are about to do is clean and idle.
>> + */
>> + rounding = max_t(xfs_off_t, xfs_inode_alloc_unitsize(ip), PAGE_SIZE);
>> start = round_down(offset, rounding);
> round_down requires the divisor to be a power of two.
well spotted, and so the round_up() call, below, also needs fixing.
>
> --D
>
>> end = round_up(offset + len, rounding) - 1;
next prev parent reply other threads:[~2024-05-08 6:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 14:03 [PATCH RFC 0/2] xfs: fallocate RT flush unmap range fixes John Garry
2024-05-03 14:03 ` [PATCH RFC 1/2] xfs: Fix xfs_flush_unmap_range() range for RT John Garry
2024-05-07 6:36 ` Christoph Hellwig
2024-05-07 20:58 ` Darrick J. Wong
2024-05-08 6:39 ` John Garry
2024-05-08 6:40 ` John Garry [this message]
2024-05-03 14:03 ` [PATCH RFC 2/2] xfs: Fix xfs_prepare_shift() " John Garry
2024-05-07 6:37 ` Christoph Hellwig
2024-05-07 21:02 ` 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=c59c5e87-7460-4ac7-8533-87d96d890b1f@oracle.com \
--to=john.g.garry@oracle.com \
--cc=chandan.babu@oracle.com \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).