Performing FSCTL_FILE_LEVEL_TRIM on a huge file only works on SSDs which ensure that data read back after a Trim is 00 bytes, otherwise the operation will fail.Creating a huge file using SetEndOfFile and SetFileValidData* will expose the prior contents of the disk, and the huge file can be deleted to trigger a trim.Creating a blank NTFS file system using Quick Format will trigger a trim.Deleting a volume or deleting the partition table will not trigger a trim.Actually getting VirtualBox to support the TRIM command took some command line trickery**, but you can do it. I just did a few tests in VirtualBox using normal disk operations (no SCSI bypass stuff here). I wonder if ATA_PASSTHROUGH or windows nvme pasthrough would work? Perhaps Windows 10 is blocking it?Įdit 3: Looks like IOCTL_STORAGE_READ_CAPACITY can verify if SCSI_PASSTHROUGH works or not. Don't know why SCSI_PASSTHROUGH is failing.Įdit 2: Looks like the SCSI_PASSTHROUGH trim command just doesn't work. Perhaps it should try to do IOCTL_STORAGE_READ_CAPACITY instead of SCSI_PASSTHROUGH?Įdit: Tried IOCTL_STORAGE_READ_CAPACITY, and it returned 1953525168 sectors, each 512 bytes, for a size of 931.5GB. For some reason, none of the bootable linux USB sticks could see the drive, so I'm using Windows PE instead. Other is an Acer laptop that I'm trying to return (want to blank out the SSD first), NVMe HFM256GDJTNG-831. Made sure all erase code was commented out, so I could try debugging the IOCTRL call. Running on Windows 10 圆4 ("2004" version). One is a Dell laptop, with an M.2 SATA hard drive, 1TB from Crucial.
0 Comments
Leave a Reply. |