From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Dave Chinner <david@fromorbit.com>,
Ming Lei <tom.leiming@gmail.com>,
"open list:XFS FILESYSTEM" <linux-xfs@vger.kernel.org>,
Jens Axboe <axboe@kernel.dk>,
linux-block <linux-block@vger.kernel.org>
Subject: Re: [PATCH 3/3] xfs: alignment check bio buffers
Date: Thu, 22 Aug 2019 17:14:40 -0700 [thread overview]
Message-ID: <20190823001440.GA32209@infradead.org> (raw)
In-Reply-To: <20190822101958.GA9632@ming.t460p>
On Thu, Aug 22, 2019 at 06:20:00PM +0800, Ming Lei wrote:
> In theory, fs bio shouldn't care any DMA limits, which should have been done
> on splitted bio for doing IO to device.
>
> Also .dma_alignment isn't considered in blk_stack_limits(), so in case
> of DM, MD or other stacking drivers, fs code won't know the accurate
> .dma_alignment of underlying queues at all, and the stacking driver's
> queue dma alignment is still 512.
Trying to handling alignment lower down means bounce buffering, so I
don't think trying to hndle it is a sane idea. I'd be much happier to
say non-passthrough bios need 512 byte alignment, period. That should
cover all the sane cases and we can easily check for it. The occasional
device that would need larger alignment just needs to deal with it.
> Also suppose the check is added, I am a bit curious how fs code handles the
> failure, so could you explain a bit about the failure handling?
Even just an assert is a a start. But a bio_add_page variant with
saner return value semantic would be helpful, and I have some ideas
there that I need to try out first.
next prev parent reply other threads:[~2019-08-23 0:14 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 8:38 [PATCH 0/3] xfs: avoid IO issues unaligned memory allocation Dave Chinner
2019-08-21 8:38 ` [PATCH 1/3] xfs: add kmem allocation trace points Dave Chinner
2019-08-21 13:34 ` Brian Foster
2019-08-21 23:20 ` Christoph Hellwig
2019-08-21 8:38 ` [PATCH 2/3] xfs: add kmem_alloc_io() Dave Chinner
2019-08-21 13:35 ` Brian Foster
2019-08-21 15:08 ` Darrick J. Wong
2019-08-21 21:24 ` Dave Chinner
2019-08-21 15:23 ` Eric Sandeen
2019-08-21 21:14 ` Dave Chinner
2019-08-22 13:40 ` Brian Foster
2019-08-22 22:39 ` Dave Chinner
2019-08-23 12:10 ` Brian Foster
2019-08-21 23:24 ` Christoph Hellwig
2019-08-22 0:31 ` Dave Chinner
2019-08-22 7:59 ` Christoph Hellwig
2019-08-22 8:51 ` Peter Zijlstra
2019-08-22 9:10 ` Peter Zijlstra
2019-08-22 10:14 ` Dave Chinner
2019-08-22 11:14 ` Vlastimil Babka
2019-08-22 12:07 ` Dave Chinner
2019-08-22 12:19 ` Vlastimil Babka
2019-08-22 13:17 ` Dave Chinner
2019-08-22 14:26 ` Vlastimil Babka
2019-08-26 12:21 ` Michal Hocko
2019-08-21 8:38 ` [PATCH 3/3] xfs: alignment check bio buffers Dave Chinner
2019-08-21 13:39 ` Brian Foster
2019-08-21 21:39 ` Dave Chinner
2019-08-22 13:47 ` Brian Foster
2019-08-22 23:03 ` Dave Chinner
2019-08-23 12:33 ` Brian Foster
2019-08-21 23:30 ` Christoph Hellwig
2019-08-22 0:44 ` Dave Chinner
2019-08-21 23:29 ` Christoph Hellwig
2019-08-22 0:37 ` Dave Chinner
2019-08-22 8:03 ` Christoph Hellwig
2019-08-22 10:17 ` Dave Chinner
2019-08-22 2:50 ` Ming Lei
2019-08-22 4:49 ` Dave Chinner
2019-08-22 7:23 ` Ming Lei
2019-08-22 8:08 ` Christoph Hellwig
2019-08-22 10:20 ` Ming Lei
2019-08-23 0:14 ` Christoph Hellwig [this message]
2019-08-23 1:19 ` Ming Lei
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=20190823001440.GA32209@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=tom.leiming@gmail.com \
/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