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>,
Dave Kleikamp <dave.kleikamp@oracle.com>,
Zach Brown <zab@zabbo.net>,
Maxim Patlasov <mpatlasov@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Tejun Heo <tj@kernel.org>, Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH v9 6/6] block: loop: support DIO & AIO
Date: Sun, 9 Aug 2015 06:44:04 -0700 [thread overview]
Message-ID: <20150809134404.GA7190@infradead.org> (raw)
In-Reply-To: <CACVXFVO9Wpa+9QWCzMOVQOramd1KsfvtC=vcf-EsCQum-9Omuw@mail.gmail.com>
On Sun, Aug 09, 2015 at 09:04:32AM -0400, Ming Lei wrote:
> Now the logical block size of loop is 512byte, but the sector size of
> backing device may be 4K, so we can't do 512 byte algined direct
> I/O to the filesystem in this situation.
>
> With runtime switch to buffered I/O we can fix this problem, but
> most of times it won't fall in this case.
The right way to handle this case is to not allow direct I/O at all,
you'll be constantly switching between direct and buffered I/O
otherwise, which is a bad idea.
> For non-512 byte sector size of backing device, it is needed as
> I described above.
If the backing device sector size is smaller than that of the loop
device you should not allow direct I/O as you will be switching forth
and back ue to the IO patterns all the time.
next prev parent reply other threads:[~2015-08-09 13:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 8:42 [PATCH v9 0/6] block: loop: improve loop with AIO Ming Lei
2015-08-06 8:42 ` [PATCH v9 1/6] fs: direct-io: don't dirtying pages for ITER_BVEC/ITER_KVEC direct read Ming Lei
2015-08-06 8:42 ` [PATCH v9 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop Ming Lei
2015-08-06 8:42 ` [PATCH v9 3/6] block: loop: use kthread_work Ming Lei
2015-08-06 8:42 ` [PATCH v9 4/6] block: loop: prepare for supporing direct IO Ming Lei
2015-08-06 8:42 ` [PATCH v9 5/6] block: loop: introduce ioctl command of LOOP_SET_DIRECT_IO Ming Lei
2015-08-06 8:42 ` [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei
2015-08-07 7:43 ` Christoph Hellwig
2015-08-07 8:25 ` Ming Lei
2015-08-09 6:44 ` Christoph Hellwig
2015-08-09 13:04 ` Ming Lei
2015-08-09 13:44 ` Christoph Hellwig [this message]
2015-08-09 14:27 ` Ming Lei
2015-08-09 23:41 ` Dave Chinner
2015-08-10 2:50 ` Ming Lei
2015-08-10 8:08 ` Christoph Hellwig
2015-08-10 14:33 ` 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=20150809134404.GA7190@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dave.kleikamp@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=mpatlasov@parallels.com \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@zabbo.net \
/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.