From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934406AbcLUOBX (ORCPT ); Wed, 21 Dec 2016 09:01:23 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:31217 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbcLUOBQ (ORCPT ); Wed, 21 Dec 2016 09:01:16 -0500 To: Mauricio Faria de Oliveira Cc: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, gpiccoli@linux.vnet.ibm.com Subject: Re: [PATCH] scsi: do not requeue requests unaligned with device sector size From: "Martin K. Petersen" Organization: Oracle Corporation References: <1482199347-9128-1-git-send-email-mauricfo@linux.vnet.ibm.com> Date: Wed, 21 Dec 2016 09:01:11 -0500 In-Reply-To: <1482199347-9128-1-git-send-email-mauricfo@linux.vnet.ibm.com> (Mauricio Faria de Oliveira's message of "Tue, 20 Dec 2016 00:02:27 -0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Mauricio" == Mauricio Faria de Oliveira writes: Mauricio, Mauricio> When a SCSI command (e.g., read operation) is partially Mauricio> completed with good status and residual bytes (i.e., not all Mauricio> the bytes from the specified transfer length were transferred) Mauricio> the SCSI midlayer will update the request/bios with the Mauricio> completed bytes and requeue the request in order to complete Mauricio> the remainder/pending bytes. I agree with Christoph and Hannes. Some of this falls into the gray area that's outside of the T10 spec (HBA programming interface guarantees) but it seems like a deficiency in the HBA to report a byte count that's not a multiple of the logical block size. A block can't be partially written. Either it made it or it didn't. Regardless of how the I/O is being broken up into frames at the transport level and at which offset the transfer was interrupted. I am also not a fan of the delayed retry stuff which seems somewhat orthogonal to the problem you're describing. -- Martin K. Petersen Oracle Linux Engineering