Reintroduce uio_prefaultpages()
This was accidentally removed by overzealous commenting. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #1775
This commit is contained in:
parent
023699cd62
commit
9cac042cfe
@ -650,18 +650,18 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
|
|||||||
return (EAGAIN);
|
return (EAGAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_UIO_ZEROCOPY
|
|
||||||
/*
|
/*
|
||||||
* Pre-fault the pages to ensure slow (eg NFS) pages
|
* Pre-fault the pages to ensure slow (eg NFS) pages
|
||||||
* don't hold up txg.
|
* don't hold up txg.
|
||||||
* Skip this if uio contains loaned arc_buf.
|
* Skip this if uio contains loaned arc_buf.
|
||||||
*/
|
*/
|
||||||
|
#ifdef HAVE_UIO_ZEROCOPY
|
||||||
if ((uio->uio_extflg == UIO_XUIO) &&
|
if ((uio->uio_extflg == UIO_XUIO) &&
|
||||||
(((xuio_t *)uio)->xu_type == UIOTYPE_ZEROCOPY))
|
(((xuio_t *)uio)->xu_type == UIOTYPE_ZEROCOPY))
|
||||||
xuio = (xuio_t *)uio;
|
xuio = (xuio_t *)uio;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
uio_prefaultpages(MIN(n, max_blksz), uio);
|
uio_prefaultpages(MIN(n, max_blksz), uio);
|
||||||
#endif /* HAVE_UIO_ZEROCOPY */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If in append mode, set the io offset pointer to eof.
|
* If in append mode, set the io offset pointer to eof.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user