From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: 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 18:20:00 +0800 [thread overview]
Message-ID: <20190822101958.GA9632@ming.t460p> (raw)
In-Reply-To: <20190822080852.GC31346@infradead.org>
On Thu, Aug 22, 2019 at 01:08:52AM -0700, Christoph Hellwig wrote:
> On Thu, Aug 22, 2019 at 02:49:05PM +1000, Dave Chinner wrote:
> > On Thu, Aug 22, 2019 at 10:50:02AM +0800, Ming Lei wrote:
> > > It isn't correct to blk_rq_aligned() here because 'len' has to be logical block
> > > size aligned, instead of DMA aligned only.
>
> Even if len would have to be a multiple of the sector size, that doesn't
> mean calling blk_rq_aligned would be incorrect, just possibly not
> catching all issues.
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.
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?
Thanks,
Ming
next prev parent reply other threads:[~2019-08-22 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190821083820.11725-1-david@fromorbit.com>
[not found] ` <20190821083820.11725-4-david@fromorbit.com>
2019-08-21 23:29 ` [PATCH 3/3] xfs: alignment check bio buffers 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 [this message]
2019-08-23 0:14 ` Christoph Hellwig
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=20190822101958.GA9632@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).