From owner-freebsd-xen@FreeBSD.ORG Tue Sep 3 13:49:31 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E4C69CE7 for ; Tue, 3 Sep 2013 13:49:31 +0000 (UTC) (envelope-from gibbs@freebsd.org) Received: from aslan.scsiguy.com (mail.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B9ADE2DE5 for ; Tue, 3 Sep 2013 13:49:31 +0000 (UTC) Received: from [192.168.0.99] (macbook.scsiguy.com [192.168.0.99]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r83DnSUD008216 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 3 Sep 2013 07:49:28 -0600 (MDT) (envelope-from gibbs@freebsd.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: blkback making assumptions about the id of the requests From: "Justin T. Gibbs" In-Reply-To: <5225AE4C.1030108@citrix.com> Date: Tue, 3 Sep 2013 07:49:30 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <4735C4C7-6348-401D-86BD-013099D2E247@freebsd.org> References: <5224D1DE.8080906@citrix.com> <5225AE4C.1030108@citrix.com> To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= X-Mailer: Apple Mail (2.1508) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Tue, 03 Sep 2013 07:49:28 -0600 (MDT) Cc: "freebsd-xen@freebsd.org" X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 13:49:32 -0000 On Sep 3, 2013, at 3:39 AM, Roger Pau Monn=E9 = wrote: > On 02/09/13 22:03, Justin T. Gibbs wrote: >> On Sep 2, 2013, at 11:58 AM, Roger Pau Monn=E9 = wrote: >>=20 >>> Hello, >>>=20 >>> While playing with driver domains using FreeBSD I've found out that >>> blkback in FreeBSD makes assumptions about the id of a request = instead >>> of actually using the id of the request on the shared ring. This = seems >>> wrong to me, since a frontend might choose whatever ids it like for = the >>> requests (like using 100-131 instead of 0-31). The patch attached = fixes >>> it by copying the id from the request on the ring to blkback = internal >>> request structure. >>>=20 >>> Roger. >>=20 >> It looks to me like the id is set in xbb_dispatch_io(). Why it is = done there >> and not earlier, I don't recall. >=20 > Sorry, I've missed to spot that the id is set there, the problem is = that > requests of type BLKIF_OP_FLUSH_DISKCACHE never reach that point, so > they end up having incorrect requests ids. I've reworded the commit > message and removed the late setting of the request id, now it is set > earlier so requests of type flush also have a valid id when writing = the > response on the ring. Makes sense. Committed. -- Justin=