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

2015-11-09 Thread Michael S. Tsirkin
On Sat, Oct 31, 2015 at 04:09:56PM +0800, Xiao Guangrong wrote: > > > On 10/30/2015 11:54 PM, Eduardo Habkost wrote: > >On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > >>There are three places use the some logic to get the page size on > >>the file path or file fd > >> > >>This

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

2015-11-09 Thread Xiao Guangrong
On 11/09/2015 06:33 PM, Michael S. Tsirkin wrote: On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the file path or file fd This patch introduces qemu_file_get_page_size() to unify the code Signed-off-by: Xiao

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

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > There are three places use the some logic to get the page size on > the file path or file fd > > This patch introduces qemu_file_get_page_size() to unify the code > > Signed-off-by: Xiao Guangrong

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

2015-10-31 Thread Xiao Guangrong
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

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

2015-10-31 Thread Xiao Guangrong
On 10/30/2015 11:54 PM, Eduardo Habkost wrote: On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the file path or file fd This patch introduces qemu_file_get_page_size() to unify the code Signed-off-by: Xiao

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

2015-10-31 Thread Xiao Guangrong
On 10/30/2015 11:54 PM, Eduardo Habkost wrote: On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the file path or file fd This patch introduces qemu_file_get_page_size() to unify the code Signed-off-by: Xiao

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

2015-10-31 Thread Vladimir Sementsov-Ogievskiy
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

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

2015-10-31 Thread Eduardo Habkost
On Sat, Oct 31, 2015 at 04:09:56PM +0800, Xiao Guangrong wrote: > On 10/30/2015 11:54 PM, Eduardo Habkost wrote: > >On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > >>There are three places use the some logic to get the page size on > >>the file path or file fd > >> > >>This patch

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

2015-10-31 Thread Xiao Guangrong
On 10/31/2015 10:11 PM, Eduardo Habkost wrote: On Sat, Oct 31, 2015 at 04:09:56PM +0800, Xiao Guangrong wrote: On 10/30/2015 11:54 PM, Eduardo Habkost wrote: On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: There are three places use the some logic to get the page size on the

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

2015-10-31 Thread Xiao Guangrong
On 10/31/2015 05:37 PM, Vladimir Sementsov-Ogievskiy wrote: 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

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

2015-10-30 Thread Xiao Guangrong
There are three places use the some logic to get the page size on the file path or file fd This patch introduces qemu_file_get_page_size() to unify the code Signed-off-by: Xiao Guangrong --- include/qemu/osdep.h | 1 + target-ppc/kvm.c | 21

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

2015-10-30 Thread Vladimir Sementsov-Ogievskiy
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) also, in new version for windows we have getpagesize(), when in old version

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

2015-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote: > There are three places use the some logic to get the page size on > the file path or file fd > > This patch introduces qemu_file_get_page_size() to unify the code > > Signed-off-by: Xiao Guangrong