Re: [Qemu-devel] [PATCH v6 07/33] util: introduce qemu_file_get_page_size()

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

 



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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux