The Wednesday 05 Mar 2014 à 16:00:49 (+0100), Kevin Wolf wrote :
> For sg backends, bs->request_alignment is meaningless and may be 0.
>
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
> block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block.c b/block.c
> index 38bbdf3..f01b91c 100644
> --- a/block.c
> +++ b/block.c
> @@ -935,7 +935,7 @@ static int bdrv_open_common(BlockDriverState *bs,
> BlockDriverState *file,
>
> bdrv_refresh_limits(bs);
> assert(bdrv_opt_mem_align(bs) != 0);
> - assert(bs->request_alignment != 0);
> + assert((bs->request_alignment != 0) || bs->sg);
>
> #ifndef _WIN32
> if (bs->is_temporary) {
> --
> 1.8.1.4
>
>
Reviewed-by: Benoit Canet <ben...@irqsave.net>