summaryrefslogtreecommitdiff
path: root/fs/btrfs/bio.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-03-27 03:49:51 +0300
committerDavid Sterba <dsterba@suse.com>2023-04-17 19:01:22 +0300
commit3480373ebdf7625ee29bee6508c9fc4ae70c00bf (patch)
treedddeb5c65b5a3d8dd35e31347916ac7d4846ce7b /fs/btrfs/bio.h
parent0a0596fbbe5bddd28b1dfae7e7ecb6d70bdbf059 (diff)
downloadlinux-3480373ebdf7625ee29bee6508c9fc4ae70c00bf.tar.xz
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 'fs/btrfs/bio.h')
-rw-r--r--fs/btrfs/bio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/bio.h b/fs/btrfs/bio.h
index dbf125f6fa33..8edf3c35eead 100644
--- a/fs/btrfs/bio.h
+++ b/fs/btrfs/bio.h
@@ -88,6 +88,9 @@ static inline void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status)
/* Bio only refers to one ordered extent. */
#define REQ_BTRFS_ONE_ORDERED REQ_DRV
+/* Submit using blkcg_punt_bio_submit. */
+#define REQ_BTRFS_CGROUP_PUNT REQ_FS_PRIVATE
+
void btrfs_submit_bio(struct btrfs_bio *bbio, int mirror_num);
int btrfs_repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
u64 length, u64 logical, struct page *page,