From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH 1/1] sd: fix lbprz discard granularity as expected Date: Mon, 14 Mar 2016 16:07:19 -0400 Message-ID: References: <56e12d57.4b43620a.4c8c0.ffff9bc5@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:44839 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753263AbcCNUH1 (ORCPT ); Mon, 14 Mar 2016 16:07:27 -0400 In-Reply-To: (Tom Yan's message of "Sat, 12 Mar 2016 13:43:02 +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 >>>>> "Tom" == Tom Yan writes: Tom, Tom> But yeah if it has unmap granularity reported to be, for example, Tom> 16, then it will not be correctly set with min_not_zero(). Tom> Wait, shouldn't it be: Tom> max(sdkp->logical_block_size, sdkp->unmap_granularity * logical_block_size); Tom> then? Let's take the your example of a drive with 512-byte logical blocks and 4096-byte physical blocks. How would a drive partially unmap a sector? -- Martin K. Petersen Oracle Linux Engineering