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

2018-10-17 Thread Abhijith Das
On Wed, Oct 17, 2018 at 4:43 AM Christoph Hellwig  wrote:

> > +/**
> > + * 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?
>

It's not. I'll post an updated version.


>
> > + bio_set_op_attrs(bio, REQ_OP_READ, 0);
>
> Please assign to bi_opf directly instead of using bio_set_op_attrs.
>

Yes. Didn't realize this was deprecated. There's another place where this
is used. The updated patch will address this.
Thanks for the review!

Cheers!
--Abhi


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

2018-10-17 Thread Christoph Hellwig
> +/**
> + * 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.



Re: [Cluster-devel] [GFS2 PATCH 0/4] jhead lookup using bios

2018-10-17 Thread Steven Whitehouse

Hi,

This all looks good to me, so now we just need lots of testing. Are you 
still seeing good speed ups vs the current code?


Steve.


On 16/10/18 05:07, Abhi Das wrote:

This is my latest version of this patchset based on inputs from Andreas
and Steve.
We readahead the journal sequentially in large chunks using bios. Pagecache
pages for the journal inode's mapping are used for the I/O.

There's also some cleanup of the bio functions with this patchset.

xfstests ran to completion with this.

Abhi Das (4):
   gfs2: add more timing info to journal recovery process
   gfs2: changes to gfs2_log_XXX_bio
   gfs2: add a helper function to get_log_header that can be used
 elsewhere
   gfs2: read journal in large chunks to locate the head

  fs/gfs2/bmap.c   |   8 +-
  fs/gfs2/glops.c  |   1 +
  fs/gfs2/log.c|   4 +-
  fs/gfs2/lops.c   | 240 +++
  fs/gfs2/lops.h   |   4 +-
  fs/gfs2/ops_fstype.c |   1 +
  fs/gfs2/recovery.c   | 178 --
  fs/gfs2/recovery.h   |   4 +-
  fs/gfs2/super.c  |   1 +
  9 files changed, 255 insertions(+), 186 deletions(-)