Skip to content
Snippets Groups Projects
  1. Mar 18, 2019
    • Jens Axboe's avatar
      block: add BIO_NO_PAGE_REF flag · 399254aa
      Jens Axboe authored
      
      If bio_iov_iter_get_pages() is called on an iov_iter that is flagged
      with NO_REF, then we don't need to add a page reference for the pages
      that we add.
      
      Add BIO_NO_PAGE_REF to track this in the bio, so IO completion knows
      not to drop a reference to these pages.
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      399254aa
    • Jens Axboe's avatar
      iov_iter: add ITER_BVEC_FLAG_NO_REF flag · 875f1d07
      Jens Axboe authored
      
      For ITER_BVEC, if we're holding on to kernel pages, the caller
      doesn't need to grab a reference to the bvec pages, and drop that
      same reference on IO completion. This is essentially safe for any
      ITER_BVEC, but some use cases end up reusing pages and uncondtionally
      dropping a page reference on completion. And example of that is
      sendfile(2), that ends up being a splice_in + splice_out on the
      pipe pages.
      
      Add a flag that tells us it's fine to not grab a page reference
      to the bvec pages, since that caller knows not to drop a reference
      when it's done with the pages.
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      875f1d07
  2. Mar 08, 2019
  3. Mar 07, 2019
  4. Mar 06, 2019
Loading