Re: [PATCH 1/4] libata: Allow NCQ TRIM to be enabled or disabled with a module parameter

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

 



On 05/05/2015 03:54 AM, Martin K. Petersen wrote:
> We have started seeing SSD firmware updates introduce support for queued
> TRIM. Sadly, in most cases this support is completely untested and can
> lead to either errors or data corruption.
> 
> Add two libata force flags that can be used to either enable or disable
> queued TRIM support.
> 
> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> ---
>  Documentation/kernel-parameters.txt | 2 ++
>  drivers/ata/libata-core.c           | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 61ab1628a057..a2e4891a714f 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -1774,6 +1774,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>  
>  			* [no]ncq: Turn on or off NCQ.
>  
> +			* [no]ncqtrim: Turn off queued DSM TRIM.
> +
>  			* nohrst, nosrst, norst: suppress hard, soft
>                            and both resets.
>  
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 4476fb590733..9cebd7872ac6 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -6472,6 +6472,8 @@ static int __init ata_parse_force_one(char **cur,
>  		{ "3.0Gbps",	.spd_limit	= 2 },
>  		{ "noncq",	.horkage_on	= ATA_HORKAGE_NONCQ },
>  		{ "ncq",	.horkage_off	= ATA_HORKAGE_NONCQ },
> +		{ "noncqtrim",	.horkage_on	= ATA_HORKAGE_NO_NCQ_TRIM },
> +		{ "ncqtrim",	.horkage_off	= ATA_HORKAGE_NO_NCQ_TRIM },
>  		{ "dump_id",	.horkage_on	= ATA_HORKAGE_DUMP_ID },
>  		{ "pio0",	.xfer_mask	= 1 << (ATA_SHIFT_PIO + 0) },
>  		{ "pio1",	.xfer_mask	= 1 << (ATA_SHIFT_PIO + 1) },
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
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




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux