qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 07/33] util: introduce qemu_file_get_page_siz


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH v6 07/33] util: introduce qemu_file_get_page_size()
Date: Sat, 31 Oct 2015 12:37:56 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

On 31.10.2015 10:26, Xiao Guangrong wrote:


On 10/30/2015 09:26 PM, Vladimir Sementsov-Ogievskiy wrote:
logic is changed:
     in old version gethugepagesize on statfs error generates exit(1)
in new it returns getpagesize() in this case (through fd_getpagesize)
(I think, fd_getpagesize should be fixed to handle error)

Indeed. I will let fd_getpagesize() return 0 if statfs is failed, then the caller
handle the error properly.

Why not use classic error codes < 0? Just change size_t to ssize_t and return exactly fstatfs return value.



also, in new version for windows we have getpagesize(), when in old version there was no difference (how did it work?). May be it's ok, but should be mentioned in commit message

Windows did not support file hugepage, so it will return normal page for this
case. And this interface has not been used on windows so far.

I will document it in the commit message as your suggestion.


--
Best regards,
Vladimir
* now, @virtuozzo.com instead of @parallels.com. Sorry for this inconvenience.




reply via email to

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