Re: [PATCH v4] Add support for SCT Write Same

2016-08-01 Thread Christoph Hellwig
> + u8 unmap = cdb[1] & 0x8; > + bool use_sct = unmap ? false : true; I think this would be a bit easier to understand if the use_sct flag goes away, and we instead just key off "if (unmap)" below. > - /* for now we only support WRITE SAME with the unmap bit set */ > - if (unlikel

[PATCH v4] Add support for SCT Write Same

2016-07-29 Thread Shaun Tancheff
SATA drives may support write same via SCT. This is useful for setting the drive contents to a specific pattern (0's). If UNMAP is not set or TRIM is not available then fall back to SCT WRITE SAME, if it is available. In this way it would be possible to mimic lbprz for devices that support TRIM b