summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-06-27 18:32:37 +0300
committerJens Axboe <axboe@kernel.dk>2017-06-27 21:05:44 +0300
commit0127251c45ae74befb21db17754a66f55feff6a8 (patch)
treef349154b3243d2be8bc6ba7b8d1a76f9bb10a5ca /fs/ext4
parent8e8f9298818c4c2754182d544158cb182581a9ab (diff)
downloadlinux-0127251c45ae74befb21db17754a66f55feff6a8.tar.xz
ext4: add support for passing in write hints for buffered writes
Reviewed-by: Andreas Dilger <adilger@dilger.ca> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/page-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 930ca0fc9a0f..c2fce4478cca 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -350,6 +350,7 @@ void ext4_io_submit(struct ext4_io_submit *io)
if (bio) {
int io_op_flags = io->io_wbc->sync_mode == WB_SYNC_ALL ?
REQ_SYNC : 0;
+ io->io_bio->bi_write_hint = io->io_end->inode->i_write_hint;
bio_set_op_attrs(io->io_bio, REQ_OP_WRITE, io_op_flags);
submit_bio(io->io_bio);
}
@@ -397,6 +398,7 @@ submit_and_retry:
ret = io_submit_init_bio(io, bh);
if (ret)
return ret;
+ io->io_bio->bi_write_hint = inode->i_write_hint;
}
ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh));
if (ret != bh->b_size)