OSDN Git Service

btrfs: start deprecation of mount option inode_cache
authorDavid Sterba <dsterba@suse.com>
Thu, 18 Jun 2020 12:54:56 +0000 (14:54 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:28 +0000 (12:55 +0200)
commitb547a88ea5776a8092f7f122ddc20d6720528782
tree01bb45a094848a33884ebe86aa680a70c5fee696
parenta2570ef330b959eb37e3a437b9884d9cc4b6a3d9
btrfs: start deprecation of mount option inode_cache

Estimated time of removal of the functionality is 5.11, the option will
be still parsed but will have no effect.

Reasons for deprecation and removal:

- very poor naming choice of the mount option, it's supposed to cache
  and reuse the inode _numbers_, but it sounds a some generic cache for
  inodes

- the only known usecase where this option would make sense is on a
  32bit architecture where inode numbers in one subvolume would be
  exhausted due to 32bit inode::i_ino

- the cache is stored on disk, consumes space, needs to be loaded and
  written back

- new inode number allocation is slower due to lookups into the cache
  (compared to a simple increment which is the default)

- uses the free-space-cache code that is going to be deprecated as well
  in the future

Known problems:

- since 2011, returning EEXIST when there's not enough space in a page
  to store all checksums, see commit 4b9465cb9e38 ("Btrfs: add mount -o
  inode_cache")

Remaining issues:

- if the option was enabled, new inodes created, the option disabled
  again, the cache is still stored on the devices and there's currently
  no way to remove it

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c