public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Mantas Mikulėnas" <grawity@gmail.com>
Cc: kerolasa@gmail.com, Sami Kerola <kerolasa@iki.fi>,
	util-linux@vger.kernel.org
Subject: Re: lslocks – "failed to parse pid: 'WRITE'"
Date: Tue, 12 Feb 2013 12:12:48 +0100	[thread overview]
Message-ID: <20130212111248.GG20408@x2.net.home> (raw)
In-Reply-To: <51197D69.6050901@gmail.com>

On Tue, Feb 12, 2013 at 01:23:21AM +0200, Mantas Mikulėnas wrote:
> On 2013-02-12 00:42, Sami Kerola wrote:
> > Karel, and others, what do you think about adding a mode
> > to output listing which some might say is not a mode at all?
> 
> Just tested the patch and it works here, but wouldn't it be better to
> add a "waiting" flag to the mode display, or something like that?
> ("WAIT-READ" and "WAIT-WRITE"?)
> 
> 
> 
> Side note: It seems that fs/locks.c:lock_get_status can output many
> other variations – e.g. mandatory locks have a third type called
> "ACCESS", shown when a program tries to simply read/write a locked file;
> in this case listing the R/W mode might be more useful than "WAITING".
> Mandatory locks can apparently say "RW" as well, although I haven't
> found a way to create a "RW" lock yet.

 Yes, IMHO we have to follow kernel and keep the original string in
 the MODE column.

> Also, while I haven't yet seen this in practice either, the same
> fs/locks.c can output lock type "LEASE", which has completely different
> values for the 3rd field, and cannot be represented by a binary
> "M[andatory] = 0/1" column.

 Good point. This should be fixed. I think that lease locks could be
 also interpreted as mandatory (so "1" should be used in "M" column). 
 
 But you're right that we need something more to describe lease locks
 -- probably by another column "PROCMODE" (process mode) and use
 keywords BREAKING, ACTIVE and BREAKER from kernel.  
 
 Maybe we can use the same column to identify blocked flock/posix
 processes (by BLOCKED keyword) as I described in my previous email.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2013-02-12 11:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 14:42 lslocks – "failed to parse pid: 'WRITE'" Mantas M.
2013-02-11 22:42 ` Sami Kerola
2013-02-11 23:23   ` Mantas Mikulėnas
2013-02-12 11:12     ` Karel Zak [this message]
2013-02-12 11:23       ` Sami Kerola
2013-02-12 11:56         ` Bernhard Voelker
2013-02-12 13:18           ` Karel Zak
2013-02-14 15:02             ` Karel Zak
2013-02-12 13:20         ` Karel Zak
2013-02-14 15:44         ` Karel Zak
2013-02-12 10:35   ` Karel Zak

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=20130212111248.GG20408@x2.net.home \
    --to=kzak@redhat.com \
    --cc=grawity@gmail.com \
    --cc=kerolasa@gmail.com \
    --cc=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox