linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: NeilBrown <neilb@suse.de>, Bart Van Assche <bvanassche@acm.org>
Cc: Martin Steigerwald <martin@lichtvoll.de>,
	linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: Assumption on fixed device numbers in Plasma's desktop search Baloo
Date: Sat, 26 Jun 2021 09:14:08 +0300	[thread overview]
Message-ID: <7d12d49d-1dbf-566e-cb92-84e68ab67e23@gmail.com> (raw)
In-Reply-To: <162468466604.26869.10474422208964999454@noble.neil.brown.name>

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
> 


  reply	other threads:[~2021-06-26  6:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 19:06 Assumption on fixed device numbers in Plasma's desktop search Baloo Martin Steigerwald
2021-06-26  0:27 ` Qu Wenruo
2021-06-26  8:49   ` Martin Steigerwald
2021-06-26  9:33     ` Qu Wenruo
2021-06-26 10:18       ` Martin Steigerwald
2021-06-26  0:54 ` NeilBrown
2021-06-26  3:38   ` Bart Van Assche
2021-06-26  5:17     ` NeilBrown
2021-06-26  6:14       ` Andrei Borzenkov [this message]
2021-06-26  6:24         ` Qu Wenruo
2021-06-26  8:51   ` Martin Steigerwald

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=7d12d49d-1dbf-566e-cb92-84e68ab67e23@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=martin@lichtvoll.de \
    --cc=neilb@suse.de \
    /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).