On Sun, Apr 07, 2019 at 11:30:52PM -0700, Christoph Hellwig wrote: > On Sun, Apr 07, 2019 at 05:35:45PM +0300, Alex Lyakas wrote: > > Hi Christoph, > > > > I understand and agree with your concern. > > > > Looking at the code, bi_flags is 16-bits wide, and only top 3 bits are > > preserved by bio_reset(). These bits are used to indicate a bvec pool. > > So we don't have any free bits to move the BIO_REFFED to. Unless we > > make bi_flags wider. > > I think we just need to move BIO_REFFED around. Something like the > untested patch below should do the job, although blk_types.h could > use some additional cleanup in this area.. Any comments?