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 <p...@kamp.de>
> > ---
> >  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