Re: Assumption on fixed device numbers in Plasma's desktop search Baloo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux