summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-06-13 10:43:42 -0600
committerJens Axboe <axboe@fb.com>2017-06-13 16:22:18 -0600
commita9cdb825ae5008e802753a83abf0e8dd4724bbd8 (patch)
treea2a2f173e41ddaa6f37ddc196af1c4b1c41c1602
parent5591aa2431a6498b8715c4ff4d9369370e670daf (diff)
btrfs: add support for passing in stream information for buffered writes
Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/btrfs/extent_io.c1
-rw-r--r--fs/btrfs/inode.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d3619e010005..b245085e8f10 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2827,6 +2827,7 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree,
bio->bi_end_io = end_io_func;
bio->bi_private = tree;
bio_set_op_attrs(bio, op, op_flags);
+ bio_set_streamid(bio, inode_streamid(page->mapping->host));
if (wbc) {
wbc_init_bio(wbc, bio);
wbc_account_io(wbc, page, page_size);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index ef3c98c527c1..db0558a19f65 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8608,6 +8608,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode,
atomic_set(&dip->pending_bios, 0);
btrfs_bio = btrfs_io_bio(io_bio);
btrfs_bio->logical = file_offset;
+ bio_set_streamid(io_bio, bio_stream(dio_bio));
if (write) {
io_bio->bi_end_io = btrfs_endio_direct_write;