From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: configurable discard parameters Date: Tue, 23 Jun 2015 14:26:18 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:26171 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933116AbbFWS0W (ORCPT ); Tue, 23 Jun 2015 14:26:22 -0400 In-Reply-To: (Tom Yan's message of "Wed, 24 Jun 2015 01:24:12 +0800") Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Tom Yan Cc: "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org >>>>> "Tom" == Tom Yan writes: Tom> So when libata issue ATA commands with ranges of 65535 sectors, Tom> only 65535-(65535%8) = 65528 sectors are discarded, That's unfortunate but TRIM is advisory so the drive is free to ignore all or parts of the request. What happens if you discard sectors 0-6 and then sector 7? Tom> I can workaround this by specifying --step in blkdiscard, but I Tom> think the kernel should have a param configurable for general. This is on the Intel 530? What does the drive report in /sys/block/sdN/queue/discard_zeroes_data? -- Martin K. Petersen Oracle Linux Engineering