btrfs: add support for passing in write hints for buffered writes
authorJens Axboe <axboe@kernel.dk>
Tue, 27 Jun 2017 17:51:28 +0000 (11:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Jun 2017 18:05:52 +0000 (12:05 -0600)
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Chris Mason <clm@fb.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/btrfs/extent_io.c

index 19eedf2e630b5b34d36b3aed4fbb94a9429619c9..d1cd60140817b93f7682b80bcfdbeca7fd263259 100644 (file)
@@ -2830,6 +2830,7 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree,
        bio_add_page(bio, page, page_size, offset);
        bio->bi_end_io = end_io_func;
        bio->bi_private = tree;
+       bio->bi_write_hint = page->mapping->host->i_write_hint;
        bio_set_op_attrs(bio, op, op_flags);
        if (wbc) {
                wbc_init_bio(wbc, bio);