Hi Manuel & Valambal, Apologies for the delayed response, comments are below. On Thu, 2014-07-17 at 12:42 +0000, Manuel Buil wrote: > Hi, > > One newby question: I create a iSCSI target using my local disk > device /dev/sdb (iBLOCK type of backstore). Is there a way in the CLI > to specify the cache mode that LIO uses when opening the /dev/sdb > device (O_SYNC or O_DIRECT or...)? > So IBLOCK backstores reference the underlying struct block_device directly and submit struct bio, which means there is no struct file involved to signal O_SYNC or O_DIRECT operation. FILEIO backstores default to O_DSYNC usage for safety reasons, and enabling 'buffered' mode at FILEIO backstore creation time will explicitly disable O_DSYNC, making all WRITEs hit buffer cache and acknowledging back to the initiator. Buffered mode obviously has implications for data integrity during target power loss, so for real production systems you'll want to considering using something like bcache in write-back mode with IBLOCK backstores, to ensure that all writes hit persistent storage (flash SSD) before acknowledging back to the initiator. Also note that O_DIRECT is not supported by FILEIO in the kernel backstore, as there is a long standing limitation of fs/direct-io.c only supporting user pages. Eventually a userspace backend will be supported for this, and/or the limitation in fs/direct-io.c will be addressed. --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html