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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 8569CC433DB for ; Wed, 24 Mar 2021 07:45:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FFDF619FB for ; Wed, 24 Mar 2021 07:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbhCXHoc (ORCPT ); Wed, 24 Mar 2021 03:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbhCXHo3 (ORCPT ); Wed, 24 Mar 2021 03:44:29 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6A03C061763; Wed, 24 Mar 2021 00:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AjhZ2CVIIKjR5isQC6sJ/24i99ctPOUtMKvV5qXF0xo=; b=IOmFqAHA8XBS4+6O0mpzjzYRae B1ys2xUT6rxBMk4sgdkyX6jTWMKUBaHQNKaPBp70tGMXQYhMaJQOj9TWfo2ONlGlm+wzTGpMakf6f N7kwFlK3Vl5z23eVQ/ZAAwvf0wDFYLgqhTAdhABjiYp+BeVk1af3i6nZdPfU/9ttFO4aABwJ72JAg fubbFCncJww+o/hOD7Fy5FEGotQpnB16aHDV7wwVy4/pGkyi4tV9yEk0T++f0KLug4oee9IaTZ5eH XNSq0kMXV/XypVwmGWQn6JdDaqWkQ7YUZievOvUZF2/NtQbOD1C7E8kPVQ5ItimWZtpkSbfdJeGR/ J07I9N0w==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lOyAg-00B6jN-AB; Wed, 24 Mar 2021 07:43:35 +0000 Date: Wed, 24 Mar 2021 07:43:18 +0000 From: Christoph Hellwig To: Amir Goldstein Cc: Dave Chinner , "Darrick J . Wong" , Jan Kara , Christian Brauner , linux-xfs , linux-fsdevel , Linux API , "J. Bruce Fields" Subject: Re: [PATCH] xfs: use a unique and persistent value for f_fsid Message-ID: <20210324074318.GA2646094@infradead.org> References: <20210322171118.446536-1-amir73il@gmail.com> <20210322230352.GW63242@dread.disaster.area> <20210323072607.GF63242@dread.disaster.area> <20210324005421.GK63242@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Mar 24, 2021 at 08:53:25AM +0200, Amir Goldstein wrote: > > This also means that userspace can be entirely filesystem agnostic > > and it doesn't need to rely on parsing proc files to translate > > ephemeral mount IDs to paths, statvfs() and hoping that f_fsid is > > stable enough that it doesn't get the destination wrong. It also > > means that fanotify UAPI probably no longer needs to supply a > > f_fsid with the filehandle because it is built into the > > filehandle.... > > > > That is one option. Let's call it the "bullet proof" option. > > Another option, let's call it the "pragmatic" options, is that you accept > that my patch shouldn't break anything and agree to apply it. Your patch may very well break something. Most Linux file systems do store the dev_t in the fsid and userspace may for whatever silly reasons depend on it. Also trying to use the fsid for anything persistent is plain stupid, 64-bits are not enough entropy for such an identifier. You at least need a 128-bit UUID-like identifier for that. So I think this whole discussion is going in the wrong direction. Is exposing a stable file system identifier useful? Yes, for many reasons. Is repurposing the fsid for that a good idea? Hell no.