From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Jens Axboe <axboe@kernel.dk>, '@magnolia
Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-block@vger.kernel.org, willy@infradead.org, clm@fb.com,
torvalds@linux-foundation.org, david@fromorbit.com
Subject: Re: [PATCH 6/6] xfs: don't do delayed allocations for uncached buffered writes
Date: Tue, 17 Dec 2019 17:57:46 -0800 [thread overview]
Message-ID: <20191218015746.GB12752@magnolia> (raw)
In-Reply-To: <20191217143948.26380-7-axboe@kernel.dk>
On Tue, Dec 17, 2019 at 07:39:48AM -0700, Jens Axboe wrote:
> This data is going to be written immediately, so don't bother trying
> to do delayed allocation for it.
>
> Suggested-by: Dave Chinner <david@fromorbit.com>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Looks reasonable once all the previous patches go in,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/xfs_iomap.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
> index 28e2d1f37267..d0cd4a05d59f 100644
> --- a/fs/xfs/xfs_iomap.c
> +++ b/fs/xfs/xfs_iomap.c
> @@ -847,8 +847,11 @@ xfs_buffered_write_iomap_begin(
> int allocfork = XFS_DATA_FORK;
> int error = 0;
>
> - /* we can't use delayed allocations when using extent size hints */
> - if (xfs_get_extsz_hint(ip))
> + /*
> + * Don't do delayed allocations when using extent size hints, or
> + * if we were asked to do uncached buffered writes.
> + */
> + if (xfs_get_extsz_hint(ip) || (flags & IOMAP_UNCACHED))
> return xfs_direct_write_iomap_begin(inode, offset, count,
> flags, iomap, srcmap);
>
> --
> 2.24.1
>
prev parent reply other threads:[~2019-12-18 1:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 14:39 [PATCHSET v5 0/6] Support for RWF_UNCACHED Jens Axboe
2019-12-17 14:39 ` [PATCH 1/6] fs: add read support " Jens Axboe
2019-12-17 15:16 ` Guoqing Jiang
2019-12-17 16:42 ` Jens Axboe
2019-12-17 15:57 ` Matthew Wilcox
2019-12-17 16:41 ` Jens Axboe
2019-12-18 3:17 ` Dave Chinner
2019-12-17 14:39 ` [PATCH 2/6] mm: make generic_perform_write() take a struct kiocb Jens Axboe
2019-12-17 14:39 ` [PATCH 3/6] mm: make buffered writes work with RWF_UNCACHED Jens Axboe
2019-12-17 14:39 ` [PATCH 4/6] iomap: add struct iomap_ctx Jens Axboe
2019-12-17 19:39 ` Linus Torvalds
2019-12-17 20:26 ` Linus Torvalds
2019-12-18 0:15 ` Jens Axboe
2019-12-18 1:25 ` Darrick J. Wong
2019-12-17 14:39 ` [PATCH 5/6] iomap: support RWF_UNCACHED for buffered writes Jens Axboe
2019-12-18 1:52 ` Darrick J. Wong
2019-12-18 3:18 ` Jens Axboe
2019-12-18 4:15 ` Darrick J. Wong
2019-12-17 14:39 ` [PATCH 6/6] xfs: don't do delayed allocations for uncached " Jens Axboe
2019-12-18 1:57 ` Darrick J. Wong [this message]
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=20191218015746.GB12752@magnolia \
--to=darrick.wong@oracle.com \
--cc='@magnolia \
--cc=axboe@kernel.dk \
--cc=clm@fb.com \
--cc=david@fromorbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.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).