OpenSolaris

You are not signed in. Sign in or register.

Heads Up: File system framework changes (supplement to CIFS' "head's up")

Date: Fri, 26 Oct 2007 16:08:58 -0500
From: Rich Brown <Rich.Brown at Sun dot COM>
To: onnv-gate at onnv dot eng dot sun dot com, on-all at eng dot sun dot com
Subject: Heads Up: File system framework changes (supplement to CIFS' "head's up")

If you don't know what a VOP is and will never, ever make a change
to a kernel file that uses the vfs/vnode interface, then feel free
to delete this.

Yesterday's CIFS putback

         6617183 CIFS Service - PSARC 2006/715

introduced several changes to the file system framework in Solaris.  The
following outlines the changes and the corresponding PSARC cases.

For further details, please see the mail and spec files in the PSARC case
directories:

   http://http://opensolaris.org/os/community/arc/caselog/2007/{insert-case-number}

If you have additional questions, please send them to cifs-vfs-team at sun dot com


PSARC 2007/218 caller_context_t in all VOPs

         *All* vnode operations now pass a pointer to caller_context_t.
         These are primarily used by File Event Monitors (FEM) however
         the file system is responsible for passing any caller_context_t
         parameters to subsequent VOP calls.

PSARC 2007/227 VFS Feature Registration and ACL on Create

         There are three significant parts to this:

         - VFS structures are now allocated using vfs_alloc() and vfs_free().
           Note that the last VFS_RELE()/vfs_rele() calls vfs_free() when
           the last reference is removed.

         - VOP_CREATE() and VOP_MKDIR() now take an optional pointer to a
           vsecattr_t.  This allows the caller to set an ACL on create.

         - We now have a "feature registration" facility for the various
           behaviors that a file system can support.  These are typically
           set by a file system at mount time and is checked in the fop
           layer to verify that the file system supports the requested
           feature (e.g., case-insensitive behavior).  It has a very
           simple interface:

                 /* Register a feature in the vfs */
                 void vfs_set_feature(vfs_t *vfsp, vfs_feature_t feature)

                 /*
                  * Query a vfs for a feature.
                  * Returns 1 if feature is present, 0 if not
                  */
                 int vfs_has_feature(vfs_t *vfsp, vfs_feature_t feature)

           The current list of features (see following PSARC cases) are:

                 VFSFT_XVATTR            /* Supports xvattr for attrs */
                 VFSFT_CASEINSENSITIVE   /* Supports case-insensitive */
                 VFSFT_NOCASESENSITIVE   /* NOT case-sensitive */
                 VFSFT_DIRENTFLAGS       /* Supports dirent flags */
                 VFSFT_ACLONCREATE       /* Supports ACL on create */
                 VFSFT_ACEMASKONACCESS   /* Can use ACEMASK for access */

PSARC 2007/244 ZFS case-insensitive support

         This case covers the changes at vnode/vfs interface level as
         well as the ZFS level to support case-insensitive behavior:

         - The following vnode operations take a new flag, FIGNORECASE
           (in file.h) to request case-insensitive behavior: VOP_CREATE,
           VOP_REMOVE, VOP_LINK, VOP_RENAME, VOP_MKDIR, VOP_RMDIR,
           VOP_SYMLINK.

           If the file system does not support the requested behavior
           then EINVAL is returned by the appropriate fop-level routine.

         - VOP_READDIR takes a new flag, V_RDDIR_ENTFLAGS to request
           that the directory information be retrieved in edirent_t
           format.  The edirent_t structure adds directory entry flags
           which may contain ED_CASE_CONFLICT.  This means that case-
           insensitive conflict exists.  See sys/extdirent.h.

           If the file system does not support the requested behavior
           then EINVAL is returned by the fop_readdir().

         - pathconf(2) has new a variable which describes case behavior:
           _PC_CASE_BEHAVIOR.  It can take the following values:
           _CASE_SENSITIVE and _CASE_INSENSITIVE.

PSARC 2007/268 Support for CIFS share reservations

         New flags for share reservations (see sys/fcntl.h):
                 F_RMACC (for f_access) specifies "delete share access"
                 F_RMDNY (for f_deny) specifies "deny delete share access"

PSARC 2007/315 Extensible Attribute Interfaces

         This case adds optional, extensible system attributes.  The
         VOP_GETATTR/VOP_SETATTR interface can support an xvattr_t
         structure which is a superset of the vattr_t structure.  If
         AT_XVATTR is set in the va_mask field, then the structure is
         really an xvattr_t structure.

         The following new attributes have been added to ZFS:

         CREATETIME      /* Create time of file */
         ARCHIVE         /* Archive */
         SYSTEM          /* System */
         READONLY        /* Readonly */
         HIDDEN          /* Hidden */
         NOUNLINK        /* Nounlink */
         IMMUTABLE       /* immutable */
         APPENDONLY      /* appendonly */
         NODUMP          /* nodump */
         AV_QUARANTINED  /* anti-virus quarantine */
         AV_MODIFIED     /* anti-virus modified */

         For more details, see "spec.final.txt" in the case directory.

PSARC 2007/403 Modified Access Checks for CIFS

         - VOP_ACCESS() can now take V_APPEND in its 'flags' field
           to check for ACE-enforced append-only access to a vnode.

         - VOP_ACCESS() can now take V_ACE_MASK in its 'flags' field
           which informs the implementation to treat the 'mode'
           parameter as a 32 bit ACE-style access mask.

         - ATTR_NOACLCHECK can be passed in the flags field of vnode
           operations that retrieve/modify attributes and ACLs.  This
           prevents ACL checks from being performed when the caller has
           already been granted the permission to perform the operation
           on the vnode.

PSARC 2007/440 nbmand changes for CIFS Service

         - Change nbmand file rename/remove share violation checks.
         - Adds F_MDACC to support for meta data access with nbmand
         - Do not allow nbmand mount option state to change on remount.