All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mantas Mikulėnas" <grawity@gmail.com>
To: kerolasa@gmail.com
Cc: Sami Kerola <kerolasa@iki.fi>, util-linux@vger.kernel.org
Subject: Re: lslocks – "failed to parse pid: 'WRITE'"
Date: Tue, 12 Feb 2013 01:23:21 +0200	[thread overview]
Message-ID: <51197D69.6050901@gmail.com> (raw)
In-Reply-To: <CAG27Bk2dO1ztSAy47=j+nmG+v5YuMCBa0i4eorLWw2sFWRT2Pg@mail.gmail.com>

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.

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.

-- 
Mantas Mikulėnas <grawity@gmail.com>

  reply	other threads:[~2013-02-11 23:23 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 [this message]
2013-02-12 11:12     ` Karel Zak
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=51197D69.6050901@gmail.com \
    --to=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 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.