From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@canonical.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Justin M. Forbes" <jforbes@fedoraproject.org>,
Jeff Moyer <jmoyer@redhat.com>, Tejun Heo <tj@kernel.org>,
linux-api@vger.kernel.org
Subject: Re: [PATCH v7 4/6] block: loop: prepare for supporing direct IO
Date: Mon, 27 Jul 2015 02:45:30 -0700 [thread overview]
Message-ID: <20150727094530.GA15507@infradead.org> (raw)
In-Reply-To: <CACVXFVOvnVHNtTkt_kiNZu9BuZHZ==EF4y3qXx+Qo=LHoytODQ@mail.gmail.com>
On Mon, Jul 27, 2015 at 05:41:57AM -0400, Ming Lei wrote:
> > Why the hardcoded value? I suspect this should be more like:
> >
> > if (dio && inode->i_sb->s_bdev &&
> > (lo->lo_offset & (bdev_io_min(inode->i_sb->s_bdev) - 1)) != 0)
> > dio = false;
>
> The above can't work if the backing device has a bigger sector size
> (such as 4K), that is why loop's direct-io requires 512 min_io_size of
> backing device.
Why doesn't it work? If the backing device sector size is 4k
and lo_offset is 0 or a multiple of 4k it should allow direct I/O,
and my code sniplet will allow that.
next prev parent reply other threads:[~2015-07-27 9:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 15:37 [PATCH v7 0/6] block: loop: improve loop with AIO Ming Lei
2015-07-16 15:37 ` [PATCH v7 1/6] fs: direct-io: don't dirtying pages for ITER_BVEC/ITER_KVEC direct read Ming Lei
2015-07-16 16:48 ` Dave Kleikamp
2015-07-16 15:37 ` [PATCH v7 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop Ming Lei
2015-07-16 15:37 ` [PATCH v7 3/6] block: loop: use kthread_work Ming Lei
2015-07-16 15:37 ` [PATCH v7 4/6] block: loop: prepare for supporing direct IO Ming Lei
[not found] ` <1437061068-26118-5-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2015-07-27 8:40 ` Christoph Hellwig
2015-07-27 8:40 ` Christoph Hellwig
[not found] ` <20150727084020.GA28336-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-07-27 9:41 ` Ming Lei
2015-07-27 9:41 ` Ming Lei
2015-07-27 9:45 ` Christoph Hellwig [this message]
[not found] ` <20150727094530.GA15507-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2015-07-27 9:53 ` Ming Lei
2015-07-27 9:53 ` Ming Lei
2015-07-27 17:33 ` Christoph Hellwig
2015-07-29 7:33 ` Ming Lei
2015-07-29 8:41 ` Dave Chinner
2015-07-29 11:21 ` Ming Lei
2015-07-29 11:21 ` Ming Lei
[not found] ` <CACVXFVMOuCk0bHZfrV=VZWLtgsa4oWxrpnu6aoB1LKZ50UMhZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-29 22:08 ` Dave Chinner
2015-07-29 22:08 ` Dave Chinner
2015-07-30 8:01 ` Ming Lei
2015-07-30 8:01 ` Ming Lei
[not found] ` <CACVXFVMKycx768HtAJXMgEZNjsQrNm_f3UzW9kUysSHAMM5FPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-27 22:06 ` Dave Chinner
2015-07-27 22:06 ` Dave Chinner
2015-07-16 15:37 ` [PATCH v7 5/6] block: loop: introduce ioctl command of LOOP_SET_DIRECT_IO Ming Lei
2015-07-16 15:37 ` [PATCH v7 6/6] block: loop: support DIO & AIO Ming Lei
2015-07-23 9:00 ` [PATCH v7 0/6] block: loop: improve loop with AIO 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=20150727094530.GA15507@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=jforbes@fedoraproject.org \
--cc=jmoyer@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=tj@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.