summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-04-12 11:56:11 +0300
committerMike Snitzer <snitzer@kernel.org>2022-05-06 00:31:35 +0300
commite6926ad0c988d4cf8d4f4ec77373572831149104 (patch)
tree17e2563bddcdd120457e6628a631e6bee7b437f3 /drivers/md
parentb992b40dfcc1d904e5040c34c5edde3bbc83f60b (diff)
downloadlinux-e6926ad0c988d4cf8d4f4ec77373572831149104.tar.xz
dm: pass dm_io instance to dm_io_acct directly
All the other 4 parameters are retrieved from the 'dm_io' instance, so it's not necessary to pass all four to dm_io_acct(). Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 19d0d6192ea6..2b99ee2a6131 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -502,9 +502,12 @@ static bool bio_is_flush_with_data(struct bio *bio)
return ((bio->bi_opf & REQ_PREFLUSH) && bio->bi_iter.bi_size);
}
-static void dm_io_acct(bool end, struct mapped_device *md, struct bio *bio,
- unsigned long start_time, struct dm_stats_aux *stats_aux)
+static void dm_io_acct(struct dm_io *io, bool end)
{
+ struct dm_stats_aux *stats_aux = &io->stats_aux;
+ unsigned long start_time = io->start_time;
+ struct mapped_device *md = io->md;
+ struct bio *bio = io->orig_bio;
bool is_flush_with_data;
unsigned int bi_size;
@@ -533,7 +536,7 @@ static void dm_io_acct(bool end, struct mapped_device *md, struct bio *bio,
static void __dm_start_io_acct(struct dm_io *io)
{
- dm_io_acct(false, io->md, io->orig_bio, io->start_time, &io->stats_aux);
+ dm_io_acct(io, false);
}
static void dm_start_io_acct(struct dm_io *io, struct bio *clone)
@@ -560,7 +563,7 @@ static void dm_start_io_acct(struct dm_io *io, struct bio *clone)
static void dm_end_io_acct(struct dm_io *io)
{
- dm_io_acct(true, io->md, io->orig_bio, io->start_time, &io->stats_aux);
+ dm_io_acct(io, true);
}
static struct dm_io *alloc_io(struct mapped_device *md, struct bio *bio)