lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 07/10] block: Switch to pinning pages.
On Tue, Jan 24, 2023 at 02:47:51PM +0000, David Howells wrote:
> > > +static inline void bio_set_cleanup_mode(struct bio *bio, struct iov_iter *iter)
> > > +{
> > > + unsigned int cleanup_mode = iov_iter_extract_mode(iter);
> > > +
> > > + if (cleanup_mode & FOLL_GET)
> > > + bio_set_flag(bio, BIO_PAGE_REFFED);
> > > + if (cleanup_mode & FOLL_PIN)
> > > + bio_set_flag(bio, BIO_PAGE_PINNED);
> >
> > Can FOLL_GET ever happen?
>
> Yes - unless patches 8 and 9 are merged. I had them as one, but Christoph
> split them up.

It can't. Per your latest branch:

#define iov_iter_extract_mode(iter) (user_backed_iter(iter) ? FOLL_PIN : 0)

\
 
 \ /
  Last update: 2023-03-26 23:54    [W:0.165 / U:3.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site