https://bugs.kde.org/show_bug.cgi?id=525145

            Bug ID: 525145
           Summary: Whole index invalidated on kernel 7.2: document IDs
                    derive from statvfs f_fsid, which btrfs changed
    Classification: Frameworks and Libraries
           Product: frameworks-baloo
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
Baloo builds its document IDs from the statvfs f_fsid
(src/engine/idutils.h, statWithFsid). Kernel 7.2 changed what btrfs
reports there:

  btrfs: derive f_fsid from on-disk fsid and dev_t
  https://git.kernel.org/linus/c2a74ed0494c2736486b49c52767b2f50b83425f

So after the first boot on 7.2, every file has a new document ID: the
whole existing index is unreachable and gets rebuilt from scratch, while
the old documents are never dropped.

STEPS TO REPRODUCE
1. Home on btrfs, fully indexed under a kernel < 7.2.
2. Boot a kernel >= 7.2.
3. balooshow6 <any previously indexed file>

OBSERVED RESULT
Device ID mismatch for every file (DB 1327508 <-> FS 1359047), the whole
home is content-indexed again, and the index grew from 2.06 to 2.18 GiB
in 30 minutes. The 519,775 stale documents stay in the database until
"balooctl6 purge".

EXPECTED RESULT
Document IDs that survive an f_fsid change, or detect the change and
rebuild cleanly instead of accumulating unreachable documents.

SOFTWARE/OS VERSIONS
Baloo 6.30.0, KDE Linux image 202609021142,
kernel 7.2.2-arch1-1 (previous boot 7.1.10-arch1-1),
btrfs on dm-crypt, home on its own subvolume.

Since dev_t is now part of f_fsid, the index will be invalidated again if
the block device's number ever changes.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to