From: Christoph Hellwig <hch@infradead.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Sagi Grimberg <sagi@grimberg.me>,
Johannes Thumshirn <jthumshirn@suse.de>,
Jens Axboe <axboe@fb.com>,
Linux Block Layer Mailinglist <linux-block@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] block: respect virtual boundary mask in bvecs
Date: Thu, 8 Nov 2018 07:04:45 -0800 [thread overview]
Message-ID: <20181108150445.GA31100@infradead.org> (raw)
In-Reply-To: <1541607019.196084.210.camel@acm.org>
On Wed, Nov 07, 2018 at 08:10:19AM -0800, Bart Van Assche wrote:
> > I personally not a huge fan of decoding complicated expressions. But if
> > others are fine with it then I am too...
>
> What I proposed is not a new pattern. It is a pattern that is already used
> elsewhere in the Linux kernel. A few examples:
>
> >From dmabounce.c:
>
> /* Figure out if we need to bounce from the DMA mask. */
> if ((dma_addr | (dma_addr + size - 1)) & ~mask)
> return 1;
>
> >From dma-direct.h:
>
> if ((addr | (addr + size - 1)) & ~mask)
> return 0;
Time for a well documented helper :)
prev parent reply other threads:[~2018-11-09 0:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 10:23 [PATCH] block: respect virtual boundary mask in bvecs Johannes Thumshirn
2018-11-05 10:55 ` Ming Lei
2018-11-05 11:50 ` Johannes Thumshirn
2018-11-05 12:01 ` Ming Lei
2018-11-06 12:34 ` Johannes Thumshirn
2018-11-06 14:56 ` Ming Lei
2018-11-06 15:14 ` Keith Busch
2018-11-07 3:14 ` Sagi Grimberg
2018-11-07 3:11 ` Sagi Grimberg
2018-11-06 14:31 ` Keith Busch
2018-11-06 14:53 ` Bart Van Assche
2018-11-06 14:56 ` Johannes Thumshirn
2018-11-07 3:30 ` Sagi Grimberg
2018-11-07 16:10 ` Bart Van Assche
2018-11-08 15:04 ` Christoph Hellwig [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=20181108150445.GA31100@infradead.org \
--to=hch@infradead.org \
--cc=axboe@fb.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=jack@suse.cz \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sagi@grimberg.me \
/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).