summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-06-14 20:30:42 -0600
committerJens Axboe <axboe@fb.com>2017-06-17 13:57:09 -0600
commitc60d13a21283e92f0c8dea06a99e6341a994f633 (patch)
tree28f27fead712252163bfc4a67be45dd932487fa2
parent2526f8cdc69299cf149b3ab24a52478d8f6522e9 (diff)
xfs: add support for passing in write hints for buffered writes
Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/xfs/xfs_aops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 09af0f7cd55e..040789c51930 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -505,6 +505,7 @@ xfs_submit_ioend(
return status;
}
+ ioend->io_bio->bi_opf |= write_hint_to_opf(inode_write_hint(ioend->io_inode));
submit_bio(ioend->io_bio);
return 0;
}
@@ -564,6 +565,7 @@ xfs_chain_bio(
bio_chain(ioend->io_bio, new);
bio_get(ioend->io_bio); /* for xfs_destroy_ioend */
ioend->io_bio->bi_opf = REQ_OP_WRITE | wbc_to_write_flags(wbc);
+ ioend->io_bio->bi_opf |= write_hint_to_opf(inode_write_hint(ioend->io_inode));
submit_bio(ioend->io_bio);
ioend->io_bio = new;
}