Re: [GIT PULL 24/25] lightnvm: pblk: add iostat support

From: Jens Axboe
Date: Fri Jan 05 2018 - 10:42:39 EST


On Fri, Jan 05 2018, Matias Bjørling wrote:
> From: Javier González <javier@xxxxxxxxxxxx>
>
> Since pblk registers its own block device, the iostat accounting is
> not automatically done for us. Therefore, add the necessary
> accounting logic to satisfy the iostat interface.

Ignorant question - why is it a raw block device, not using blk-mq?

> @@ -193,9 +197,9 @@ static void pblk_end_io_read(struct nvm_rq *rqd)
> __pblk_end_io_read(pblk, rqd, true);
> }
>
> -static int pblk_fill_partial_read_bio(struct pblk *pblk, struct nvm_rq *rqd,
> - unsigned int bio_init_idx,
> - unsigned long *read_bitmap)
> +static int pblk_partial_read_bio(struct pblk *pblk, struct nvm_rq *rqd,
> + unsigned int bio_init_idx,
> + unsigned long *read_bitmap)
> {
> struct bio *new_bio, *bio = rqd->bio;
> struct pblk_sec_meta *meta_list = rqd->meta_list;
> @@ -306,6 +310,8 @@ static int pblk_fill_partial_read_bio(struct pblk *pblk, struct nvm_rq *rqd,
> return NVM_IO_OK;
>
> err:
> + pr_err("pblk: failed to perform partial read\n");
> +
> /* Free allocated pages in new bio */
> pblk_bio_free_pages(pblk, bio, 0, new_bio->bi_vcnt);
> __pblk_end_io_read(pblk, rqd, false);

This seems to include unrelated changes, like the rename above and the
addition of the error logging?

--
Jens Axboe