* [Virtio-fs] F_SETLKW not supported
@ 2020-07-20 7:54 Aa Aa
2020-07-20 9:33 ` Miklos Szeredi
0 siblings, 1 reply; 3+ messages in thread
From: Aa Aa @ 2020-07-20 7:54 UTC (permalink / raw)
To: virtio-fs
Hi
I am trying to run some java apps via virtfs and some of the file locking (java) doesn't work. Here an exception (java) is thrown something about file locking:
Here is the strace output:
3541 [pid 12461] openat(AT_FDCWD, "/mnt/<redacted> O_WRONLY|O_CREAT|O_APPEND, 0666 <unfinished ...>
3542 [pid 12461] <... openat resumed>) = 180
3543 [pid 12461] fstat(180, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
3544 [pid 12461] fcntl(180, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0} <unfinished ...>
3545 [pid 12461] <... fcntl resumed>) = -1 EOPNOTSUPP (Operation not supported)
If I run this on the native file system, there is no issue. Should this functl be supported?
Cheers
JT
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Virtio-fs] F_SETLKW not supported
2020-07-20 7:54 [Virtio-fs] F_SETLKW not supported Aa Aa
@ 2020-07-20 9:33 ` Miklos Szeredi
2020-07-20 12:38 ` Vivek Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Miklos Szeredi @ 2020-07-20 9:33 UTC (permalink / raw)
To: Aa Aa; +Cc: virtio-fs-list, Vivek Goyal
On Mon, Jul 20, 2020 at 10:01 AM Aa Aa <jimbothom@yandex.com> wrote:
>
> Hi
>
> I am trying to run some java apps via virtfs and some of the file locking (java) doesn't work. Here an exception (java) is thrown something about file locking:
>
> Here is the strace output:
>
> 3541 [pid 12461] openat(AT_FDCWD, "/mnt/<redacted> O_WRONLY|O_CREAT|O_APPEND, 0666 <unfinished ...>
> 3542 [pid 12461] <... openat resumed>) = 180
> 3543 [pid 12461] fstat(180, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> 3544 [pid 12461] fcntl(180, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0} <unfinished ...>
> 3545 [pid 12461] <... fcntl resumed>) = -1 EOPNOTSUPP (Operation not supported)
I think that's due to an incomplete implementation of POSIX locks in virtiofsd.
Try "no_posix_lock" option: that should make locks work, but only
locally (i.e. inside the guest).
Vivek, do we maybe want to turn off remote posix locks by default
until the implementation is complete?
Thanks,
Miklos
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Virtio-fs] F_SETLKW not supported
2020-07-20 9:33 ` Miklos Szeredi
@ 2020-07-20 12:38 ` Vivek Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Vivek Goyal @ 2020-07-20 12:38 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: virtio-fs-list
On Mon, Jul 20, 2020 at 11:33:32AM +0200, Miklos Szeredi wrote:
> On Mon, Jul 20, 2020 at 10:01 AM Aa Aa <jimbothom@yandex.com> wrote:
> >
> > Hi
> >
> > I am trying to run some java apps via virtfs and some of the file locking (java) doesn't work. Here an exception (java) is thrown something about file locking:
> >
> > Here is the strace output:
> >
> > 3541 [pid 12461] openat(AT_FDCWD, "/mnt/<redacted> O_WRONLY|O_CREAT|O_APPEND, 0666 <unfinished ...>
> > 3542 [pid 12461] <... openat resumed>) = 180
> > 3543 [pid 12461] fstat(180, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> > 3544 [pid 12461] fcntl(180, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0} <unfinished ...>
> > 3545 [pid 12461] <... fcntl resumed>) = -1 EOPNOTSUPP (Operation not supported)
>
> I think that's due to an incomplete implementation of POSIX locks in virtiofsd.
>
> Try "no_posix_lock" option: that should make locks work, but only
> locally (i.e. inside the guest).
>
> Vivek, do we maybe want to turn off remote posix locks by default
> until the implementation is complete?
Hi Miklos,
Disabling it by default till we support blocking version of locks is
probably a good idea. That way it will work out of box without
having to specify no_posix_lock. Anyway, we don't support virtiofs
in shared mode yet. I will send a patch.
Thanks
Vivek
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-20 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-20 7:54 [Virtio-fs] F_SETLKW not supported Aa Aa
2020-07-20 9:33 ` Miklos Szeredi
2020-07-20 12:38 ` Vivek Goyal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.