On 2:45 08/10, Christoph Hellwig wrote: > > !bio_add_folio(ctx->bio, folio, plen, poff)) { > > + struct bio_set *bioset; > > gfp_t gfp = mapping_gfp_constraint(folio->mapping, GFP_KERNEL); > > gfp_t orig_gfp = gfp; > > unsigned int nr_vecs = DIV_ROUND_UP(length, PAGE_SIZE); > > Nit: I try to keep variables just declared and not initialized after > those initialized at declaration time. > > > + > > + if (ctx->ops && ctx->ops->bio_set) > > + bioset = ctx->ops->bio_set; > > + else > > + bioset = &fs_bio_set; > > + > > + ctx->bio = bio_alloc_bioset(iomap->bdev, bio_max_segs(nr_vecs), > > + REQ_OP_READ, gfp, bioset); > > + > > But it would be nice to move this logic into a helper, similar to what > is done in the direct I/O code. That should robably include > picking the gfp flags from the ctx. > Agree. I will put this in the next version. -- Goldwyn