From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbOcY-0000K9-IG for qemu-devel@nongnu.org; Fri, 27 Mar 2015 03:23:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbOcU-0005VW-Ap for qemu-devel@nongnu.org; Fri, 27 Mar 2015 03:23:58 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:39436 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbOcU-0005UX-3a for qemu-devel@nongnu.org; Fri, 27 Mar 2015 03:23:54 -0400 Date: Fri, 27 Mar 2015 08:23:50 +0100 From: Alberto Garcia Message-ID: <20150327072350.GA21994@igalia.com> References: <20150326185250.GA23415@igalia.com> <20150327011119.GM14724@ad.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327011119.GM14724@ad.nay.redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On Fri, Mar 27, 2015 at 09:11:19AM +0800, Fam Zheng wrote: > > Hmm... this actually breaks the new test because now BDS are > > required to have an AioContext attached when they're added to a > > group, which doesn't happen in qtest: > > > > bdrv = bdrv_new(); > > throttle_group_register_bs(bdrv, "bar"); > > > > I'm unsure of how to proceed with this, I don't see a clear way to > > attach the AioContext here (unless I do bdrv->aio_context = ctx). > > Suggestions are welcome. > > Use bdrv_attach_aio_context? That doesn't work in that case, bdrv_attach_aio_context() does nothing if bdrv->drv is null. The test works fine if I set bdrv->aio_context directly as I said above, but is it ok to do that? Berto