Skip to content
Commit c735faf5 authored by Tomáš Trnka's avatar Tomáš Trnka Committed by Nate Graham
Browse files

Use the FSID as the device identifier where possible

The device number returned by stat() in st_dev is not persistent in many
cases. Btrfs subvolumes or partitions on NVMe devices are assigned
device numbers dynamically, so the resulting device ID is typically
different after every reboot, forcing Baloo to repeatedly reindex all
files.

Fortunately, filesystems like Btrfs or ext4 return a persistent
unique filesystem ID as f_fsid from statvfs(), so we can use that when
available. Other filesystems like XFS derive the FSID from the device
number of the underlying block device, so switching to the FSID does not
change anything.

BUG: 402154
CCBUG: 471289
parent af7c004a
Pipeline #475670 passed with stage
in 1 minute and 35 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment