Skip to content

Commit

Permalink
block: remove generic_{start,end}_io_acct
Browse files Browse the repository at this point in the history
Remove these now unused functions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and axboe committed May 27, 2020
1 parent d7614e4 commit e722fff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
39 changes: 0 additions & 39 deletions block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1392,45 +1392,6 @@ void update_io_ticks(struct hd_struct *part, unsigned long now, bool end)
}
}

void generic_start_io_acct(struct request_queue *q, int op,
unsigned long sectors, struct hd_struct *part)
{
const int sgrp = op_stat_group(op);
int rw = op_is_write(op);

part_stat_lock();

update_io_ticks(part, jiffies, false);
part_stat_inc(part, ios[sgrp]);
part_stat_add(part, sectors[sgrp], sectors);
part_stat_local_inc(part, in_flight[rw]);
if (part->partno)
part_stat_local_inc(&part_to_disk(part)->part0, in_flight[rw]);

part_stat_unlock();
}
EXPORT_SYMBOL(generic_start_io_acct);

void generic_end_io_acct(struct request_queue *q, int req_op,
struct hd_struct *part, unsigned long start_time)
{
unsigned long now = jiffies;
unsigned long duration = now - start_time;
const int sgrp = op_stat_group(req_op);
int rw = op_is_write(req_op);

part_stat_lock();

update_io_ticks(part, now, true);
part_stat_add(part, nsecs[sgrp], jiffies_to_nsecs(duration));
part_stat_local_dec(part, in_flight[rw]);
if (part->partno)
part_stat_local_dec(&part_to_disk(part)->part0, in_flight[rw]);

part_stat_unlock();
}
EXPORT_SYMBOL(generic_end_io_acct);

static inline bool bio_remaining_done(struct bio *bio)
{
/*
Expand Down
6 changes: 0 additions & 6 deletions include/linux/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,6 @@ void bio_release_pages(struct bio *bio, bool mark_dirty);
extern void bio_set_pages_dirty(struct bio *bio);
extern void bio_check_pages_dirty(struct bio *bio);

void generic_start_io_acct(struct request_queue *q, int op,
unsigned long sectors, struct hd_struct *part);
void generic_end_io_acct(struct request_queue *q, int op,
struct hd_struct *part,
unsigned long start_time);

extern void bio_copy_data_iter(struct bio *dst, struct bvec_iter *dst_iter,
struct bio *src, struct bvec_iter *src_iter);
extern void bio_copy_data(struct bio *dst, struct bio *src);
Expand Down

0 comments on commit e722fff

Please sign in to comment.