From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT5tV-0004r8-0L for qemu-devel@nongnu.org; Mon, 07 Oct 2013 04:10:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VT5tP-0000q1-EK for qemu-devel@nongnu.org; Mon, 07 Oct 2013 04:10:20 -0400 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:36719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT5tP-0000ps-7S for qemu-devel@nongnu.org; Mon, 07 Oct 2013 04:10:15 -0400 Received: by mail-we0-f175.google.com with SMTP id t61so6255462wes.20 for ; Mon, 07 Oct 2013 01:10:14 -0700 (PDT) Date: Mon, 7 Oct 2013 10:10:11 +0200 From: Stefan Hajnoczi Message-ID: <20131007081011.GB6254@stefanha-thinkpad.redhat.com> References: <1380029714-5239-1-git-send-email-pl@kamp.de> <1380029714-5239-7-git-send-email-pl@kamp.de> <524C415D.3090802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <524C415D.3090802@redhat.com> Subject: Re: [Qemu-devel] [PATCHv3 06/20] block: add BlockLimits structure to BlockDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, stefanha@redhat.com, Peter Lieven , qemu-devel@nongnu.org, anthony@codemonkey.ws, pbonzini@redhat.com, ronniesahlberg@gmail.com On Wed, Oct 02, 2013 at 09:53:01AM -0600, Eric Blake wrote: > On 09/24/2013 07:35 AM, Peter Lieven wrote: > > this patch adds BlockLimits which introduces discard and write_zeroes > > limits and alignment information to the BlockDriverState. > > > > Signed-off-by: Peter Lieven > > --- > > include/block/block_int.h | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > > +struct BlockLimits { > > Should this be a typedef? Either in include/qemu/typedefs.h (where > BlockDriverState is listed), or locally (see BdrvTrackedRequest in the > same file for an example)? > > > @@ -280,6 +294,9 @@ struct BlockDriverState { > > uint64_t total_time_ns[BDRV_MAX_IOTYPE]; > > uint64_t wr_highest_sector; > > > > + /* I/O Limits */ > > + struct BlockLimits bl; > > + > > All other struct/pointer-to-struct members in BlockDriverState are > listed by typedef name, rather than calling out 'struct foo'. > > My question is one of style/consistency, not of C correctness; so unless > a maintainer actually agrees that a typedef change is needed so that you > comply with project coding standards, feel free to add: QEMU coding style requires use of typedef: typedef struct { ... } BlockLimits; Stefan