Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753906AbdCHQdO (ORCPT ); Wed, 8 Mar 2017 11:33:14 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:38562 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbdCHQdM (ORCPT ); Wed, 8 Mar 2017 11:33:12 -0500 To: Kashyap Desai Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: out of range LBA using sg_raw From: "Martin K. Petersen" Organization: Oracle Corporation References: <20170308151113.GB27450@infradead.org> Date: Wed, 08 Mar 2017 11:32:36 -0500 In-Reply-To: (Kashyap Desai's message of "Wed, 8 Mar 2017 21:29:28 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 940 Lines: 23 >>>>> "Kashyap" == Kashyap Desai writes: Kashyap, Kashyap> I am just curious to know how badly we have to scrutinize each Kashyap> packet before sending to Fast Path as we are in IO path and Kashyap> recommend only important checks to be added. As Christoph pointed out, when the fast path is in use you assume the role of the SCSI device. And therefore it is your responsibility to ensure that the VD's capacity and other relevant constraints are being honored. Just like the MR firmware and any attached disks would. It is a feature that there is no sanity checking in the sg interface. The intent is to be able to pass through commands directly to a device and have the device act upon them. Including fail them if they don't make any sense. PS. I'm really no fan of the fast path. It's super messy to have the VD layout handled in two different places. -- Martin K. Petersen Oracle Linux Engineering