qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv3 06/20] block: add BlockLimits structure to Blo


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCHv3 06/20] block: add BlockLimits structure to BlockDriverState
Date: Mon, 7 Oct 2013 10:10:11 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> > ---
> >  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]