]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add support for blkio controllers
authorChris Mason <clm@fb.com>
Thu, 2 Jul 2015 20:57:22 +0000 (13:57 -0700)
committerChris Mason <clm@fb.com>
Sun, 9 Aug 2015 14:35:06 +0000 (07:35 -0700)
commitac21b5e183e34f8a970c1eb3fff769e4fdee9ccb
tree3a2cf977b893863ce5938132a802804a56291f05
parent88c0d028880933488ac87d16d552842b2cfbe0b5
Btrfs: add support for blkio controllers

This attaches accounting information to bios as we submit them so the
new blkio controllers can throttle on btrfs filesystems.

Not much is required, we're just associating bios with blkcgs during clone,
calling wbc_init_bio()/wbc_account_io() during writepages submission,
and attaching the bios to the current context during direct IO.

Finally if we are splitting bios during btrfs_map_bio, this attaches
accounting information to the split.

The end result is able to throttle nicely on single disk filesystems.  A
little more work is required for multi-device filesystems.

Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/super.c
fs/btrfs/volumes.c