Skip to content
  • Mike Fleetwood's avatar
    Make FS_Info (blkid) cache incrementally loadable (#148) · 1e813d83
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    Since changes for issue #131 "GParted hangs when non-named device is
    hung" FS_Info cache is initialised, cleared and loaded via one call to
    load_cache_for_paths().  It runs blkid for named or found disk devices
    and associated found partitions from /proc/partitions, rather than
    running blkid and letting it report for all block devices.
    
    To avoid the possibility of using blkid on an encryption mapping on a
    non-specified and possibly hung block device GParted can't just specify
    all encryption mappings.  Instead only encryption mappings which belong
    to the above identified block devices should be probed.  That requires
    identifying LUKS encryption data in the block devices first so will
    require subsequently loading additional data into the FS_Info cache and
    running blkid again.
    
    To accommodate this make the FS_Info cache incrementally loadable,
    rather than doing everything in a single call to load_cache_for_paths().
    Have a separate clear_cache() call which initialises and clears the
    cache and make load_cache_for_paths() just run blkid and insert data for
    the named paths.
    
    Closes 148 - Encrypted file systems are no longer recognised
    1e813d83