qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] block: align bounce buffers to page


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/1] block: align bounce buffers to page
Date: Mon, 02 Feb 2015 17:47:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


On 02/02/2015 17:44, Denis V. Lunev wrote:
> +++ b/block/raw-posix.c
> @@ -667,7 +667,8 @@ static void raw_refresh_limits(BlockDriverState *bs, 
> Error **errp)
>      BDRVRawState *s = bs->opaque;
>  
>      raw_probe_alignment(bs, s->fd, errp);
> -    bs->bl.opt_mem_alignment = s->buf_align;
> +    bs->bl.min_mem_alignment = s->buf_align;
> +    bs->bl.opt_mem_alignment = MAX(sysconf(_SC_PAGESIZE), s->buf_align);

This does not exist on Windows.  You have to use getpagesize(), for
which there is a wrapper in util/oslib-win32.c.

Paolo

>      raw_probe_max_write_zeroes(bs);



reply via email to

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