[PATCHv6 11/11] iomap: add support for dma aligned direct-io
Eric Farman
farman at linux.ibm.com
Wed Jun 29 12:28:54 PDT 2022
On Wed, 2022-06-29 at 13:07 -0600, Keith Busch wrote:
> On Wed, Jun 29, 2022 at 02:04:47PM -0400, Eric Farman wrote:
> > s390 dasd
> >
> > This made me think to change my rootfs, and of course the problem
> > goes
> > away once on something like a SCSI volume.
> >
> > So crawling through the dasd (instead of virtio) driver and I
> > finally
> > find the point where a change to dma_alignment (which you mentioned
> > earlier) would actually fit.
> >
> > Such a change fixes this for me, so I'll run it by our DASD guys.
> > Thanks for your help and patience.
>
> I'm assuming there's some driver or device requirement that's making
> this
> necessary. Is the below driver change what you're looking for?
Yup, that's exactly what I have (in dasd_eckd.c) and indeed gets things
working again. Need to scrounge up some FBA volumes to test that
configuration and the change there.
> If so, I think
> you might want this regardless of this direct-io patch just because
> other
> interfaces like blk_rq_map_user_iov() and blk_rq_aligned() align to
> it.
Good point.
>
> ---
> diff --git a/drivers/s390/block/dasd_fba.c
> b/drivers/s390/block/dasd_fba.c
> index 60be7f7bf2d1..5c79fb02cded 100644
> --- a/drivers/s390/block/dasd_fba.c
> +++ b/drivers/s390/block/dasd_fba.c
> @@ -780,6 +780,7 @@ static void dasd_fba_setup_blk_queue(struct
> dasd_block *block)
> /* With page sized segments each segment can be translated into
> one idaw/tidaw */
> blk_queue_max_segment_size(q, PAGE_SIZE);
> blk_queue_segment_boundary(q, PAGE_SIZE - 1);
> + blk_queue_dma_alignment(q, PAGE_SIZE - 1);
>
> q->limits.discard_granularity = logical_block_size;
>
> --
More information about the Linux-nvme
mailing list