Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932254AbbHMXXJ (ORCPT ); Thu, 13 Aug 2015 19:23:09 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:50546 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932139AbbHMXXG (ORCPT ); Thu, 13 Aug 2015 19:23:06 -0400 Message-ID: <1439508184.31978.57.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH] target: Fix handling of small allocation lengths in REPORT LUNS From: "Nicholas A. Bellinger" To: Spencer Baugh Cc: "open list:TARGET SUBSYSTEM" , "open list:TARGET SUBSYSTEM" , open list , Joern Engel , Spencer Baugh , Roland Dreier Date: Thu, 13 Aug 2015 16:23:04 -0700 In-Reply-To: <1439445958-24753-1-git-send-email-sbaugh@catern.com> References: <1439445958-24753-1-git-send-email-sbaugh@catern.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1496 Lines: 40 Hi Spencer & Co, On Wed, 2015-08-12 at 23:05 -0700, Spencer Baugh wrote: > From: Roland Dreier > > REPORT LUNS should not fail just because the allocation length is less > than 16. The relevant section of SPC-4 is: > > 4.2.5.6 Allocation length > > The ALLOCATION LENGTH field specifies the maximum number of bytes or > blocks that an application client has allocated in the Data-In > Buffer. The ALLOCATION LENGTH field specifies bytes unless a > different requirement is stated in the command definition. > > An allocation length of zero specifies that no data shall be > transferred. This condition shall not be considered an error. > > So we should just truncate our response rather than return an error. > > Signed-off-by: Roland Dreier > Signed-off-by: Spencer Baugh This patch looks fine, but it currently doesn't apply to target-pending/master code due Roland's earlier patch: target: REPORT LUNS should return LUN 0 even for dynamic ACLs https://git.kernel.org/cgit/linux/kernel/git/nab/target-pending.git/commit/?id=9c395170a559d3b23dad100b01fc4a89d661c698 Would you be so kind to respin atop current target-pending/master..? Thank you, --nab -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/