On Tue, Apr 05, 2016 at 12:45:08AM +0100, Al Viro wrote:
> AFAICS, what we need there is simply
>       nr_pages = iov_iter_npages(iter);
>       alignment = iov_iter_alignment(iter);
>       if (alignment & (queue_dma_alignment(q) | q->dma_pad_mask))
>               copy = true;
> and I really wonder if we care about special-casing the situation when the
> ends are not aligned to queue_virt_boundary(q).  If we don't, we might as
> well add queue_virt_boundary(q) to the mask we are checking.  If we do,
> it's not hard to add a variant that would calculate both the alignment and
> alignment for internal boundaries...

I suspect this is the right thing to do.  Care to send a patch to Jens?

Reply via email to