All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Andrey Vagin <avagin@openvz.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-doc@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jeff Layton <jlayton@poochiereds.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Pavel Emelyanov <xemul@parallels.com>
Subject: Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X
Date: Fri, 6 Mar 2015 11:38:05 +0300	[thread overview]
Message-ID: <20150306083805.GD2263@moon> (raw)
In-Reply-To: <1425569838-20416-1-git-send-email-avagin@openvz.org>

On Thu, Mar 05, 2015 at 06:37:18PM +0300, Andrey Vagin wrote:
> Let's show locks which are associated with a file descriptor in
> its fdinfo file.
> 
> Currently we don't have a reliable way to determine who holds a lock.
> We can find some information in /proc/locks, but PID which is reported
> there can be wrong. For example, a process takes a lock, then forks a
> child and dies. In this case /proc/locks contains the parent pid, which
> can be reused by another process.
> 
> $ cat /proc/locks
> ...
> 6: FLOCK  ADVISORY  WRITE 324 00:13:13431 0 EOF
> ...
> 
> $ ps -C rpcbind
>   PID TTY          TIME CMD
>   332 ?        00:00:00 rpcbind
> 
...

Looks reasonable to me, thanks!
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>

  parent reply	other threads:[~2015-03-06  8:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 15:37 [PATCH] proc: show locks in /proc/pid/fdinfo/X Andrey Vagin
2015-03-05 19:11 ` Jeff Layton
2015-03-06 14:19   ` Andrew Vagin
2015-03-06  8:38 ` Cyrill Gorcunov [this message]
2015-03-06 14:41 ` J. Bruce Fields
2015-03-07 13:00   ` Jeff Layton
2015-03-11 22:08 ` Andrew Morton
2015-03-12 15:54   ` Andrew Vagin
2015-03-12 19:23     ` Andrew Morton
2015-03-12 21:31       ` Andrey Wagin
2015-03-12 16:30 ` [PATCH] selftest: add a test case to check how locks are shown in fdinfo Andrey Vagin
2015-03-12 20:43   ` Shuah Khan
2015-03-13  9:34     ` Andrew Vagin
2015-03-13 13:46       ` Shuah Khan

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=20150306083805.GD2263@moon \
    --to=gorcunov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=bfields@fieldses.org \
    --cc=corbet@lwn.net \
    --cc=jlayton@poochiereds.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xemul@parallels.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.