From: Jeff Layton <jlayton@kernel.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: "J . Bruce Fields" <bfields@fieldses.org>,
Miklos Szeredi <miklos@szeredi.hu>,
linux-unionfs@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] locks: print unsigned ino in /proc/locks
Date: Sun, 22 Dec 2019 20:17:44 -0500 [thread overview]
Message-ID: <2f6dbf1777ae4b9870c077b8a34c79bf8ed8a554.camel@kernel.org> (raw)
In-Reply-To: <20191222184528.32687-1-amir73il@gmail.com>
On Sun, 2019-12-22 at 20:45 +0200, Amir Goldstein wrote:
> An ino is unsigned so export it as such in /proc/locks.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
>
> Hi Jeff,
>
> Ran into this while writing tests to verify i_ino == d_ino == st_ino on
> overlayfs. In some configurations (xino=on) overlayfs sets MSB on i_ino,
> so /proc/locks reports negative ino values.
>
> BTW, the requirement for (i_ino == d_ino) came from nfsd v3 readdirplus.
>
> Thanks,
> Amir.
>
> fs/locks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/locks.c b/fs/locks.c
> index 6970f55daf54..44b6da032842 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -2853,7 +2853,7 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
> }
> if (inode) {
> /* userspace relies on this representation of dev_t */
> - seq_printf(f, "%d %02x:%02x:%ld ", fl_pid,
> + seq_printf(f, "%d %02x:%02x:%lu ", fl_pid,
> MAJOR(inode->i_sb->s_dev),
> MINOR(inode->i_sb->s_dev), inode->i_ino);
> } else {
My that is an old bug! I think that goes back to early v2.x days, if not
v1.x. I'll queue it up, and maybe we can get this in for v5.6.
Thanks!
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2019-12-23 1:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 18:45 [PATCH] locks: print unsigned ino in /proc/locks Amir Goldstein
2019-12-23 1:17 ` Jeff Layton [this message]
2019-12-23 2:58 ` Amir Goldstein
2019-12-29 13:19 ` Jeff Layton
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=2f6dbf1777ae4b9870c077b8a34c79bf8ed8a554.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=amir73il@gmail.com \
--cc=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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;
as well as URLs for NNTP newsgroup(s).