From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 3/3] target: Return descriptor format sense data Date: Tue, 14 Jul 2015 07:40:32 -0700 Message-ID: <20150714144032.GA2763@infradead.org> References: <1436697423-20611-1-git-send-email-sagig@mellanox.com> <1436697423-20611-4-git-send-email-sagig@mellanox.com> <20150714071703.GC31117@infradead.org> <55A4F9B7.905@dev.mellanox.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <55A4F9B7.905@dev.mellanox.co.il> Sender: target-devel-owner@vger.kernel.org To: Sagi Grimberg Cc: "Martin K. Petersen" , Christoph Hellwig , Sagi Grimberg , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, Hannes Reinecke , Bart Van Assche , "Nicholas A. Bellinger" , James Bottomley List-Id: linux-scsi@vger.kernel.org On Tue, Jul 14, 2015 at 02:59:51PM +0300, Sagi Grimberg wrote: > diff --git a/include/target/target_core_backend.h > b/include/target/target_core_backend.h > index 1e5c8f9..6ce370f 100644 > --- a/include/target/target_core_backend.h > +++ b/include/target/target_core_backend.h > @@ -3,6 +3,9 @@ > > #define TRANSPORT_FLAG_PASSTHROUGH 1 > > +#define TARGET_SENSE_DESC_FORMAT(dev) \ > + dev->transport->get_blocks(dev) >= 0xffffffffULL Make this a proper function, given that MODE SENSE isn't in the fast path it doesn't even have to be inline. Together with a fix for the comment from Bart this looks good to me.