From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D52F5C2D0CE for ; Sun, 29 Dec 2019 13:19:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0305207FD for ; Sun, 29 Dec 2019 13:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577625587; bh=Uvs+Fo1+JPdzN0Tz8dPt06V4gWYWykuZzmBlGbxYL20=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=q50FUYkF5e4NPO20Clpw5iH1yIJeP4OQQhKQUKE0IlPOv7t1WDHiCxp7FKL1+XR+o lWHI4ESo2aWxPNrVE1aAgyhjOt+Gkg/tA8kTqbkNTOpgCQML99GVSDhNx7ltwlL1I+ DkTPaXO+CE0MyCuM3jeOKLafdRfM4MTGBVHo9E5s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbfL2NTq (ORCPT ); Sun, 29 Dec 2019 08:19:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:41604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbfL2NTq (ORCPT ); Sun, 29 Dec 2019 08:19:46 -0500 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7133F20748; Sun, 29 Dec 2019 13:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577625586; bh=Uvs+Fo1+JPdzN0Tz8dPt06V4gWYWykuZzmBlGbxYL20=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Z8CrBqYRqykNjlDeKRR0PI0Lv5GBww+zRJhtlXkMVq+dPcH2Exh/lUm+7l78iQQ3h mhXAWCNVGUke9+QQqw4SlFjkzXQGDpsB16eNFbrTQG9KeiEjIEY3EYjHVXk6aFU2I2 HQDIO/HGjIXIT7F76koPsYMG83Z5AXfC+1DilRO0= Message-ID: <52abe8f14c6ef1db9c9a3327f4c1f941318945d6.camel@kernel.org> Subject: Re: [PATCH] locks: print unsigned ino in /proc/locks From: Jeff Layton To: Amir Goldstein Cc: "J . Bruce Fields" , Miklos Szeredi , overlayfs , Linux NFS Mailing List , linux-fsdevel Date: Sun, 29 Dec 2019 08:19:44 -0500 In-Reply-To: References: <20191222184528.32687-1-amir73il@gmail.com> <2f6dbf1777ae4b9870c077b8a34c79bf8ed8a554.camel@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, 2019-12-23 at 04:58 +0200, Amir Goldstein wrote: > On Mon, Dec 23, 2019 at 3:17 AM Jeff Layton wrote: > > 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 > > > --- > > > > > > 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. > > I suppose you meant for v5.5? > I'd be happy if we can also mark it for stable (sorry I did not). > Reason is that I have xfstests depending on it, which test overlay > fixes that are marked for stable. > Oh! I didn't realize the urgency. It's been in -next for a week or so now, so I think it's probably safe enough. I'll send a PR soon, after I give it a bit more testing. Thanks! -- Jeff Layton