Re: [Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-30 Thread piaojun
Hi Eric, On 2019/7/30 21:28, Eric Blake wrote: > On 7/29/19 7:27 PM, piaojun wrote: >> Use F_GETLK for fcntl when F_OFD_GETLK not defined. > > Which system are you hitting this problem on? > > The problem with F_GETLK is that it is NOT as safe as F_OFD_GETLK. > > We already have fcntl_op_getlk

Re: [Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-30 Thread Eric Blake
On 7/29/19 7:27 PM, piaojun wrote: > Use F_GETLK for fcntl when F_OFD_GETLK not defined. Which system are you hitting this problem on? The problem with F_GETLK is that it is NOT as safe as F_OFD_GETLK. We already have fcntl_op_getlk and qemu_probe_lock_ops() in util/osdep.c to not only determine

Re: [Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-30 Thread piaojun
Hi Liam, On 2019/7/30 20:22, Liam Merwick wrote: > On 30/07/2019 01:27, piaojun wrote: >> Use F_GETLK for fcntl when F_OFD_GETLK not defined. > > > Use F_GETLK/F_SETLK for fcntl when F_OFD_GETLK/F_OFD_SETLK not defined. > >> >> Signed-off-by: Jun Piao >> --- >> contrib/virtiofsd/passthrough_

Re: [Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-30 Thread Liam Merwick
On 30/07/2019 01:27, piaojun wrote: Use F_GETLK for fcntl when F_OFD_GETLK not defined. Use F_GETLK/F_SETLK for fcntl when F_OFD_GETLK/F_OFD_SETLK not defined. Signed-off-by: Jun Piao --- contrib/virtiofsd/passthrough_ll.c | 9 + 1 file changed, 9 insertions(+) diff --git a/con

[Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-29 Thread piaojun
Use F_GETLK for fcntl when F_OFD_GETLK not defined. Signed-off-by: Jun Piao --- contrib/virtiofsd/passthrough_ll.c | 9 + 1 file changed, 9 insertions(+) diff --git a/contrib/virtiofsd/passthrough_ll.c b/contrib/virtiofsd/passthrough_ll.c index 9ae1381..757785b 100644 --- a/contrib/vir