]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: punt all bios created in btrfs_submit_compressed_write()
authorDennis Zhou <dennis@kernel.org>
Thu, 12 Dec 2019 00:07:06 +0000 (16:07 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Dec 2019 15:07:16 +0000 (16:07 +0100)
commit8cfc6f86d1592acdbe5bf509710cfeb393597966
tree2113465e2c867f36fffb374fe49417982584eaa6
parentf7a10d4555de7b8c5e3e8b3f03f0eba952d0752d
btrfs: punt all bios created in btrfs_submit_compressed_write()

Compressed writes happen in the background via kworkers. However, this
causes bios to be attributed to root bypassing any cgroup limits from
the actual writer. We tag the first bio with REQ_CGROUP_PUNT, which will
punt the bio to an appropriate cgroup specific workqueue and attribute
the IO properly. However, if btrfs_submit_compressed_write() creates a
new bio, we don't tag it the same way. Add the appropriate tagging for
subsequent bios.

Fixes: 1e41e169553e5 ("Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios")
Reviewed-by: Chris Mason <clm@fb.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c