lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 9 Aug 2015 06:44:04 -0700
From:	Christoph Hellwig <hch@...radead.org>
To:	Ming Lei <ming.lei@...onical.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Jens Axboe <axboe@...nel.dk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Dave Kleikamp <dave.kleikamp@...cle.com>,
	Zach Brown <zab@...bo.net>,
	Maxim Patlasov <mpatlasov@...allels.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Tejun Heo <tj@...nel.org>, Dave Chinner <david@...morbit.com>
Subject: Re: [PATCH v9 6/6] block: loop: support DIO & AIO

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ