Skip to content

Commit

Permalink
3508 NFS4 data corruption (client side)
Browse files Browse the repository at this point in the history
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Robert Gordon <rbg@openrbg.com>
Approved by: Gordon Ross <gwr@nexenta.com>
  • Loading branch information
Arne Jansen authored and gwr committed Feb 1, 2013
1 parent c93cc65 commit aea676f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions usr/src/uts/common/fs/nfs/nfs4_client.c
Expand Up @@ -1783,8 +1783,7 @@ nfs4_async_putapage(vnode_t *vp, page_t *pp, u_offset_t off, size_t len,

noasync:

if (curproc == proc_pageout || curproc == proc_fsflush ||
nfs_zone() == mi->mi_zone) {
if (curproc == proc_pageout || curproc == proc_fsflush) {
/*
* If we get here in the context of the pageout/fsflush,
* or we have run out of memory or we're attempting to
Expand All @@ -1804,18 +1803,20 @@ nfs4_async_putapage(vnode_t *vp, page_t *pp, u_offset_t off, size_t len,
return (0);
}

/*
* We'll get here only if (nfs_zone() != mi->mi_zone)
* which means that this was a cross-zone sync putpage.
*
* We pass in B_ERROR to pvn_write_done() to re-mark the pages
* as dirty and unlock them.
*
* We don't want to clear B_FORCE here as the caller presumably
* knows what they're doing if they set it.
*/
pvn_write_done(pp, flags | B_ERROR);
return (EPERM);
if (nfs_zone() != mi->mi_zone) {
/*
* So this was a cross-zone sync putpage.
*
* We pass in B_ERROR to pvn_write_done() to re-mark the pages
* as dirty and unlock them.
*
* We don't want to clear B_FORCE here as the caller presumably
* knows what they're doing if they set it.
*/
pvn_write_done(pp, flags | B_ERROR);
return (EPERM);
}
return ((*putapage)(vp, pp, off, len, flags, cr));
}

int
Expand Down

0 comments on commit aea676f

Please sign in to comment.