From: Matthew Wilcox <willy@debian.org>
To: Alexander Viro <viro@math.psu.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ->i_dev switched to dev_t
Date: Fri, 5 Jul 2002 17:46:43 +0100 [thread overview]
Message-ID: <20020705174643.D27706@parcelfarce.linux.theplanet.co.uk> (raw)
[apologies for the mangling; this is what happens when you have to
copy and paste from a web archive]
you wrote:
> * ->i_dev followed the example of ->s_dev - it's dev_t now. All
> remaining uses of ->i_dev either outright want dev_t (stat()) or couldn't
> care less (printing major:minor in /proc/<pid>/maps, etc.)
[...]
> diff -urN C24-0/fs/locks.c C24-current/fs/locks.c
> --- C24-0/fs/locks.c Thu Jun 20 13:37:25 2002
> +++ C24-current/fs/locks.c Wed Jul 3 04:26:31 2002
> @@ -1751,9 +1751,12 @@
> ? (fl->fl_type & F_UNLCK) ? "UNLCK" : "READ "
> : (fl->fl_type & F_WRLCK) ? "WRITE" : "READ ");
> }
> + /*
> + * NOTE: it should be inode->i_sb->s_id, not kdevname(...).
> + */
> out += sprintf(out, "%d %s:%ld ",
> fl->fl_pid,
> - inode ? kdevname(inode->i_dev) : "<none>",
> + inode ? kdevname(to_kdev_t(inode->i_dev)) : "<none>",
> inode ? inode->i_ino : 0);
> out += sprintf(out, "%Ld ", fl->fl_start);
> if (fl->fl_end == OFFSET_MAX)
why not:
> - out += sprintf(out, "%d %s:%ld ",
> + out += sprintf(out, "%d %02x:%02x:%ld ",
> fl->fl_pid,
> - inode ? kdevname(inode->i_dev) : "<none>",
> + inode ? MAJOR(inode->i_dev), MINOR(inode->i_dev) : "<none>",
you've done things like this elsewhere where you didn't want to change
the format of a file in /proc yet.
--
Revolutions do not require corporate support.
next reply other threads:[~2002-07-05 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-05 16:46 Matthew Wilcox [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-05 5:32 Alexander Viro
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=20020705174643.D27706@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@math.psu.edu \
/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
all inboxes | Powered by JetHome®