Thread (6 messages) 6 messages, 3 authors, 2013-01-30

Re: [PATCH] target: For iblock at default writecache enable.

From: Nicholas A. Bellinger <hidden>
Date: 2013-01-29 23:14:27

On Tue, 2013-01-29 at 15:04 -0800, Andy Grover wrote:
On 01/29/2013 11:03 AM, Nicholas A. Bellinger wrote:
quoted
So enabling emulate_write_cache=1 in the case when the underlying device
has not enabled it is incorrect.

I'd like to enable this bit when we know the underlying device has WCE=1
set, but currently there is not a way to determine this (generically)
from struct block_device.

So NACK for applying this until there is a method to determine what the
hardware below is doing.
This should be possible from userspace though. I'm planning on looking
up underlying scsi device(s?) using libblkid, and then query the sense
data using libsgutils when adding a block backstore in targetcli.
Querying the mode pages from userspace would work for the SCSI backstore
case, but certainly not for raw block devices.

I'd still like to see this exposed to the block layer somehow, so that
the setting can be automatically determined by TCM once it's known if
the underlying HW has enabled write caching.
It's kind of a hassle, but isn't it a huge performance win if we can
enable this?
Most certainly, but the danger is reporting WCE=1 (by default in all
cases) from TCM to the initiator when the underlying drives do not have
caching enabled.  Note that every spinning media device that I've ever
seen disables WCE by default from the factory.

--nab
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help