the bitrig master branch has been updated by pedro with 5 new commits: commit 971ac5eabbc2d4aa8e003c86186ec5cc27038ace diff: https://github.com/bitrig/bitrig/commit/971ac5e author: Pedro Martelletto <[email protected]> date: Thu Feb 26 11:28:07 2015 +0100
Handle DIOCCACHESYNC in softraid(4). Handle DIOCCACHESYNC in softraid(4) by propagating the DIOCCACHESYNC ioctl down to each of the physical disks composing the softraid(4) volume. OK marco@ oga@. M sys/dev/softraid.c commit 6b2add415e1cfcf6f5a1492fa36a2602f344be94 diff: https://github.com/bitrig/bitrig/commit/6b2add4 author: Pedro Martelletto <[email protected]> date: Thu Feb 26 10:41:17 2015 +0100 Detect DDIOCACHESYNC on softraid(4). Detect DDIOCACHESYNC happening on softraid(4) and call a link specific function to handle it. DDIOCACHESYNC results in a SCSI SYNCHRONIZE_CACHE command, but SYNCHRONIZE_CACHE has different semantics on softraid(4) than it does on physical disks. Quoting ftp://ftp.t10.org/t10/document.05/05-344r0.pdf, page 63: "The SYNCHRONIZE CACHE command requests that the device server ensure that the specified logical blocks have their most recent data values recorded in non-volatile cache and/or on the medium." The understanding taken from this definition is that a SYNCHRONIZE CACHE command should cause the I/O controller to dispose of any internal cache it might have on /previously completed/ transactions. What softraid(4) does when being issued a SYNCHRONIZE CACHE is to wait for all /outstanding/ I/O to drain. This means that, even with the previously described issues concerning parallel invocations of sr_raid_sync() addressed, periodic use of DDIOCACHESYNC on a softraid(4) disk backing a live file system imposes severe performance penalties. OK marco@ oga@. M sys/scsi/sd.c commit 4ba3da1b0f201470e219c456d32a9207be33042f diff: https://github.com/bitrig/bitrig/commit/4ba3da1 author: Pedro Martelletto <[email protected]> date: Thu Feb 26 10:38:54 2015 +0100 Fix a memory leak in sr_ioctl_createraid(). Found while reading the code. OK marco@ oga@. M sys/dev/softraid.c commit 2cc1fda814ff98d3da6ee72ea4115dba928a1071 diff: https://github.com/bitrig/bitrig/commit/2cc1fda author: Pedro Martelletto <[email protected]> date: Thu Feb 26 10:34:21 2015 +0100 Initialise sd_scsibus_dev in sr_ioctl_createraid(). In sr_ioctl_createraid(), initialise sd_scsibus_dev with the 'struct device' of the abstracted disk. This field was previously unused. OK marco@ oga@. M sys/dev/softraid.c commit 0941b897edbe1e3ae7adf1f94178cbd4a81bebeb diff: https://github.com/bitrig/bitrig/commit/0941b89 author: Pedro Martelletto <[email protected]> date: Thu Feb 26 10:27:02 2015 +0100 Define and mark softraid(4) disks with SDEV_SOFTRAID. In the same fashion of SDEV_{ATAPI,UMASS,VIRTUAL}, add a SDEV_SOFTRAID flag and use it to allow the SCSI layer to identify disks abstracted through softraid(4). OK marco@ oga@. M sys/dev/softraid.c M sys/scsi/scsiconf.h
