On Fri, 5 Dec 2014 06:51:59 -0800 Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> wrote: > We already do support DPO in the bs_rdwr backend and we pass DPO==1 as a > hint to the kernel using POSIX_FADV_NOREUSE for WRITE_10/12/16. > The idea here is that IF DPO==1 then this is a hint from the initiator that > we should not cache the data. TGTD itself does not do any caching but the > pagecache on the host might, hence the POSIX_FADV_NOREUSE hint. > > So we already do support some basic DPO functionality in bs_rdwr.c. For the > other backends we do not yet, but all those backends ignore the DPO bit > anyway (i.e. they will not fail the command with INVALID_FIELD_IN_CDB). > > This patch sets the 0x10 flag in the device specific parameters for block > device mode pages so that we tell the initiator that we support DPO (and FUA). > > With this patch the linux kernel initiator now recognizes that it may use > DPO/FUA. As will hopefully other initiators as well. > [160973.210942] sd 18:0:0:2: Attached scsi generic sg15 type 0 > [160973.211761] sd 18:0:0:1: [sdk] Write Protect is off > [160973.211765] sd 18:0:0:1: [sdk] Mode Sense: 69 00 10 08 > [160973.211868] sd 18:0:0:1: [sdk] Write cache: enabled, read cache: enabled, > supports DPO and FUA > > Supporting DPO can have a positive performance impact since it can allow > more efficient use of the target cache. I.e. an initiator can hint to the > target which writes should not pollute the cache. > > Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> > --- > usr/sbc.c | 27 ++++++++++++++------------- > 1 file changed, 14 insertions(+), 13 deletions(-) Applied, thanks! -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html