From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:28378 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160AbcHLVGz (ORCPT ); Fri, 12 Aug 2016 17:06:55 -0400 To: Tom Yan Cc: "Martin K. Petersen" , Tejun Heo , jmoyer@redhat.com, axboe@fb.com, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, Sergei Shtylyov Subject: Re: [PATCH v2 2/2] libata-core: do not set dev->max_sectors for LBA48 devices From: "Martin K. Petersen" References: <5eceeb9ad825beb87db03b0989f746dfbe0cf3fe.1470753817.git.tom.ty89@gmail.com> <10c4d38005e24bb477b5182d4fc17879139f14d9.1470753817.git.tom.ty89@gmail.com> <20160810041042.GH25053@mtj.duckdns.org> Date: Fri, 12 Aug 2016 17:06:34 -0400 In-Reply-To: (Tom Yan's message of "Fri, 12 Aug 2016 13:18:28 +0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org >>>>> "Tom" == Tom Yan writes: Tom, Tom> Sounds like libata-scsi is doing something wrong then. It should Tom> not set max_hw_sectors to dev->max_sectors that is set by Tom> libata-core: Tom> but instead it should report it as Maximum Transfer Length and let Tom> sd set it as max_dev_sectors: Well, it's mostly academic since there is a 1:1 mapping. It is important in SCSI where you have many devices with different properties hooked up to the same controller. SCSI MTL is a recent addition. There wasn't much point in making a distinction between hw and dev outside of sd.c since it is the only device type that has a way to communicate a transfer limit. Tom> Although that means setting dev->max_sectors to a value larger than Tom> 1024 will probably be a no-op, if that's really an issue, we should Tom> have the host templates in libata updated. I am still not sure exactly which problem it is you are trying to fix? -- Martin K. Petersen Oracle Linux Engineering