]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: add tracking of read blocks for read policy
authorAnand Jain <anand.jain@oracle.com>
Wed, 1 Jan 2025 18:06:34 +0000 (02:06 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:21 +0000 (14:53 +0100)
commit22fb0d99c90583e5b32a2a54e614bce221d31a8a
tree415a1b71244449696a328d190d6c330b3cd34987
parentb6bed20ed398f71069bfd2cd769bb91fa15859b5
btrfs: add tracking of read blocks for read policy

Track number of read blocks in the whole filesystem. The counter is
initialized when devices are opened. The counter is increased at
btrfs_submit_dev_bio() if the stats tracking is enabled (depends on the
read policy).  Stats tracking is disabled by default and is enabled
through fs_devices::collect_fs_stats when required.

The code is not under the EXPERIMENTAL define, as stats can be expanded
to include write counts and other performance counters, with the user
interface independent of its internal use.

This is an in-memory-only feature, not related to the dev error stats.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c
fs/btrfs/disk-io.c
fs/btrfs/fs.h
fs/btrfs/volumes.h