Message ID | 1379425736-11326-21-git-send-email-pl@kamp.de |
---|---|
State | New |
Headers | show |
Il 17/09/2013 15:48, Peter Lieven ha scritto: > Signed-off-by: Peter Lieven <pl@kamp.de> > --- > block/raw_bsd.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/block/raw_bsd.c b/block/raw_bsd.c > index 0bfa5fc..dfdb375 100644 > --- a/block/raw_bsd.c > +++ b/block/raw_bsd.c > @@ -149,6 +149,10 @@ static int raw_create(const char *filename, QEMUOptionParameter *options) > static int raw_open(BlockDriverState *bs, QDict *options, int flags) > { > bs->sg = bs->file->sg; > + bs->max_discard = bs->file->max_discard; > + bs->discard_alignment = bs->file->discard_alignment; > + bs->max_write_zeroes = bs->file->max_write_zeroes; > + bs->write_zeroes_alignment = bs->file->write_zeroes_alignment; > return 0; What about introducing a BlockLimits struct? Paolo > } > >
On 18.09.2013 10:48, Paolo Bonzini wrote: > Il 17/09/2013 15:48, Peter Lieven ha scritto: >> Signed-off-by: Peter Lieven <pl@kamp.de> >> --- >> block/raw_bsd.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/block/raw_bsd.c b/block/raw_bsd.c >> index 0bfa5fc..dfdb375 100644 >> --- a/block/raw_bsd.c >> +++ b/block/raw_bsd.c >> @@ -149,6 +149,10 @@ static int raw_create(const char *filename, QEMUOptionParameter *options) >> static int raw_open(BlockDriverState *bs, QDict *options, int flags) >> { >> bs->sg = bs->file->sg; >> + bs->max_discard = bs->file->max_discard; >> + bs->discard_alignment = bs->file->discard_alignment; >> + bs->max_write_zeroes = bs->file->max_write_zeroes; >> + bs->write_zeroes_alignment = bs->file->write_zeroes_alignment; >> return 0; > What about introducing a BlockLimits struct? Good idea. Do you like the rest of the series? Peter
Il 19/09/2013 09:29, Peter Lieven ha scritto: > On 18.09.2013 10:48, Paolo Bonzini wrote: >> Il 17/09/2013 15:48, Peter Lieven ha scritto: >>> Signed-off-by: Peter Lieven <pl@kamp.de> >>> --- >>> block/raw_bsd.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/block/raw_bsd.c b/block/raw_bsd.c >>> index 0bfa5fc..dfdb375 100644 >>> --- a/block/raw_bsd.c >>> +++ b/block/raw_bsd.c >>> @@ -149,6 +149,10 @@ static int raw_create(const char *filename, >>> QEMUOptionParameter *options) >>> static int raw_open(BlockDriverState *bs, QDict *options, int flags) >>> { >>> bs->sg = bs->file->sg; >>> + bs->max_discard = bs->file->max_discard; >>> + bs->discard_alignment = bs->file->discard_alignment; >>> + bs->max_write_zeroes = bs->file->max_write_zeroes; >>> + bs->write_zeroes_alignment = bs->file->write_zeroes_alignment; >>> return 0; >> What about introducing a BlockLimits struct? > Good idea. > > Do you like the rest of the series? Yes, I do. Paolo
diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 0bfa5fc..dfdb375 100644 --- a/block/raw_bsd.c +++ b/block/raw_bsd.c @@ -149,6 +149,10 @@ static int raw_create(const char *filename, QEMUOptionParameter *options) static int raw_open(BlockDriverState *bs, QDict *options, int flags) { bs->sg = bs->file->sg; + bs->max_discard = bs->file->max_discard; + bs->discard_alignment = bs->file->discard_alignment; + bs->max_write_zeroes = bs->file->max_write_zeroes; + bs->write_zeroes_alignment = bs->file->write_zeroes_alignment; return 0; }
Signed-off-by: Peter Lieven <pl@kamp.de> --- block/raw_bsd.c | 4 ++++ 1 file changed, 4 insertions(+)