/* called by the kthread helper functions to finally call the bio end_io functions. This is where read checksum verification actually happens  */
static void end_workqueue_fn(struct btrfs_work *work)
/* called by the kthread helper functions to finally call the bio end_io functions. This is where read checksum verification actually happens  */
static void end_workqueue_fn(struct btrfs_work *work)
{
	struct bio *bio;
	struct end_io_wq *end_io_wq;
	struct btrfs_fs_info *fs_info;
	int error;
	end_io_wq = container_of(work, struct end_io_wq, work);
	bio = end_io_wq->bio;
	fs_info = end_io_wq->info;
	if (!(bio->bi_rw & (1 << BIO_RW)) && end_io_wq->metadata &&
	    !bio_ready_for_csum(bio)) {
		btrfs_queue_worker(&fs_info->endio_meta_workers,
				   &end_io_wq->work);
		return;
	}
	error = end_io_wq->error;
	bio->bi_private = end_io_wq->private;
	bio->bi_end_io = end_io_wq->end_io;
	kfree(end_io_wq);
	bio_endio(bio, error);
}