summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/nfs/rnode4.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/nfs/rnode4.h')
-rw-r--r--usr/src/uts/common/nfs/rnode4.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr/src/uts/common/nfs/rnode4.h b/usr/src/uts/common/nfs/rnode4.h
index 7827e24679..7f4c705698 100644
--- a/usr/src/uts/common/nfs/rnode4.h
+++ b/usr/src/uts/common/nfs/rnode4.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,8 +29,6 @@
#ifndef _NFS_RNODE4_H
#define _NFS_RNODE4_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -200,6 +198,16 @@ typedef struct r4hashq {
* set r_modaddr and release r_statelock as long as the r_rwlock
* writer lock is held.
*
+ * r_inmap informs nfs4_read()/write() that there is a call to nfs4_map()
+ * in progress. nfs4_read()/write() check r_inmap to decide whether
+ * to perform directio on the file or not. r_inmap is atomically
+ * incremented in nfs4_map() before the address space routines are
+ * called and atomically decremented just before nfs4_map() exits.
+ * r_inmap is not protected by any lock.
+ *
+ * r_mapcnt tells that the rnode has mapped pages. r_inmap can be 0
+ * while the rnode has mapped pages.
+ *
* 64-bit offsets: the code formerly assumed that atomic reads of
* r_size were safe and reliable; on 32-bit architectures, this is
* not true since an intervening bus cycle from another processor
@@ -326,6 +334,7 @@ typedef struct rnode4 {
/* stub type was set */
nfs4_stub_type_t r_stub_type;
/* e.g. mirror-mount */
+ uint_t r_inmap; /* to serialize read/write and mmap */
} rnode4_t;
#define r_vnode r_svnode.sv_r_vnode