diff options
author | Christoph Hellwig <hch@lst.de> | 2023-03-27 09:49:51 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-04-17 18:01:22 +0200 |
commit | 3480373ebdf7625ee29bee6508c9fc4ae70c00bf (patch) | |
tree | dddeb5c65b5a3d8dd35e31347916ac7d4846ce7b /include/linux/bio.h | |
parent | 0a0596fbbe5bddd28b1dfae7e7ecb6d70bdbf059 (diff) | |
download | lwn-3480373ebdf7625ee29bee6508c9fc4ae70c00bf.tar.gz lwn-3480373ebdf7625ee29bee6508c9fc4ae70c00bf.zip |
btrfs, block: move REQ_CGROUP_PUNT to btrfs
REQ_CGROUP_PUNT is a bit annoying as it is hard to follow and adds
a branch to the bio submission hot path. To fix this, export
blkcg_punt_bio_submit and let btrfs call it directly. Add a new
REQ_FS_PRIVATE flag for btrfs to indicate to it's own low-level
bio submission code that a punt to the cgroup submission helper
is required.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index d766be7152e1..b3e7529ff55e 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -500,6 +500,7 @@ void bio_associate_blkg(struct bio *bio); void bio_associate_blkg_from_css(struct bio *bio, struct cgroup_subsys_state *css); void bio_clone_blkg_association(struct bio *dst, struct bio *src); +void blkcg_punt_bio_submit(struct bio *bio); #else /* CONFIG_BLK_CGROUP */ static inline void bio_associate_blkg(struct bio *bio) { } static inline void bio_associate_blkg_from_css(struct bio *bio, @@ -507,6 +508,10 @@ static inline void bio_associate_blkg_from_css(struct bio *bio, { } static inline void bio_clone_blkg_association(struct bio *dst, struct bio *src) { } +static inline void blkcg_punt_bio_submit(struct bio *bio) +{ + submit_bio(bio); +} #endif /* CONFIG_BLK_CGROUP */ static inline void bio_set_dev(struct bio *bio, struct block_device *bdev) |