From: Maxim Patlasov <mpatlasov@virtuozzo.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: <fuse-devel@lists.sourceforge.net>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Kinsbursky Stanislav <skinsbursky@virtuozzo.com>
Subject: fuse does not show lock info in /proc/.../fdinfo/...
Date: Fri, 3 Jun 2016 11:49:20 -0700 [thread overview]
Message-ID: <5751D130.5010202@virtuozzo.com> (raw)
Hi Miklos,
fuse_file_lock() since its inception in 2006 implements F_SETLK command
like this:
> if (fc->no_lock)
> err = posix_lock_file(file, fl, NULL);
> else
> err = fuse_setlk(file, fl, 0);
where fc->no_lock is a per-mount-point tunable. It would be more natural
to posix-lock in both cases, like this:
> err = posix_lock_file(file, fl, NULL);
> if (!err && !fc->no_lock)
> err = fuse_setlk(file, fl, 0);
Otherwise, by default, when fc->no_lock=0, posix_lock_file() is never
called, and from end-user perspective it is weird that the file was
locked successfully, but "fdinfo" does not show the lock.
Do you think there were some reasons to implement it that way -- not
calling posix_lock_file unconditionally?
Thanks,
Maxim
next reply other threads:[~2016-06-03 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 18:49 Maxim Patlasov [this message]
2016-06-16 11:49 ` fuse does not show lock info in /proc/.../fdinfo/ Miklos Szeredi
2016-06-16 13:22 ` Stanislav Kinsburskiy
2016-06-16 16:07 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5751D130.5010202@virtuozzo.com \
--to=mpatlasov@virtuozzo.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=skinsbursky@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.