Re: TRIM/DISCARD for usb drives?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually as of the current kernel, uas support/driver is a
prerequisite of TRIM, because skip_vdp_page in scsiglue.c prevent
sd_read_block_limits(), which configure various values necessary for
blkdev_issue_discard() (and other filesystem-specific discard
functions/ioctls) through sd_config_discard().

On 15 June 2015 at 22:37, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 15 Jun 2015, Tom Yan wrote:
>
>> I have a SanDisk Extreme USB Flash Drive
>> (http://www.sandisk.com/products/usb/drives/extreme/), which does NOT
>> support UASP so is running under "usb-storage".
>>
>> According to `hdparm`, it seems to supports TRIM; and according to
>> `sg3_opcodes`, it seems to support ATA Pass-Through (12/16). However,
>> all TRIM/DISCARD related ioctl doesn't work with it at all.
>>
>> So my question is, is TRIM/DISCARD possible at all in linux for usb
>> drives? If so, what are the requirements? If not, is it just not
>> implemented yet or an inherit problem of usb which cannot be fixed?
>
> This has nothing to do with USB.  It's simply a question of whether or
> not that particular flash drive implements the command.  Some drives do
> and and some don't.
>
> Alan Stern
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux