On Mon, 2009-01-26 at 12:34 -0500, Greg Freemyer wrote: > Adding mdraid list: > > Top post as a recap for mdraid list (redundantly at end of email if > anyone wants to respond to any of this).: > > == Start RECAP > With proposed spec changes for both T10 and T13 a new "unmap" or > "trim" command is proposed respectively. The linux kernel is > implementing this as a sector discard and will be called by various > file systems as they delete data files. Ext4 will be one of the first > to support this. (At least via out of kernel patches.) > > SCSI - see http://www.t10.org/cgi-bin/ac.pl?t=d&f=08-356r5.pdf > ATA - see T13/e08137r2 draft > > Per the proposed spec changes, the underlying SSD device can > optionally modify the unmapped data. SCSI T10 at least restricts the > way the modification happens, but data modification of unmapped data > is still definitely allowed for both classes of SSD. > > Thus if a filesystem "discards" a sector, the contents of the sector > can change and thus parity values are no longer meaningful for the > stripe. This isn't correct. The implementation is via bio and request discard flags. linux raid as a bio->bio mapping entity can choose to drop or implement the discard flag (by default it will be dropped unless the raid layer is modified). > ie. If the unmap-ed blocks don't exactly correlate with the Raid-5 / 6 > stripping, then the integrity of a stripe containing both mapped and > unmapped data is lost. > > Thus it seems that either the filesystem will have to understand the > raid 5 / 6 stripping / chunking setup and ensure it never issues a > discard command unless an entire stripe is being discarded. Or that > the raid implementation must must snoop the discard commands and take > appropriate actions. No. It only works if the discard is supported all the way through the stack to the controller and device ... any point in the stack can drop the discard. It's also theoretically possible that any layer could accumulate them as well (i.e. up to stripe size for raid). James -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html