From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAM1o-00038h-Mm for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:15:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAM1l-00035m-1E for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:15:20 -0500 Received: from [199.232.76.173] (port=37915 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAM1k-00035h-NR for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:15:16 -0500 Received: from verein.lst.de ([213.95.11.210]:55717) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NAM1k-0007ig-4c for qemu-devel@nongnu.org; Tue, 17 Nov 2009 06:15:16 -0500 Date: Tue, 17 Nov 2009 12:15:14 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH 03/15] scsi: move request lists to QTAILQ. Message-ID: <20091117111514.GC31958@lst.de> References: <1258453071-3496-1-git-send-email-kraxel@redhat.com> <1258453071-3496-4-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1258453071-3496-4-git-send-email-kraxel@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Tue, Nov 17, 2009 at 11:17:39AM +0100, Gerd Hoffmann wrote: > Changes: > * Move from open-coded lists to QTAILQ macros. > * Move the struct elements to the common data structures > (SCSIDevice + SCSIRequest). > * Fix request cleanup in the destroy callback. Perfect, the old, duplicated list handling was quite horrible. Reviewed-by: Christoph Hellwig > + QTAILQ_REMOVE(&r->req.dev->requests, &r->req, next); > + QTAILQ_INSERT_HEAD(&free_requests, &r->req, next); Would be nice if we had a move from one head to another abstraction. Or just a copy of the linux list handling header :)