[Cluster-devel] [GFS2 PATCH 4/4] gfs2: read journal in large chunks to locate the head

Christoph Hellwig hch at infradead.org
Wed Oct 17 09:43:08 UTC 2018


> +/**
> + * gfs2_end_log_read - end I/O callback for reads from the log
> + * @bio: The bio
> + *
> + * Simply unlock the pages in the bio. The main thread will wait on them and
> + * process them in order as necessary.
> + */
> +
> +static void gfs2_end_log_read(struct bio *bio)
> +{
> +	struct gfs2_sbd *sdp = bio->bi_private;
> +	struct page *page;
> +	struct bio_vec *bvec;
> +	int i;
> +
> +	if (bio->bi_status)
> +		fs_err(sdp, "Error %d reading from journal\n", bio->bi_status);

How is error handling forthis going to work?

> +			bio_set_op_attrs(bio, REQ_OP_READ, 0);

Please assign to bi_opf directly instead of using bio_set_op_attrs.




More information about the Cluster-devel mailing list