From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDQBz-0000Bl-1b for qemu-devel@nongnu.org; Thu, 16 Jun 2016 01:50:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDQBx-0006ke-7C for qemu-devel@nongnu.org; Thu, 16 Jun 2016 01:50:14 -0400 Date: Thu, 16 Jun 2016 13:50:00 +0800 From: Fam Zheng Message-ID: <20160616055000.GR12178@ad.usersys.redhat.com> References: <1465939839-30097-1-git-send-email-eblake@redhat.com> <1465939839-30097-17-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465939839-30097-17-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 16/17] block: Split bdrv_merge_limits() from bdrv_refresh_limits() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com, Stefan Hajnoczi , Max Reitz On Tue, 06/14 15:30, Eric Blake wrote: > The raw block driver was blindly copying all limits from bs->file, > even though: 1. the main bdrv_refresh_limits() already does this > for many of gthe limits, and 2. blindly copying from the children s/gthe/the ? > can weaken any stricter limits that were already inherited from > the backing dhain during the main bdrv_refresh_limits(). Also, > the next patch is about to move .request_alignment into > BlockLimits, and that is a limit that should NOT be copied from > other layers in the BDS chain. > > Solve the issue by factoring out a new bdrv_merge_limits(), > and using that function to properly merge limits when comparing > two BlockDriverState objects. > > Signed-off-by: Eric Blake Reviewed-by: Fam Zheng