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=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 BE729C49EA6 for ; Sat, 26 Jun 2021 06:14:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 994CA6193D for ; Sat, 26 Jun 2021 06:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhFZGQg (ORCPT ); Sat, 26 Jun 2021 02:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbhFZGQg (ORCPT ); Sat, 26 Jun 2021 02:16:36 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D7F8C061574; Fri, 25 Jun 2021 23:14:13 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id x20so8965330ljc.5; Fri, 25 Jun 2021 23:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=swrb0R0KYvrRixLiGr9Pp1BV3nCvg4OOcehd6uuLTQE=; b=iwXlHgYitQz/bDt3HhNdWrwZzg6C7vMVEulGzAN9uKp6jch8ngYyCxsGoio83AoUpv BEb5ppw6PZQ1vlOvlPTgf2nSS+yhm4f0t+Ntd8+BFu/vE/yLPHU6Lofk6phUfkpG/tOu VnOcoSX7ESTergt8nffNbeqP6GQE4HekrIPzkoptt0rjtbCkBEd6c8ViDOMyQd5hDou2 kxkEyfx6wlRIsO+2Anr1lS/nxnFDOluA/k69TmzV4LLWmm8DbLbabb53Z1u8iDvuijlM 64QLST6TyPKEWfjyp8rUmD2jpTqiIwsOzxPvJw3XspJ3+lLyHSxGmwLpnh8b6GKrlGjm gjaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=swrb0R0KYvrRixLiGr9Pp1BV3nCvg4OOcehd6uuLTQE=; b=R4J8lo59i9puQwBobr4Hr3s8prNYkz21v3Ey99lXy7aPY2UeKOW/FoV4H2gsgqVEL9 /geYPEZ09vJgKCbzhQGy3tHJZvdK4QEoMwBMylt1QCv11W7lXsXefaLNpm0Ljda8mB9/ dLCLGUoPG88koAndwOWtiRa/kgE8q4mLrh9NhBk6xz2kKyk/5ZxVhBLa9DBk/AJ9mTLc NF5/4xmvU5cNv2YZtz+1TzSPB74YqjHO66bTrjdFkkRSPIgpRY3aeGZEYJJj5Xqu2wIY kj2ERff3tLZffvcI4lDNYnzz5wdsrMd9F23+qNUJirA/lE1iHQO7wb2DLucg0e9go5IR lXFw== X-Gm-Message-State: AOAM530Pn/fxe4nTSb1V8YeFv1gShwNOsbBE2Kk/ZA0NOdT6Ob4xE/8S IIUJA0ptmyL2YeUJawZndW0JCFAI30q9CQ== X-Google-Smtp-Source: ABdhPJxSn9n/dKyLvpf0+N7tpHRAN/74R49xhR9EqOXmjZPomc9pZIKjr0JMPuZHXzqth8ncP5+W8g== X-Received: by 2002:a2e:95c9:: with SMTP id y9mr10931494ljh.401.1624688051306; Fri, 25 Jun 2021 23:14:11 -0700 (PDT) Received: from ?IPv6:2a00:1370:812d:b06a:db33:1924:b4f8:1d53? ([2a00:1370:812d:b06a:db33:1924:b4f8:1d53]) by smtp.gmail.com with ESMTPSA id z13sm686470lfb.40.2021.06.25.23.14.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jun 2021 23:14:10 -0700 (PDT) Subject: Re: Assumption on fixed device numbers in Plasma's desktop search Baloo To: NeilBrown , Bart Van Assche Cc: Martin Steigerwald , linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org References: <41661070.mPYKQbcTYQ@ananda> <162466884942.28671.6997551060359774034@noble.neil.brown.name> <162468466604.26869.10474422208964999454@noble.neil.brown.name> From: Andrei Borzenkov Message-ID: <7d12d49d-1dbf-566e-cb92-84e68ab67e23@gmail.com> Date: Sat, 26 Jun 2021 09:14:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <162468466604.26869.10474422208964999454@noble.neil.brown.name> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 26.06.2021 08:17, NeilBrown wrote: > On Sat, 26 Jun 2021, Bart Van Assche wrote: >> On 6/25/21 5:54 PM, NeilBrown wrote: >>> On Sat, 26 Jun 2021, Martin Steigerwald wrote: >>>> And that Baloo needs an "invariant" for >>>> a file. See comment #11 of that bug report: >>> >>> That is really hard to provide in general. Possibly the best approach >>> is to use the statfs() systemcall to get the "f_fsid" field. This is >>> 64bits. It is not supported uniformly well by all filesystems, but I >>> think it is at least not worse than using the device number. For a lot >>> of older filesystems it is just an encoding of the device number. >>> >>> For btrfs, xfs, ext4 it is much much better. >> >> How about combining the UUID of the partition with the file path? An >> example from one of the VMs on my workstation: > > A btrfs filesystem can span multiple partitions, and those partitions > can be added and removed dynamically. So you could migrated from one to > another. > I suspect it was intended to be "filesytemm UUID". At least that is the field in lsblk output that was referenced. > f_fsid really is best for any modern filesystem. > > NeilBrown >