From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36631 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTGtD-0000lR-Nq for qemu-devel@nongnu.org; Thu, 16 Dec 2010 11:41:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTGtC-0005L4-QL for qemu-devel@nongnu.org; Thu, 16 Dec 2010 11:41:11 -0500 Received: from verein.lst.de ([213.95.11.210]:38646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTGtC-0005KG-Cs for qemu-devel@nongnu.org; Thu, 16 Dec 2010 11:41:10 -0500 Date: Thu, 16 Dec 2010 17:41:02 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 2/7] scsi-disk: support WRITE SAME (16) with unmap bit Message-ID: <20101216164102.GA13211@lst.de> References: <20101210150038.GA30990@lst.de> <20101210150055.GB31114@lst.de> <4D0A34BF.9020004@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D0A34BF.9020004@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Christoph Hellwig , qemu-devel@nongnu.org On Thu, Dec 16, 2010 at 04:48:15PM +0100, Kevin Wolf wrote: > > + scsi_req_set_status(r, GOOD, NO_SENSE); > > + scsi_req_complete(&r->req); > > + scsi_remove_request(r); > > Isn't this the same as scsi_command_complete()? Yes. > > > + return 0; > > And if you break; here instead of returning (like all other commands) > and remove the three lines above completely, I think it would just do > the right thing. Yes, that looks doable.