diff mbox

[PATCHv6,17/17] block/raw: copy BlockLimits on raw_open

Message ID 1382600811-20043-18-git-send-email-pl@kamp.de
State New
Headers show

Commit Message

Peter Lieven Oct. 24, 2013, 7:46 a.m. UTC
Signed-off-by: Peter Lieven <pl@kamp.de>
---
 block/raw_bsd.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Paolo Bonzini Oct. 24, 2013, 9:10 a.m. UTC | #1
Il 24/10/2013 08:46, Peter Lieven ha scritto:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  block/raw_bsd.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/block/raw_bsd.c b/block/raw_bsd.c
> index b0dd23f..49ac18c 100644
> --- a/block/raw_bsd.c
> +++ b/block/raw_bsd.c
> @@ -150,6 +150,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
>                      Error **errp)
>  {
>      bs->sg = bs->file->sg;
> +    bs->bl = bs->file->bl;
>      return 0;
>  }
>  
> 

This must be moved before the introduction of BlockLimits in the iscsi
driver, or patches that use BlockLimits in block.c will not have any effect.

Paolo
Peter Lieven Oct. 24, 2013, 9:12 a.m. UTC | #2
On 24.10.2013 11:10, Paolo Bonzini wrote:
> Il 24/10/2013 08:46, Peter Lieven ha scritto:
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>>   block/raw_bsd.c |    1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/block/raw_bsd.c b/block/raw_bsd.c
>> index b0dd23f..49ac18c 100644
>> --- a/block/raw_bsd.c
>> +++ b/block/raw_bsd.c
>> @@ -150,6 +150,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
>>                       Error **errp)
>>   {
>>       bs->sg = bs->file->sg;
>> +    bs->bl = bs->file->bl;
>>       return 0;
>>   }
>>   
>>
> This must be moved before the introduction of BlockLimits in the iscsi
> driver, or patches that use BlockLimits in block.c will not have any effect.
You are the first to mention this. I was thinking the whole series will
be seen as once so it shouldn't matter.

Peter
Paolo Bonzini Oct. 24, 2013, 10:06 a.m. UTC | #3
Il 24/10/2013 10:12, Peter Lieven ha scritto:
>> This must be moved before the introduction of BlockLimits in the iscsi
>> driver, or patches that use BlockLimits in block.c will not have any
>> effect.
> You are the first to mention this. I was thinking the whole series will
> be seen as once so it shouldn't matter.

In general, series should keep old functionality at all stages.  This
helps when someone reports a regression, because we can ask them to
bisect and not have them burdened by problems in the middle of a series.
 (It would also help you debugging things, if this series turned out to
have a bug).

After patch 10 of this series, an iSCSI array will stop receiving split
requests for large discards.  This may introduce spurious failures.

I made the same remark on patch 11, but that patch alone is not enough
to restore this; you need this one too for patch 11 to have any effect.
 So the correct order is patch 17 first, then patch 11, then patch 10.
In other word, remove code only after it has become dead.

Paolo
diff mbox

Patch

diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index b0dd23f..49ac18c 100644
--- a/block/raw_bsd.c
+++ b/block/raw_bsd.c
@@ -150,6 +150,7 @@  static int raw_open(BlockDriverState *bs, QDict *options, int flags,
                     Error **errp)
 {
     bs->sg = bs->file->sg;
+    bs->bl = bs->file->bl;
     return 0;
 }