diff options
author | amw <none@none> | 2007-10-25 16:34:29 -0700 |
---|---|---|
committer | amw <none@none> | 2007-10-25 16:34:29 -0700 |
commit | da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0 (patch) | |
tree | 65be91fb78a6a66183197595333f2e8aafb4640a /usr/src/uts/common/fs/cachefs | |
parent | e845e33dd0d1aea22db7edaa8c7d43955d24609b (diff) | |
download | illumos-gate-da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0.tar.gz |
PSARC/2007/218 caller_context_t in all VOPs
PSARC/2007/227 VFS Feature Registration and ACL on Create
PSARC/2007/244 ZFS Case-insensitive support
PSARC/2007/315 Extensible Attribute Interfaces
PSARC/2007/394 ls(1) new command line options '-/' and '-%': CIFS system attributes support
PSARC/2007/403 Modified Access Checks for CIFS
PSARC/2007/410 Add system attribute support to chmod(1)
PSARC/2007/432 CIFS system attributes support for cp(1), pack(1), unpack(1), compress(1) and uncompress(1)
PSARC/2007/444 Rescind SETTABLE Attribute
PSARC/2007/459 CIFS system attributes support for cpio(1), pax(1), tar(1)
PSARC/2007/546 Update utilities to match CIFS system attributes changes.
PSARC/2007/560 ZFS sharesmb property
4890717 want append-only files
6417428 Case-insensitive file system name lookup to support CIFS
6417435 DOS attributes and additional timestamps to support for CIFS
6417442 File system quarantined and modified attributes to support an integrated Anti-Virus service
6417453 FS boolean property for rejecting/allowing invalid UTF-8 sequences in file names
6473733 RFE: Need support for open-deny modes
6473755 RFE: Need ability to reconcile oplock and delegation conflicts
6494624 sharemgr needs to support CIFS shares better
6546705 All vnode operations need to pass caller_context_t
6546706 Need VOP_SETATTR/VOP_GETATTR to support new, optional attributes
6546893 Solaris system attribute support
6550962 ZFS ACL inheritance needs to be enhanced to support Automatic Inheritance
6553589 RFE: VFS Feature Registration facility
6553770 RFE: ZFS support for ACL-on-CREATE (PSARC 2007/227)
6565581 ls(1) should support file system attributes proposed in PSARC/2007/315
6566784 NTFS streams are not copied along with the files.
6576205 cp(1), pack(1) and compress(1) should support file system attributes proposed in PSARC/2007/315
6578875 RFE: kernel interfaces for nbmand need improvement
6578883 RFE: VOP_SHRLOCK needs additional access types
6578885 chmod(1) should support file system attributes proposed in PSARC/2007/315
6578886 RFE: disallow nbmand state to change on remount
6583349 ACL parser needs to support audit/alarm ACE types
6590347 tar(1) should support filesystem attributes proposed in PSARC/2007/315
6597357 *tar* xv@ doesn't show the hidden directory even though it is restored
6597360 *tar* should re-init xattr info if openat() fails during extraction of and extended attribute
6597368 *tar* cannot restore hard linked extended attributes
6597374 *tar* doesn't display "x " when hard linked attributes are restored
6597375 *tar* extended attribute header off by one
6614861 *cpio* incorrectly archives extended system attributes with -@
6614896 *pax* incorrectly archives extended system attributes with -@
6615225 *tar* incorrectly archives extended system attributes with -@
6617183 CIFS Service - PSARC 2006/715
Diffstat (limited to 'usr/src/uts/common/fs/cachefs')
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_cnode.c | 26 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_cod.c | 15 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_dir.c | 25 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_dlog.c | 25 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_filegrp.c | 57 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_fscache.c | 38 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_ioctl.c | 85 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_log.c | 20 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_noopc.c | 13 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_resource.c | 19 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_strict.c | 17 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_subr.c | 54 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_vfsops.c | 13 | ||||
-rw-r--r-- | usr/src/uts/common/fs/cachefs/cachefs_vnops.c | 311 |
14 files changed, 389 insertions, 329 deletions
diff --git a/usr/src/uts/common/fs/cachefs/cachefs_cnode.c b/usr/src/uts/common/fs/cachefs/cachefs_cnode.c index 2036c59f20..f57b732eb0 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_cnode.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_cnode.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -133,7 +132,7 @@ cachefs_cnode_idle(struct vnode *vp, cred_t *cr) unlname, unlcred, vp); } - /* reaquire cnode lock */ + /* reacquire cnode lock */ mutex_enter(&cp->c_statelock); /* if a timeout occurred */ @@ -1340,7 +1339,7 @@ cachefs_cnode_move(cnode_t *cp) make_ascii_name(&cp->c_id, oname); make_ascii_name(&cid, nname); error = VOP_RENAME(ofgp->fg_dirvp, oname, fgp->fg_dirvp, - nname, kcred); + nname, kcred, NULL, 0); if (error) { ffnuke = 1; #ifdef CFSDEBUG @@ -1470,7 +1469,8 @@ cachefs_cnode_sync(cnode_t *cp) cp->c_backvp) { mutex_enter(&cp->c_statelock); if (cp->c_backvp) { - error = VOP_FSYNC(cp->c_backvp, FSYNC, kcred); + error = VOP_FSYNC(cp->c_backvp, FSYNC, kcred, + NULL); if (CFS_TIMEOUT(fscp, error)) { mutex_exit(&cp->c_statelock); cachefs_cd_release(fscp); @@ -1554,7 +1554,7 @@ cachefs_cnode_lostfound(cnode_t *cp, char *rname) else namep = "lostfile"; error = VOP_LOOKUP(cachep->c_lostfoundvp, namep, &nvp, - NULL, 0, NULL, kcred); + NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error == 0) VN_RELE(nvp); if (error != ENOENT) { @@ -1569,7 +1569,7 @@ cachefs_cnode_lostfound(cnode_t *cp, char *rname) else namep = namebuf; error = VOP_LOOKUP(cachep->c_lostfoundvp, namep, &nvp, - NULL, 0, NULL, kcred); + NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error == 0) VN_RELE(nvp); if (error == ENOENT) @@ -1587,7 +1587,7 @@ cachefs_cnode_lostfound(cnode_t *cp, char *rname) /* rename the file into the lost+found directory */ error = VOP_RENAME(fgp->fg_dirvp, oname, cachep->c_lostfoundvp, - namep, kcred); + namep, kcred, NULL, 0); if (error) { mutex_exit(&cachep->c_contentslock); goto out; @@ -1675,7 +1675,7 @@ cachefs_cnode_traverse(fscache_t *fscp, void (*routinep)(cnode_t *)) */ (routinep)(cp); - /* reaquire the cnode list lock */ + /* reacquire the cnode list lock */ mutex_enter(&fgp->fg_cnodelock); } @@ -1687,7 +1687,7 @@ cachefs_cnode_traverse(fscache_t *fscp, void (*routinep)(cnode_t *)) VN_RELE(CTOV(ocp)); } - /* reaquire the fscache lock */ + /* reacquire the fscache lock */ mutex_enter(&fscp->fs_fslock); } @@ -1730,7 +1730,7 @@ cnode_enable_caching(struct cnode *cp) iovp = cp->c_backvp; if (iovp) { (void) VOP_PUTPAGE(iovp, (offset_t)0, - (uint_t)0, B_INVAL, kcred); + (uint_t)0, B_INVAL, kcred, NULL); } mutex_enter(&cp->c_statelock); if (cp->c_backvp) { diff --git a/usr/src/uts/common/fs/cachefs/cachefs_cod.c b/usr/src/uts/common/fs/cachefs/cachefs_cod.c index fac80de284..be60ec4f40 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_cod.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_cod.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -93,7 +92,7 @@ c_cod_init_cached_object(fscache_t *fscp, cnode_t *cp, vattr_t *vap, /* get the attributes */ cp->c_attr.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr, NULL); if (error) return (error); } else { @@ -170,7 +169,7 @@ again: /* get the file attributes from the back fs */ attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); backhit = 1; if (error) goto out; @@ -210,7 +209,7 @@ again: } if ((CTOV(cp))->v_type == VREG) { attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); if (error) goto out; } @@ -295,7 +294,7 @@ c_cod_modify_cached_object(struct fscache *fscp, struct cnode *cp, cred_t *cr) } attrs.va_mask = AT_ALL; ASSERT(cp->c_backvp != NULL); - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); if (error) { mdp->md_vattr.va_mtime.tv_sec = 0; goto out; diff --git a/usr/src/uts/common/fs/cachefs/cachefs_dir.c b/usr/src/uts/common/fs/cachefs/cachefs_dir.c index 8e586946a6..d77b4ab36a 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_dir.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_dir.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -108,7 +107,7 @@ cachefs_dir_look(cnode_t *dcp, char *nm, fid_t *cookiep, uint_t *flagp, dvp = dcp->c_frontvp; va.va_mask = AT_SIZE; /* XXX should save dir size */ - error = VOP_GETATTR(dvp, &va, 0, kcred); + error = VOP_GETATTR(dvp, &va, 0, kcred, NULL); if (error) { cachefs_inval_object(dcp); error = ENOTDIR; @@ -201,7 +200,7 @@ cachefs_dir_new(cnode_t *dcp, cnode_t *cp) #ifdef CFSDEBUG va.va_mask = AT_SIZE; - error = VOP_GETATTR(cp->c_frontvp, &va, 0, kcred); + error = VOP_GETATTR(cp->c_frontvp, &va, 0, kcred, NULL); if (error) goto out; ASSERT(va.va_size == 0); @@ -307,7 +306,7 @@ cachefs_dir_enter(cnode_t *dcp, char *nm, fid_t *cookiep, cfs_cid_t *cidp, * Get the current EOF for the directory(data file) */ va.va_mask = AT_SIZE; - error = VOP_GETATTR(dvp, &va, 0, kcred); + error = VOP_GETATTR(dvp, &va, 0, kcred, NULL); if (error) { cachefs_inval_object(dcp); error = ENOTDIR; @@ -465,7 +464,7 @@ cachefs_dir_rmentry(cnode_t *dcp, char *nm) ASSERT((dcp->c_flags & CN_NOCACHE) == 0); ASSERT(dvp != NULL); va.va_mask = AT_SIZE; - error = VOP_GETATTR(dvp, &va, 0, kcred); + error = VOP_GETATTR(dvp, &va, 0, kcred, NULL); if (error) { cachefs_inval_object(dcp); error = ENOTDIR; @@ -624,7 +623,7 @@ cachefs_dir_getentrys(struct cnode *dcp, u_offset_t beg_off, gdp = (struct dirent64 *)buf; *cntp = bufsize; va.va_mask = AT_SIZE; - error = VOP_GETATTR(dvp, &va, 0, kcred); + error = VOP_GETATTR(dvp, &va, 0, kcred, NULL); if (error) { *cntp = 0; *last_offp = 0; @@ -950,7 +949,7 @@ cachefs_dir_fill_common(cnode_t *dcp, cred_t *cr, iov.iov_base = buf; iov.iov_len = MAXBSIZE; (void) VOP_RWLOCK(backvp, V_WRITELOCK_FALSE, NULL); - error = VOP_READDIR(backvp, &uio, cr, &eof); + error = VOP_READDIR(backvp, &uio, cr, &eof, NULL, 0); VOP_RWUNLOCK(backvp, V_WRITELOCK_FALSE, NULL); if (error) goto out; @@ -1017,7 +1016,7 @@ cachefs_dir_empty(cnode_t *dcp) return (ENOTDIR); va.va_mask = AT_SIZE; - error = VOP_GETATTR(dvp, &va, 0, kcred); + error = VOP_GETATTR(dvp, &va, 0, kcred, NULL); if (error) return (ENOTDIR); @@ -1258,7 +1257,7 @@ cachefs_dir_complete(fscache_t *fscp, vnode_t *backvp, vnode_t *frontvp, */ va.va_mask = AT_SIZE; - error = VOP_GETATTR(frontvp, &va, 0, cr); + error = VOP_GETATTR(frontvp, &va, 0, cr, NULL); if (error) goto out; @@ -1296,7 +1295,7 @@ cachefs_dir_complete(fscache_t *fscp, vnode_t *backvp, vnode_t *frontvp, error = VOP_LOOKUP(backvp, dep->d_name, &entry_vp, (struct pathname *)NULL, 0, - (vnode_t *)NULL, cr); + (vnode_t *)NULL, cr, NULL, NULL, NULL); if (error) { /* lookup on .. in / on coc gets ENOENT */ if (error == ENOENT) { diff --git a/usr/src/uts/common/fs/cachefs/cachefs_dlog.c b/usr/src/uts/common/fs/cachefs/cachefs_dlog.c index e3ad1bc9de..5781d7a4d1 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_dlog.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_dlog.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -203,7 +202,7 @@ cachefs_dlog_setup(fscache_t *fscp, int createfile) /* see if the log file exists */ error = VOP_LOOKUP(fscp->fs_fscdirvp, CACHEFS_DLOG_FILE, - &fscp->fs_dlogfile, NULL, 0, NULL, kcred); + &fscp->fs_dlogfile, NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error && (createfile == 0)) goto out; @@ -217,7 +216,7 @@ cachefs_dlog_setup(fscache_t *fscp, int createfile) vattr.va_type = VREG; vattr.va_mask = AT_TYPE|AT_MODE|AT_UID|AT_GID; error = VOP_CREATE(fscp->fs_fscdirvp, CACHEFS_DLOG_FILE, - &vattr, 0, 0666, &fscp->fs_dlogfile, kcred, 0); + &vattr, 0, 0666, &fscp->fs_dlogfile, kcred, 0, NULL, NULL); if (error) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_DLOG) @@ -246,7 +245,7 @@ cachefs_dlog_setup(fscache_t *fscp, int createfile) vattr.va_type = VREG; vattr.va_mask = AT_TYPE|AT_MODE|AT_UID|AT_GID; error = VOP_CREATE(fscp->fs_fscdirvp, CACHEFS_DMAP_FILE, - &vattr, 0, 0666, &fscp->fs_dmapfile, kcred, 0); + &vattr, 0, 0666, &fscp->fs_dmapfile, kcred, 0, NULL, NULL); if (error) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_DLOG) @@ -272,7 +271,7 @@ cachefs_dlog_setup(fscache_t *fscp, int createfile) /* find the end of the log file */ vattr.va_mask = AT_ALL; - error = VOP_GETATTR(fscp->fs_dlogfile, &vattr, 0, kcred); + error = VOP_GETATTR(fscp->fs_dlogfile, &vattr, 0, kcred, NULL); if (error) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_DLOG) @@ -328,7 +327,7 @@ cachefs_dlog_setup(fscache_t *fscp, int createfile) error = VOP_LOOKUP(fscp->fs_fscdirvp, CACHEFS_DMAP_FILE, - &fscp->fs_dmapfile, NULL, 0, NULL, kcred); + &fscp->fs_dmapfile, NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_DLOG) @@ -339,7 +338,7 @@ cachefs_dlog_setup(fscache_t *fscp, int createfile) } vattr.va_mask = AT_ALL; - error = VOP_GETATTR(fscp->fs_dmapfile, &vattr, 0, kcred); + error = VOP_GETATTR(fscp->fs_dmapfile, &vattr, 0, kcred, NULL); if (error) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_DLOG) @@ -359,13 +358,13 @@ out: VN_RELE(fscp->fs_dlogfile); fscp->fs_dlogfile = NULL; (void) VOP_REMOVE(fscp->fs_fscdirvp, - CACHEFS_DLOG_FILE, kcred); + CACHEFS_DLOG_FILE, kcred, NULL, 0); } if (fscp->fs_dmapfile) { VN_RELE(fscp->fs_dmapfile); fscp->fs_dmapfile = NULL; (void) VOP_REMOVE(fscp->fs_fscdirvp, - CACHEFS_DMAP_FILE, kcred); + CACHEFS_DMAP_FILE, kcred, NULL, 0); } } if (lookupdone) { @@ -528,7 +527,7 @@ out: } /* - * Commmits a previously written dlog message. + * Commits a previously written dlog message. */ int cachefs_dlog_commit(fscache_t *fscp, off_t offset, int error) diff --git a/usr/src/uts/common/fs/cachefs/cachefs_filegrp.c b/usr/src/uts/common/fs/cachefs/cachefs_filegrp.c index 2da9b2bfda..9e430fa0fb 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_filegrp.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_filegrp.c @@ -224,12 +224,12 @@ filegrp_create(struct fscache *fscp, cfs_cid_t *cidp) fgp->fg_offsets = NULL; fgp->fg_alloclist = NULL; - fgp->fg_headersize = (u_int)sizeof (struct attrcache_header) + - (fgsize * (u_int)sizeof (struct attrcache_index)) + + fgp->fg_headersize = (uint_t)sizeof (struct attrcache_header) + + (fgsize * (uint_t)sizeof (struct attrcache_index)) + ((fgsize + 7) >> 3); fgp->fg_filesize = fgp->fg_headersize + - (fgsize * (u_int)sizeof (struct cfs_cachefs_metadata)); + (fgsize * (uint_t)sizeof (struct cfs_cachefs_metadata)); flags = fscp->fs_flags; if (flags & CFS_FS_READ) { @@ -324,7 +324,8 @@ filegrp_destroy(filegrp_t *fgp) /* remove the attrcache file */ make_ascii_name(&fgp->fg_id, name); fname = name; - error = VOP_REMOVE(fscp->fs_fsattrdir, fname, kcred); + error = VOP_REMOVE(fscp->fs_fsattrdir, fname, kcred, + NULL, 0); if (error) { cmn_err(CE_WARN, "cachefs: error in cache, run fsck"); @@ -452,7 +453,7 @@ filegrp_hold(filegrp_t *fgp) * Returns: * Preconditions: * precond(fgp is a valid filegrp object) - * precond(number of refrences to filegrp is > 0) + * precond(number of references to filegrp is > 0) */ void @@ -498,7 +499,7 @@ filegrp_rele(filegrp_t *fgp) * Returns 0 for success or a non-zero errno. * Preconditions: * precond(fgp is a valid filegrp object) - * precond(number of refrences to filegrp is > 0) + * precond(number of references to filegrp is > 0) * precond(filegrp is writable) */ @@ -586,7 +587,7 @@ out: * Preconditions: * precond(fgp is a valid filegrp object) * precond(filegrp is writable) - * precond(number of refrences to filegrp is > 0) + * precond(number of references to filegrp is > 0) * precond(number of front file references is > 0) */ @@ -620,7 +621,7 @@ filegrp_ffrele(filegrp_t *fgp) make_ascii_name(&fgp->fg_id, name); fname = name; error = VOP_RMDIR(fscp->fs_fscdirvp, fname, - fscp->fs_fscdirvp, kcred); + fscp->fs_fscdirvp, kcred, NULL, 0); if (error == 0) { cachefs_freefile(fscp->fs_cache); cachefs_freeblocks(fscp->fs_cache, 1, @@ -687,7 +688,7 @@ filegrp_sync(filegrp_t *fgp) kcred, NULL); if (error == 0) - error = VOP_FSYNC(fgp->fg_attrvp, FSYNC, kcred); + error = VOP_FSYNC(fgp->fg_attrvp, FSYNC, kcred, NULL); if (error == 0) fgp->fg_flags &= ~CFS_FG_UPDATED; @@ -746,7 +747,7 @@ filegrp_read_metadata(filegrp_t *fgp, cfs_cid_t *cidp, /* see if metadata was ever written */ - index = (int) (cidp->cid_fileno - fgp->fg_id.cid_fileno); + index = (int)(cidp->cid_fileno - fgp->fg_id.cid_fileno); if (fgp->fg_offsets[index].ach_written == 0) { mutex_exit(&fgp->fg_mutex); return (ENOENT); @@ -794,7 +795,7 @@ filegrp_create_metadata(filegrp_t *fgp, struct cachefs_metadata *md, cachefscache_t *cachep = fscp->fs_cache; int slot; int bitno; - u_char mask; + uchar_t mask; int last; int xx; int index; @@ -816,13 +817,13 @@ filegrp_create_metadata(filegrp_t *fgp, struct cachefs_metadata *md, return (0); } - index = (int) (cidp->cid_fileno - fgp->fg_id.cid_fileno); + index = (int)(cidp->cid_fileno - fgp->fg_id.cid_fileno); ASSERT(index < fgp->fg_fscp->fs_info.fi_fgsize); last = (((fgp->fg_fscp->fs_info.fi_fgsize + 7) & ~(7)) / 8); for (xx = 0; xx < last; xx++) { - if (fgp->fg_alloclist[xx] != (u_char)0xff) { + if (fgp->fg_alloclist[xx] != (uchar_t)0xff) { for (mask = 1, bitno = 0; bitno < 8; bitno++) { if ((mask & fgp->fg_alloclist[xx]) == 0) { slot = (xx * 8) + bitno; @@ -948,7 +949,7 @@ filegrp_write_metadata(filegrp_t *fgp, cfs_cid_t *cidp, } /* mark metadata as having been written */ - index = (int) (cidp->cid_fileno - fgp->fg_id.cid_fileno); + index = (int)(cidp->cid_fileno - fgp->fg_id.cid_fileno); fgp->fg_offsets[index].ach_written = 1; /* update number of blocks used by the attrcache file */ @@ -983,7 +984,7 @@ filegrp_destroy_metadata(filegrp_t *fgp, cfs_cid_t *cidp) { int i; int bitno; - u_char mask = 1; + uchar_t mask = 1; int slot; @@ -1064,7 +1065,7 @@ filegrp_list_find(struct fscache *fscp, cfs_cid_t *cidp) fileno = fxx * fgsize; /* hash into array of file groups */ - findex = (int) (fxx & (CFS_FS_FGP_BUCKET_SIZE - 1)); + findex = (int)(fxx & (CFS_FS_FGP_BUCKET_SIZE - 1)); /* search set of file groups for this hash bucket */ for (fgp = fscp->fs_filegrp[findex]; @@ -1106,7 +1107,7 @@ filegrp_list_add(struct fscache *fscp, filegrp_t *fgp) ASSERT(fgp->fg_next == NULL); /* hash into array of file groups */ - findex = (int) ((fgp->fg_id.cid_fileno / fgsize) & + findex = (int)((fgp->fg_id.cid_fileno / fgsize) & (CFS_FS_FGP_BUCKET_SIZE - 1)); fgp->fg_next = fscp->fs_filegrp[findex]; @@ -1144,7 +1145,7 @@ filegrp_list_remove(struct fscache *fscp, filegrp_t *fgp) ASSERT(MUTEX_HELD(&fscp->fs_fslock)); /* hash into array of file groups */ - findex = (int) ((fgp->fg_id.cid_fileno / fgsize) & + findex = (int)((fgp->fg_id.cid_fileno / fgsize) & (CFS_FS_FGP_BUCKET_SIZE - 1)); fp = fscp->fs_filegrp[findex]; pfgp = &fscp->fs_filegrp[findex]; @@ -1360,7 +1361,7 @@ filegrpdir_find(filegrp_t *fgp) make_ascii_name(&fgp->fg_id, name); fname = name; error = VOP_LOOKUP(fscp->fs_fscdirvp, fname, &dirvp, NULL, - 0, NULL, kcred); + 0, NULL, kcred, NULL, NULL, NULL); if (error == 0) { fgp->fg_dirvp = dirvp; fgp->fg_flags &= ~CFS_FG_ALLOC_FILE; @@ -1421,7 +1422,7 @@ filegrpattr_find(struct filegrp *fgp) make_ascii_name(&fgp->fg_id, name); fname = name; error = VOP_LOOKUP(fscp->fs_fsattrdir, fname, - &attrvp, NULL, 0, NULL, kcred); + &attrvp, NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error) { return (error); } @@ -1442,7 +1443,7 @@ filegrpattr_find(struct filegrp *fgp) fgp->fg_attrvp = attrvp; fgp->fg_header = ahp; fgp->fg_offsets = (struct attrcache_index *)(ahp + 1); - fgp->fg_alloclist = ((u_char *)fgp->fg_offsets) + + fgp->fg_alloclist = ((uchar_t *)fgp->fg_offsets) + (fscp->fs_info.fi_fgsize * sizeof (struct attrcache_index)); fgp->fg_flags &= ~CFS_FG_ALLOC_ATTR; @@ -1565,7 +1566,8 @@ filegrpdir_create(filegrp_t *fgp) attrp->va_gid = 0; attrp->va_type = VDIR; attrp->va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; - error = VOP_MKDIR(fscp->fs_fscdirvp, fname, attrp, &dirvp, kcred); + error = VOP_MKDIR(fscp->fs_fscdirvp, fname, attrp, &dirvp, kcred, NULL, + 0, NULL); if (error) { fgp->fg_flags |= CFS_FG_NOCACHE; cachefs_freefile(fscp->fs_cache); @@ -1637,7 +1639,7 @@ filegrpattr_create(struct filegrp *fgp) attrp->va_type = VREG; attrp->va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; error = VOP_CREATE(fscp->fs_fsattrdir, fname, attrp, EXCL, 0666, - &attrvp, kcred, 0); + &attrvp, kcred, 0, NULL, NULL); if (error) { cachefs_freefile(fscp->fs_cache); goto out; @@ -1664,7 +1666,7 @@ filegrpattr_create(struct filegrp *fgp) (nblks * MAXBSIZE) - fgp->fg_headersize); if (error) goto out; - error = VOP_FSYNC(attrvp, FSYNC, kcred); + error = VOP_FSYNC(attrvp, FSYNC, kcred, NULL); if (error) goto out; @@ -1694,7 +1696,8 @@ out: fgp->fg_flags |= CFS_FG_NOCACHE; if (attrvp) { VN_RELE(attrvp); - (void) VOP_REMOVE(fscp->fs_fsattrdir, fname, kcred); + (void) VOP_REMOVE(fscp->fs_fsattrdir, fname, kcred, + NULL, 0); cachefs_freefile(fscp->fs_cache); } if (nblks) @@ -1709,7 +1712,7 @@ out: fgp->fg_attrvp = attrvp; fgp->fg_header = ahp; fgp->fg_offsets = (struct attrcache_index *)(ahp + 1); - fgp->fg_alloclist = ((u_char *)fgp->fg_offsets) + + fgp->fg_alloclist = ((uchar_t *)fgp->fg_offsets) + (fscp->fs_info.fi_fgsize * sizeof (struct attrcache_index)); ahp->ach_count = 0; @@ -1751,7 +1754,7 @@ filegrp_cid_to_slot(filegrp_t *fgp, cfs_cid_t *cidp) int slot; int index; - index = (int) (cidp->cid_fileno - fgp->fg_id.cid_fileno); + index = (int)(cidp->cid_fileno - fgp->fg_id.cid_fileno); if (index > fgp->fg_fscp->fs_info.fi_fgsize) { cmn_err(CE_WARN, "cachefs: attrcache error, run fsck"); diff --git a/usr/src/uts/common/fs/cachefs/cachefs_fscache.c b/usr/src/uts/common/fs/cachefs/cachefs_fscache.c index 28c3f1c36d..6dcb5430f2 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_fscache.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_fscache.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -257,7 +256,7 @@ fscache_setup(fscache_t *fscp, ino64_t fsid, char *namep, return (error); } } else if (optp) { - /* compare the options to make sure they are compatable */ + /* compare the options to make sure they are compatible */ error = fscache_compare_options(fscp, optp); if (error) { cmn_err(CE_WARN, @@ -507,8 +506,8 @@ out: /* * Compares fscache state with new mount options - * to make sure compatable. - * Returns ESRCH if not compatable or 0 for success. + * to make sure compatible. + * Returns ESRCH if not compatible or 0 for success. */ int fscache_compare_options(fscache_t *fscp, struct cachefsoptions *optp) @@ -811,7 +810,8 @@ fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp) attrp->va_gid = 0; attrp->va_type = VDIR; attrp->va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; - error = VOP_MKDIR(cachep->c_dirvp, namep, attrp, &fscdirvp, kcred); + error = VOP_MKDIR(cachep->c_dirvp, namep, attrp, &fscdirvp, kcred, + NULL, 0, NULL); if (error) { cmn_err(CE_WARN, "Can't create fs cache directory"); goto out; @@ -821,7 +821,7 @@ fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp) * Created the directory. Get the fileno. That'll be the cachefs_fsid. */ attrp->va_mask = AT_NODEID; - error = VOP_GETATTR(fscdirvp, attrp, 0, kcred); + error = VOP_GETATTR(fscdirvp, attrp, 0, kcred, NULL); if (error) { goto out; } @@ -832,7 +832,7 @@ fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp) attrp->va_type = VREG; attrp->va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; error = VOP_CREATE(fscdirvp, CACHEFS_FSINFO, attrp, EXCL, - 0600, &infovp, kcred, 0); + 0600, &infovp, kcred, 0, NULL, NULL); if (error) { cmn_err(CE_WARN, "Can't create fs option file"); goto out; @@ -858,7 +858,7 @@ fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp) cid.cid_fileno = fsid; make_ascii_name(&cid, name); error = VOP_RENAME(cachep->c_dirvp, namep, cachep->c_dirvp, - name, kcred); + name, kcred, NULL, 0); if (error) { cmn_err(CE_WARN, "Can't rename cache directory"); goto out; @@ -866,7 +866,8 @@ fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp) attrp->va_mask = AT_MODE | AT_TYPE; attrp->va_mode = 0777; attrp->va_type = VLNK; - error = VOP_SYMLINK(cachep->c_dirvp, namep, attrp, name, kcred); + error = VOP_SYMLINK(cachep->c_dirvp, namep, attrp, name, kcred, NULL, + 0); if (error) { cmn_err(CE_WARN, "Can't create cache directory symlink"); goto out; @@ -880,7 +881,8 @@ fscdir_create(cachefscache_t *cachep, char *namep, fscache_t *fscp) attrp->va_gid = 0; attrp->va_type = VDIR; attrp->va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; - error = VOP_MKDIR(fscdirvp, ATTRCACHE_NAME, attrp, &attrvp, kcred); + error = VOP_MKDIR(fscdirvp, ATTRCACHE_NAME, attrp, &attrvp, kcred, NULL, + 0, NULL); if (error) { cmn_err(CE_WARN, "Can't create attrcache dir for fscache"); goto out; @@ -939,7 +941,7 @@ fscdir_find(cachefscache_t *cachep, ino64_t fsid, fscache_t *fscp) /* try to find the directory */ error = VOP_LOOKUP(cachep->c_dirvp, dirname, &fscdirvp, NULL, - 0, NULL, kcred); + 0, NULL, kcred, NULL, NULL, NULL); if (error) goto out; @@ -953,7 +955,7 @@ fscdir_find(cachefscache_t *cachep, ino64_t fsid, fscache_t *fscp) /* try to find the info file */ error = VOP_LOOKUP(fscdirvp, CACHEFS_FSINFO, &infovp, - NULL, 0, NULL, kcred); + NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error) { cmn_err(CE_WARN, "cachefs: fscdir_find_b: cache corruption" " run fsck, %s", dirname); @@ -975,7 +977,7 @@ fscdir_find(cachefscache_t *cachep, ino64_t fsid, fscache_t *fscp) /* try to find the attrcache directory */ error = VOP_LOOKUP(fscdirvp, ATTRCACHE_NAME, - &attrvp, NULL, 0, NULL, kcred); + &attrvp, NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error) { cmn_err(CE_WARN, "cachefs: fscdir_find_d: cache corruption" " run fsck, %s", dirname); @@ -1076,7 +1078,7 @@ fscache_name_to_fsid(cachefscache_t *cachep, char *namep, ino64_t *fsidp) /* get the vnode of the name */ error = VOP_LOOKUP(cachep->c_dirvp, namep, &linkvp, NULL, 0, NULL, - kcred); + kcred, NULL, NULL, NULL); if (error) goto out; @@ -1096,7 +1098,7 @@ fscache_name_to_fsid(cachefscache_t *cachep, char *namep, ino64_t *fsidp) uio.uio_loffset = 0; uio.uio_fmode = 0; uio.uio_extflg = UIO_COPY_CACHED; - error = VOP_READLINK(linkvp, &uio, kcred); + error = VOP_READLINK(linkvp, &uio, kcred, NULL); if (error) { cmn_err(CE_WARN, "cachefs: Can't read filesystem cache link"); goto out; diff --git a/usr/src/uts/common/fs/cachefs/cachefs_ioctl.c b/usr/src/uts/common/fs/cachefs/cachefs_ioctl.c index 62c15fc35e..2a6b60a7a0 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_ioctl.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_ioctl.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -1123,7 +1122,7 @@ cachefs_io_getinfo(vnode_t *vp, void *dinp, void *doutp) /* Get the length of the directory */ va.va_mask = AT_SIZE; - error = VOP_GETATTR(dcp->c_frontvp, &va, 0, kcred); + error = VOP_GETATTR(dcp->c_frontvp, &va, 0, kcred, NULL); if (error) { error = 0; goto out; @@ -1248,7 +1247,7 @@ cachefs_io_getattrfid(vnode_t *vp, void *dinp, void *doutp) cr = conj_cred(&gafid->cg_cred); CACHEFS_TMPPTR_SET(attrp, &va, tmpvap, vattr_t); tmpvap->va_mask = AT_ALL; - error = VOP_GETATTR(backvp, tmpvap, 0, cr); + error = VOP_GETATTR(backvp, tmpvap, 0, cr, NULL); CACHEFS_VATTR_COPYOUT(tmpvap, attrp, error); crfree(cr); @@ -1298,7 +1297,7 @@ cachefs_io_getattrname(vnode_t *vp, void *dinp, void *doutp) /* lookup the file name */ cr = conj_cred(&gap->cg_cred); error = VOP_LOOKUP(pbackvp, gap->cg_name, &cbackvp, - (struct pathname *)NULL, 0, (vnode_t *)NULL, cr); + (struct pathname *)NULL, 0, (vnode_t *)NULL, cr, NULL, NULL, NULL); if (error) { crfree(cr); VN_RELE(pbackvp); @@ -1307,12 +1306,12 @@ cachefs_io_getattrname(vnode_t *vp, void *dinp, void *doutp) CACHEFS_TMPPTR_SET(&retp->cg_attr, &va, tmpvap, vattr_t); tmpvap->va_mask = AT_ALL; - error = VOP_GETATTR(cbackvp, tmpvap, 0, cr); + error = VOP_GETATTR(cbackvp, tmpvap, 0, cr, NULL); CACHEFS_VATTR_COPYOUT(tmpvap, &retp->cg_attr, error); if (!error) { CACHEFS_TMPPTR_SET(&retp->cg_fid, &tmpfid, tmpfidp, fid_t); tmpfidp->fid_len = MAXFIDSZ; - error = VOP_FID(cbackvp, tmpfidp); + error = VOP_FID(cbackvp, tmpfidp, NULL); CACHEFS_FID_COPYOUT(tmpfidp, &retp->cg_fid); } @@ -1415,7 +1414,7 @@ cachefs_io_pushback(vnode_t *vp, void *dinp, void *doutp) } /* do open so NFS gets correct creds on writes */ - error = VOP_OPEN(&backvp, FWRITE, cr); + error = VOP_OPEN(&backvp, FWRITE, cr, NULL); if (error) { mutex_exit(&cp->c_statelock); goto out; @@ -1450,9 +1449,9 @@ cachefs_io_pushback(vnode_t *vp, void *dinp, void *doutp) off += amt; } - error = VOP_FSYNC(backvp, FSYNC, cr); + error = VOP_FSYNC(backvp, FSYNC, cr, NULL); if (error == 0) - error = VOP_CLOSE(backvp, FWRITE, 1, (offset_t)0, cr); + error = VOP_CLOSE(backvp, FWRITE, 1, (offset_t)0, cr, NULL); if (error) { mutex_exit(&cp->c_statelock); goto out; @@ -1469,7 +1468,7 @@ cachefs_io_pushback(vnode_t *vp, void *dinp, void *doutp) * new ctime and mtimes. */ va.va_mask = AT_ALL; - error = VOP_GETATTR(backvp, &va, 0, cr); + error = VOP_GETATTR(backvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->pb_ctime, error); @@ -1527,21 +1526,21 @@ cachefs_io_create(vnode_t *vp, void *dinp, void *doutp) CACHEFS_TMPPTR_SET(&crp->cr_va, &va, tmpvap, vattr_t); CACHEFS_VATTR_COPYIN(&crp->cr_va, tmpvap); error = VOP_CREATE(dvp, crp->cr_name, tmpvap, - crp->cr_exclusive, crp->cr_mode, &cvp, cr, 0); + crp->cr_exclusive, crp->cr_mode, &cvp, cr, 0, NULL, NULL); if (error) goto out; /* get the fid of the file */ CACHEFS_TMPPTR_SET(&retp->cr_newfid, &tmpfid, tmpfidp, fid_t); tmpfidp->fid_len = MAXFIDSZ; - error = VOP_FID(cvp, tmpfidp); + error = VOP_FID(cvp, tmpfidp, NULL); if (error) goto out; CACHEFS_FID_COPYOUT(tmpfidp, &retp->cr_newfid); /* get attributes for the file */ va.va_mask = AT_ALL; - error = VOP_GETATTR(cvp, &va, 0, cr); + error = VOP_GETATTR(cvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->cr_ctime, error); @@ -1614,10 +1613,11 @@ cachefs_io_remove(vnode_t *vp, void *dinp, void *doutp) /* if the caller wants the ctime after the remove */ if (ctimep) { - error = VOP_LOOKUP(dvp, rmp->rm_name, &cvp, NULL, 0, NULL, cr); + error = VOP_LOOKUP(dvp, rmp->rm_name, &cvp, NULL, 0, NULL, cr, + NULL, NULL, NULL); if (error == 0) { child_fid.fid_len = MAXFIDSZ; - error = VOP_FID(cvp, &child_fid); + error = VOP_FID(cvp, &child_fid, NULL); VN_RELE(cvp); } if (error) @@ -1625,7 +1625,7 @@ cachefs_io_remove(vnode_t *vp, void *dinp, void *doutp) } /* do the remove */ - error = VOP_REMOVE(dvp, rmp->rm_name, cr); + error = VOP_REMOVE(dvp, rmp->rm_name, cr, NULL, 0); if (error) goto out; @@ -1634,7 +1634,7 @@ cachefs_io_remove(vnode_t *vp, void *dinp, void *doutp) error = VFS_VGET(fscp->fs_backvfsp, &cvp, &child_fid); if (error == 0) { va.va_mask = AT_ALL; - error = VOP_GETATTR(cvp, &va, 0, cr); + error = VOP_GETATTR(cvp, &va, 0, cr, NULL); if (error == 0) { CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, ctimep, error); @@ -1697,13 +1697,13 @@ cachefs_io_link(vnode_t *vp, void *dinp, void *doutp) cr = conj_cred(&linkp->ln_cred); /* do the link */ - error = VOP_LINK(dvp, lvp, linkp->ln_name, cr); + error = VOP_LINK(dvp, lvp, linkp->ln_name, cr, NULL, 0); if (error) goto out; /* get the ctime */ va.va_mask = AT_ALL; - error = VOP_GETATTR(lvp, &va, 0, cr); + error = VOP_GETATTR(lvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, ctimep, error); @@ -1771,14 +1771,14 @@ cachefs_io_rename(vnode_t *vp, void *dinp, void *doutp) /* if the caller wants the ctime of the target after deletion */ if (rnp->rn_del_getctime) { error = VOP_LOOKUP(ndvp, rnp->rn_newname, &cvp, NULL, 0, - NULL, cr); + NULL, cr, NULL, NULL, NULL); if (error) { cvp = NULL; /* paranoia */ goto out; } child_fid.fid_len = MAXFIDSZ; - error = VOP_FID(cvp, &child_fid); + error = VOP_FID(cvp, &child_fid, NULL); if (error) goto out; VN_RELE(cvp); @@ -1786,17 +1786,19 @@ cachefs_io_rename(vnode_t *vp, void *dinp, void *doutp) } /* do the rename */ - error = VOP_RENAME(odvp, rnp->rn_oldname, ndvp, rnp->rn_newname, cr); + error = VOP_RENAME(odvp, rnp->rn_oldname, ndvp, rnp->rn_newname, cr, + NULL, 0); if (error) goto out; /* get the new ctime on the renamed file */ - error = VOP_LOOKUP(ndvp, rnp->rn_newname, &cvp, NULL, 0, NULL, cr); + error = VOP_LOOKUP(ndvp, rnp->rn_newname, &cvp, NULL, 0, NULL, cr, + NULL, NULL, NULL); if (error) goto out; va.va_mask = AT_ALL; - error = VOP_GETATTR(cvp, &va, 0, cr); + error = VOP_GETATTR(cvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->rn_ctime, error); @@ -1815,7 +1817,7 @@ cachefs_io_rename(vnode_t *vp, void *dinp, void *doutp) goto out; } va.va_mask = AT_ALL; - error = VOP_GETATTR(cvp, &va, 0, cr); + error = VOP_GETATTR(cvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->rn_del_ctime, @@ -1878,14 +1880,14 @@ cachefs_io_mkdir(vnode_t *vp, void *dinp, void *doutp) /* make the directory */ CACHEFS_TMPPTR_SET(&mdirp->md_vattr, &va, tmpvap, vattr_t); CACHEFS_VATTR_COPYIN(&mdirp->md_vattr, tmpvap); - error = VOP_MKDIR(dvp, mdirp->md_name, tmpvap, &cvp, cr); + error = VOP_MKDIR(dvp, mdirp->md_name, tmpvap, &cvp, cr, NULL, 0, NULL); if (error) { if (error != EEXIST) goto out; /* if the directory already exists, then use it */ error = VOP_LOOKUP(dvp, mdirp->md_name, &cvp, - NULL, 0, NULL, cr); + NULL, 0, NULL, cr, NULL, NULL, NULL); if (error) { cvp = NULL; goto out; @@ -1899,14 +1901,14 @@ cachefs_io_mkdir(vnode_t *vp, void *dinp, void *doutp) /* get the fid of the directory */ CACHEFS_TMPPTR_SET(fidp, &tmpfid, tmpfidp, fid_t); tmpfidp->fid_len = MAXFIDSZ; - error = VOP_FID(cvp, tmpfidp); + error = VOP_FID(cvp, tmpfidp, NULL); if (error) goto out; CACHEFS_FID_COPYOUT(tmpfidp, fidp); /* get attributes of the directory */ va.va_mask = AT_ALL; - error = VOP_GETATTR(cvp, &va, 0, cr); + error = VOP_GETATTR(cvp, &va, 0, cr, NULL); if (error) goto out; @@ -1969,7 +1971,7 @@ cachefs_io_rmdir(vnode_t *vp, void *dinp, void *doutp) } cr = conj_cred(&rdp->rd_cred); - error = VOP_RMDIR(dvp, rdp->rd_name, dvp, cr); + error = VOP_RMDIR(dvp, rdp->rd_name, dvp, cr, NULL, 0); crfree(cr); VN_RELE(dvp); @@ -2019,18 +2021,19 @@ cachefs_io_symlink(vnode_t *vp, void *dinp, void *doutp) CACHEFS_TMPPTR_SET(&symp->sy_vattr, &va, tmpvap, vattr_t); CACHEFS_VATTR_COPYIN(&symp->sy_vattr, tmpvap); error = VOP_SYMLINK(dvp, symp->sy_name, tmpvap, - symp->sy_link, cr); + symp->sy_link, cr, NULL, 0); if (error) goto out; /* get the vnode for the symlink */ - error = VOP_LOOKUP(dvp, symp->sy_name, &svp, NULL, 0, NULL, cr); + error = VOP_LOOKUP(dvp, symp->sy_name, &svp, NULL, 0, NULL, cr, + NULL, NULL, NULL); if (error) goto out; /* get the attributes of the symlink */ va.va_mask = AT_ALL; - error = VOP_GETATTR(svp, &va, 0, cr); + error = VOP_GETATTR(svp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->sy_ctime, error); @@ -2041,7 +2044,7 @@ cachefs_io_symlink(vnode_t *vp, void *dinp, void *doutp) /* get the fid */ CACHEFS_TMPPTR_SET(&retp->sy_newfid, &tmpfid, tmpfidp, fid_t); tmpfidp->fid_len = MAXFIDSZ; - error = VOP_FID(svp, tmpfidp); + error = VOP_FID(svp, tmpfidp, NULL); if (error) goto out; CACHEFS_FID_COPYOUT(tmpfidp, &retp->sy_newfid); @@ -2120,7 +2123,7 @@ cachefs_io_setattr(vnode_t *vp, void *dinp, void *doutp) /* get the new ctime and mtime */ va.va_mask = AT_ALL; - error = VOP_GETATTR(cvp, &va, 0, cr); + error = VOP_GETATTR(cvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->sa_ctime, error); @@ -2181,14 +2184,14 @@ cachefs_io_setsecattr(vnode_t *vp, void *dinp, void *doutp) /* set the ACL */ (void) VOP_RWLOCK(tvp, V_WRITELOCK_TRUE, NULL); - error = VOP_SETSECATTR(tvp, &vsec, 0, cr); + error = VOP_SETSECATTR(tvp, &vsec, 0, cr, NULL); VOP_RWUNLOCK(tvp, V_WRITELOCK_TRUE, NULL); if (error != 0) goto out; /* get the new ctime and mtime */ va.va_mask = AT_ALL; - error = VOP_GETATTR(tvp, &va, 0, cr); + error = VOP_GETATTR(tvp, &va, 0, cr, NULL); if (error) goto out; CACHEFS_TS_TO_CFS_TS_COPY(&va.va_ctime, &retp->sc_ctime, error); @@ -2223,7 +2226,7 @@ drop_backvp(cnode_t *cp) if (cp->c_backvp) { /* dump any pages, may be a dirty one */ (void) VOP_PUTPAGE(cp->c_backvp, (offset_t)0, 0, - B_INVAL | B_TRUNC, kcred); + B_INVAL | B_TRUNC, kcred, NULL); } mutex_exit(&cp->c_statelock); } diff --git a/usr/src/uts/common/fs/cachefs/cachefs_log.c b/usr/src/uts/common/fs/cachefs/cachefs_log.c index 8d0103cd39..76a6453ba6 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_log.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_log.c @@ -57,7 +57,7 @@ /* * cfs_time_t is an int in both LP64 and ILP32. To avoid compiler warnings - * define its xdr here explicitely + * define its xdr here explicitly */ #define xdr_cfs_time_t(xdrs, p) xdr_int((xdrs), (int *)(p)) @@ -198,7 +198,8 @@ cachefs_log_kstat_snapshot(kstat_t *ksp, void *buf, int rw) bzero(lc, sizeof (*lc)); lc->lc_magic = CACHEFS_LOG_MAGIC; lc->lc_cachep = (uint64_t)(uintptr_t)cachep; - (void) VOP_REMOVE(cachep->c_dirvp, LOG_STATUS_NAME, kcred); + (void) VOP_REMOVE(cachep->c_dirvp, LOG_STATUS_NAME, kcred, NULL, + 0); return (0); } @@ -246,9 +247,9 @@ cachefs_log_save_lc(cachefscache_t *cachep) attr.va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; if (((error = VOP_LOOKUP(cachep->c_dirvp, LOG_STATUS_NAME, &savevp, - NULL, 0, NULL, kcred)) != 0) && + NULL, 0, NULL, kcred, NULL, NULL, NULL)) != 0) && ((error = VOP_CREATE(cachep->c_dirvp, LOG_STATUS_NAME, &attr, EXCL, - 0600, &savevp, kcred, 0)) != 0)) + 0600, &savevp, kcred, 0, NULL, NULL)) != 0)) return (error); ASSERT(savevp != NULL); if (savevp == NULL) @@ -322,7 +323,7 @@ cachefs_log_destroy_cookie(cachefs_log_cookie_t *cl) * * opens the logfile, and stores the path string if its successful. * - * returns an errno if one occured. + * returns an errno if one occurred. * */ @@ -406,7 +407,7 @@ out: } /* - * called when an error occured during logging. send the error to + * called when an error occurred during logging. send the error to * syslog, invalidate the logfile, and stop logging. */ @@ -437,7 +438,8 @@ cachefs_log_error(cachefscache_t *cachep, int error, int getlock) lc->lc_magic = CACHEFS_LOG_MAGIC; lc->lc_cachep = (uint64_t)(uintptr_t)cachep; if (writable) - (void) VOP_REMOVE(cachep->c_dirvp, LOG_STATUS_NAME, kcred); + (void) VOP_REMOVE(cachep->c_dirvp, LOG_STATUS_NAME, kcred, NULL, + 0); if (getlock) mutex_exit(&cachep->c_log_mutex); @@ -454,7 +456,7 @@ cachefs_log_write_header(struct vnode *vp, cachefscache_t *cachep, int error) XDR xdrm; attr.va_mask = AT_SIZE; - if ((error = VOP_GETATTR(vp, &attr, 0, kcred)) != 0) + if ((error = VOP_GETATTR(vp, &attr, 0, kcred, NULL)) != 0) goto out; if (attr.va_size != 0) { error = vn_rdwr(UIO_READ, vp, buffy, @@ -664,7 +666,7 @@ out: cachefs_kmem_free(buffy, CACHEFS_LOG_ENCODE_SIZE); /* - * if an error occured, we need to free the buffers ourselves. + * if an error occurred, we need to free the buffers ourselves. * cachefs_destory_cookie() can't do it. */ diff --git a/usr/src/uts/common/fs/cachefs/cachefs_noopc.c b/usr/src/uts/common/fs/cachefs/cachefs_noopc.c index 5b9c3d7062..245025bf0a 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_noopc.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_noopc.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -81,7 +80,7 @@ c_nop_init_cached_object(fscache_t *fscp, cnode_t *cp, vattr_t *vap, /* get the attributes */ cp->c_attr.va_mask = AT_ALL; ASSERT(cp->c_backvp != NULL); - error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr, NULL); if (error) return (error); } else { @@ -127,7 +126,7 @@ c_nop_check_cached_object(struct fscache *fscp, struct cnode *cp, /* get the file attributes from the back fs */ attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); backhit = 1; if (error) goto out; @@ -181,7 +180,7 @@ c_nop_modify_cached_object(struct fscache *fscp, struct cnode *cp, cred_t *cr) return; } attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); if (error) return; nlink = cp->c_attr.va_nlink; diff --git a/usr/src/uts/common/fs/cachefs/cachefs_resource.c b/usr/src/uts/common/fs/cachefs/cachefs_resource.c index c250f7cef1..796d352237 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_resource.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_resource.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -76,7 +75,7 @@ static void cachefs_packed_pending(cachefscache_t *cachep); (&(cachep->c_rlinfo.rl_items[CACHEFS_RL_INDEX(type)])) /* - * This function moves an RL entry from whereever it currently is to + * This function moves an RL entry from wherever it currently is to * the back of the requested list. */ void @@ -989,7 +988,7 @@ cachefs_cachep_worker_thread(cachefscache_t *cachep) fl.l_sysid = 0; fl.l_pid = 0; error = VOP_FRLOCK(cachep->c_lockvp, F_SETLK, &fl, FWRITE, - (offset_t)0, NULL, kcred); + (offset_t)0, NULL, kcred, NULL); if (error) { cmn_err(CE_WARN, "cachefs: Can't lock Cache Lock File(r); Error %d\n", @@ -1058,7 +1057,7 @@ cachefs_cachep_worker_thread(cachefscache_t *cachep) fl.l_sysid = 0; fl.l_pid = 0; error = VOP_FRLOCK(cachep->c_lockvp, F_SETLK, &fl, - FWRITE, (offset_t)0, NULL, kcred); + FWRITE, (offset_t)0, NULL, kcred, NULL); if (error) { cmn_err(CE_WARN, "cachefs: Can't unlock lock file\n"); } @@ -1407,7 +1406,7 @@ cachefs_gc_front_atime(cachefscache_t *cachep) make_ascii_name(&dircid, namebuf); if (VOP_LOOKUP(fscp->fs_fscdirvp, namebuf, &dirvp, (struct pathname *)NULL, 0, - (vnode_t *)NULL, kcred) == 0) { + (vnode_t *)NULL, kcred, NULL, NULL, NULL) == 0) { make_ascii_name(&cid, namebuf); reledir++; } else { @@ -1417,7 +1416,7 @@ cachefs_gc_front_atime(cachefscache_t *cachep) } if (dirvp && VOP_LOOKUP(dirvp, namebuf, &filevp, (struct pathname *)NULL, 0, - (vnode_t *)NULL, kcred) == 0) { + (vnode_t *)NULL, kcred, NULL, NULL, NULL) == 0) { gotfile = 1; } if (reledir) @@ -1426,7 +1425,7 @@ cachefs_gc_front_atime(cachefscache_t *cachep) if (gotfile) { va.va_mask = AT_ATIME; - if (VOP_GETATTR(filevp, &va, 0, kcred) == 0) + if (VOP_GETATTR(filevp, &va, 0, kcred, NULL) == 0) rc = va.va_atime.tv_sec; VN_RELE(filevp); } diff --git a/usr/src/uts/common/fs/cachefs/cachefs_strict.c b/usr/src/uts/common/fs/cachefs/cachefs_strict.c index 75fd305760..9a4011b459 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_strict.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_strict.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -93,7 +92,7 @@ c_strict_init_cached_object(fscache_t *fscp, cnode_t *cp, vattr_t *vap, /* get the attributes */ cp->c_attr.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr, NULL); if (error) return (error); } else { @@ -146,7 +145,7 @@ c_strict_check_cached_object(struct fscache *fscp, struct cnode *cp, if (CFS_ISFS_BACKFS_NFSV4(fscp)) { backhit = 1; attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); if (error) goto out; cp->c_attr = attrs; @@ -194,7 +193,7 @@ again: /* get the file attributes from the back fs */ attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); backhit = 1; if (error) goto out; @@ -239,7 +238,7 @@ again: } if ((CTOV(cp))->v_type == VREG) { attrs.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); if (error) goto out; } @@ -335,7 +334,7 @@ c_strict_modify_cached_object(struct fscache *fscp, struct cnode *cp, attrs.va_mask = AT_ALL; ASSERT(cp->c_backvp != NULL); - error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &attrs, 0, cr, NULL); if (error) { mdp->md_vattr.va_mtime.tv_sec = 0; goto out; diff --git a/usr/src/uts/common/fs/cachefs/cachefs_subr.c b/usr/src/uts/common/fs/cachefs/cachefs_subr.c index b3aac88a35..1f82e638e6 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_subr.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_subr.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -277,7 +276,7 @@ cachefs_cache_activate_ro(cachefscache_t *cachep, vnode_t *cdvp) /* get the mode bits of the cache directory */ attrp->va_mask = AT_ALL; - error = VOP_GETATTR(cdvp, attrp, 0, kcred); + error = VOP_GETATTR(cdvp, attrp, 0, kcred, NULL); if (error) goto out; @@ -290,7 +289,7 @@ cachefs_cache_activate_ro(cachefscache_t *cachep, vnode_t *cdvp) /* Get the lock file */ error = VOP_LOOKUP(cdvp, CACHEFS_LOCK_FILE, &lockvp, NULL, 0, NULL, - kcred); + kcred, NULL, NULL, NULL); if (error) { cmn_err(CE_WARN, "cachefs: activate_a: cache corruption" " run fsck.\n"); @@ -299,7 +298,7 @@ cachefs_cache_activate_ro(cachefscache_t *cachep, vnode_t *cdvp) /* Get the label file */ error = VOP_LOOKUP(cdvp, CACHELABEL_NAME, &labelvp, NULL, 0, NULL, - kcred); + kcred, NULL, NULL, NULL); if (error) { cmn_err(CE_WARN, "cachefs: activate_b: cache corruption" " run fsck.\n"); @@ -324,7 +323,8 @@ cachefs_cache_activate_ro(cachefscache_t *cachep, vnode_t *cdvp) } /* Open the resource file */ - error = VOP_LOOKUP(cdvp, RESOURCE_NAME, &rifvp, NULL, 0, NULL, kcred); + error = VOP_LOOKUP(cdvp, RESOURCE_NAME, &rifvp, NULL, 0, NULL, kcred, + NULL, NULL, NULL); if (error) { cmn_err(CE_WARN, "cachefs: activate_d: cache corruption" " run fsck.\n"); @@ -360,7 +360,7 @@ cachefs_cache_activate_ro(cachefscache_t *cachep, vnode_t *cdvp) /* Open the lost+found directory */ error = VOP_LOOKUP(cdvp, CACHEFS_LOSTFOUND_NAME, &lostfoundvp, - NULL, 0, NULL, kcred); + NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error) { cmn_err(CE_WARN, "cachefs: activate_g: cache corruption" " run fsck.\n"); @@ -389,7 +389,7 @@ cachefs_cache_activate_ro(cachefscache_t *cachep, vnode_t *cdvp) /* if the LOG_STATUS_NAME file exists, read it in and set up logging */ error = VOP_LOOKUP(cachep->c_dirvp, LOG_STATUS_NAME, &statevp, - NULL, 0, NULL, kcred); + NULL, 0, NULL, kcred, NULL, NULL, NULL); if (error == 0) { int vnrw_error; @@ -738,7 +738,7 @@ cachefs_cache_rssync(struct cachefscache *cachep) if (error) { cmn_err(CE_WARN, "cachefs: Can't Write Cache RL Info\n"); } - error = VOP_FSYNC(cachep->c_resfilevp, FSYNC, kcred); + error = VOP_FSYNC(cachep->c_resfilevp, FSYNC, kcred, NULL); return (error); } @@ -974,11 +974,11 @@ cachefs_createfrontfile(cnode_t *cp, struct filegrp *fgp) if (cp->c_flags & CN_ASYNC_POP_WORKING) { /* lookup the already created front file */ error = VOP_LOOKUP(fgp->fg_dirvp, name, &cp->c_frontvp, - NULL, 0, NULL, kcred); + NULL, 0, NULL, kcred, NULL, NULL, NULL); } else { /* create the front file */ error = VOP_CREATE(fgp->fg_dirvp, name, attrp, EXCL, mode, - &cp->c_frontvp, kcred, 0); + &cp->c_frontvp, kcred, 0, NULL, NULL); } if (error) { #ifdef CFSDEBUG @@ -992,7 +992,7 @@ cachefs_createfrontfile(cnode_t *cp, struct filegrp *fgp) /* get a copy of the fid of the front file */ cp->c_metadata.md_fid.fid_len = MAXFIDSZ; - error = VOP_FID(cp->c_frontvp, &cp->c_metadata.md_fid); + error = VOP_FID(cp->c_frontvp, &cp->c_metadata.md_fid, NULL); if (error) { /* * If we get back ENOSPC then the fid we passed in was too @@ -1013,7 +1013,7 @@ out: if (error) { if (cp->c_frontvp) { VN_RELE(cp->c_frontvp); - (void) VOP_REMOVE(fgp->fg_dirvp, name, kcred); + (void) VOP_REMOVE(fgp->fg_dirvp, name, kcred, NULL, 0); cp->c_frontvp = NULL; } if (ffrele) @@ -1064,7 +1064,7 @@ cachefs_removefrontfile(cachefs_metadata_t *mdp, cfs_cid_t *cidp, return; } make_ascii_name(cidp, name); - error = VOP_REMOVE(fgp->fg_dirvp, name, kcred); + error = VOP_REMOVE(fgp->fg_dirvp, name, kcred, NULL, 0); if (error == ENOENT) enoent = 1; if ((error) && (error != ENOENT)) { @@ -1074,7 +1074,7 @@ cachefs_removefrontfile(cachefs_metadata_t *mdp, cfs_cid_t *cidp, if (mdp->md_flags & MD_ACLDIR) { (void) strcat(name, ".d"); error = VOP_RMDIR(fgp->fg_dirvp, name, fgp->fg_dirvp, - kcred); + kcred, NULL, 0); if ((error) && (error != ENOENT)) { cmn_err(CE_WARN, "frontfs rmdir error %s %d" "; run fsck\n", name, error); @@ -1210,7 +1210,7 @@ cachefs_getfrontfile(cnode_t *cp) /* get modify time of the front file */ va.va_mask = AT_MTIME; - error = VOP_GETATTR(cp->c_frontvp, &va, 0, kcred); + error = VOP_GETATTR(cp->c_frontvp, &va, 0, kcred, NULL); if (error) { cmn_err(CE_WARN, "cachefs: gff2: front file" " system error %d", error); @@ -1721,7 +1721,7 @@ out: /* * due to compiler error we shifted cnode to the last argument slot. - * occured during large files project - XXX. + * occurred during large files project - XXX. */ void cachefs_cluster_allocmap(u_offset_t off, u_offset_t *popoffp, @@ -1911,7 +1911,7 @@ cachefs_readlink_back(cnode_t *cp, cred_t *cr, caddr_t *bufp, int *buflenp) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_readlink (nfsv4): cnode %p, backvp %p\n", cp, cp->c_backvp)); - error = VOP_READLINK(cp->c_backvp, &uio, cr); + error = VOP_READLINK(cp->c_backvp, &uio, cr, NULL); if (error) { cachefs_kmem_free(buf, MAXPATHLEN); } else { @@ -1980,7 +1980,7 @@ cachefs_getbackvp(struct fscache *fscp, struct cnode *cp) flag |= FWRITE; } } - error = VOP_OPEN(&cp->c_backvp, flag, cp->c_cred); + error = VOP_OPEN(&cp->c_backvp, flag, cp->c_cred, NULL); if (error) { VN_RELE(cp->c_backvp); cp->c_backvp = NULL; @@ -2028,7 +2028,7 @@ cachefs_getcookie( * variable length fids we will need to change this. */ cookiep->fid_len = MAXFIDSZ; - error = VOP_FID(vp, cookiep); + error = VOP_FID(vp, cookiep, NULL); } else { bzero(cookiep, sizeof (*cookiep)); } @@ -2037,7 +2037,7 @@ cachefs_getcookie( if (attrp) { ASSERT(attrp != NULL); attrp->va_mask = AT_ALL; - error = VOP_GETATTR(vp, attrp, 0, cr); + error = VOP_GETATTR(vp, attrp, 0, cr, NULL); } } else { if (error == ENOSPC) { @@ -2254,7 +2254,7 @@ cachefs_async_putpage(struct cachefs_putpage_req *prp, cred_t *cr) ASSERT(CFS_ISFS_BACKFS_NFSV4(C_TO_FSCACHE(cp)) == 0); (void) VOP_PUTPAGE(prp->cp_vp, prp->cp_off, prp->cp_len, - prp->cp_flags, cr); + prp->cp_flags, cr, NULL); mutex_enter(&cp->c_iomutex); if (--cp->c_nio == 0) @@ -2378,7 +2378,7 @@ cachefs_async_populate(struct cachefs_populate_req *pop, cred_t *cr) make_ascii_name(&cid, name); (void) VOP_CREATE(fgp->fg_dirvp, name, attrp, - EXCL, 0666, &frontvp, kcred, 0); + EXCL, 0666, &frontvp, kcred, 0, NULL, NULL); cachefs_kmem_free(attrp, sizeof (struct vattr)); @@ -2433,7 +2433,7 @@ cachefs_async_populate(struct cachefs_populate_req *pop, cred_t *cr) if (error != 0) goto out; - error = VOP_FSYNC(frontvp, FSYNC, cr); + error = VOP_FSYNC(frontvp, FSYNC, cr, NULL); if (error != 0) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_ASYNCPOP) @@ -2453,7 +2453,7 @@ cachefs_async_populate(struct cachefs_populate_req *pop, cred_t *cr) } va.va_mask = AT_MTIME; - error = VOP_GETATTR(cp->c_frontvp, &va, 0, cr); + error = VOP_GETATTR(cp->c_frontvp, &va, 0, cr, NULL); if (error) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_ASYNCPOP) diff --git a/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c b/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c index fd1ee0b4d8..26631b3380 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_vfsops.c @@ -403,7 +403,7 @@ again: } fscache_list_add(cachep, fscp); } else { - /* compare the options to make sure they are compatable */ + /* compare the options to make sure they are compatible */ error = fscache_compare_options(fscp, cfs_options); if (error) { cmn_err(CE_WARN, @@ -426,7 +426,7 @@ again: error = 0; if (fscp->fs_fscdirvp) { error = VOP_LOOKUP(fscp->fs_fscdirvp, CACHEFS_DLOG_FILE, - &tmpdirvp, NULL, 0, NULL, kcred); + &tmpdirvp, NULL, 0, NULL, kcred, NULL, NULL, NULL); /* * If a log file exists and the cache is being mounted without @@ -550,7 +550,7 @@ again: */ error = VOP_PATHCONF(backrootvp, _PC_FILESIZEBITS, &maxfilesizebits, - kcred); + kcred, NULL); if (error) { cmn_err(CE_WARN, @@ -562,7 +562,8 @@ again: mutex_exit(&fscp->fs_fslock); /* remove the unmount file if it is there */ - (void) VOP_REMOVE(fscp->fs_fscdirvp, CACHEFS_UNMNT_FILE, kcred); + (void) VOP_REMOVE(fscp->fs_fscdirvp, CACHEFS_UNMNT_FILE, kcred, NULL, + 0); /* wake up the cache worker if ANY packed pending work */ mutex_enter(&cachep->c_contentslock); @@ -957,7 +958,7 @@ cachefs_unmount(vfs_t *vfsp, int flag, cred_t *cr) attr.va_mask = AT_TYPE | AT_MODE | AT_UID | AT_GID; if (fscp->fs_fscdirvp != NULL) xx = VOP_CREATE(fscp->fs_fscdirvp, CACHEFS_UNMNT_FILE, &attr, - NONEXCL, 0600, &nmvp, kcred, 0); + NONEXCL, 0600, &nmvp, kcred, 0, NULL, NULL); else xx = ENOENT; /* for unmounting when NOCACHE */ if (xx == 0) { @@ -1207,7 +1208,7 @@ cachefs_remount(struct vfs *vfsp, struct mounta *uap) error = 0; if (cachedirvp) { error = VOP_LOOKUP(cachedirvp, CACHEFS_DLOG_FILE, - &tmpdirvp, NULL, 0, NULL, kcred); + &tmpdirvp, NULL, 0, NULL, kcred, NULL, NULL, NULL); } cfs_options = (struct cachefsoptions *)STRUCT_FADDR(map, cfs_options); cacheid = (char *)STRUCT_FGETP(map, cfs_cacheid); diff --git a/usr/src/uts/common/fs/cachefs/cachefs_vnops.c b/usr/src/uts/common/fs/cachefs/cachefs_vnops.c index 5451c20467..795c70dc3d 100644 --- a/usr/src/uts/common/fs/cachefs/cachefs_vnops.c +++ b/usr/src/uts/common/fs/cachefs/cachefs_vnops.c @@ -136,60 +136,71 @@ static int cachefs_readback_translate(cnode_t *cp, uio_t *uiop, static int cachefs_setattr_common(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, caller_context_t *ct); -static int cachefs_open(struct vnode **, int, cred_t *); +static int cachefs_open(struct vnode **, int, cred_t *, + caller_context_t *); static int cachefs_close(struct vnode *, int, int, offset_t, - cred_t *); + cred_t *, caller_context_t *); static int cachefs_read(struct vnode *, struct uio *, int, cred_t *, caller_context_t *); static int cachefs_write(struct vnode *, struct uio *, int, cred_t *, caller_context_t *); static int cachefs_ioctl(struct vnode *, int, intptr_t, int, cred_t *, - int *); + int *, caller_context_t *); static int cachefs_getattr(struct vnode *, struct vattr *, int, - cred_t *); + cred_t *, caller_context_t *); static int cachefs_setattr(struct vnode *, struct vattr *, int, cred_t *, caller_context_t *); -static int cachefs_access(struct vnode *, int, int, cred_t *); +static int cachefs_access(struct vnode *, int, int, cred_t *, + caller_context_t *); static int cachefs_lookup(struct vnode *, char *, struct vnode **, - struct pathname *, int, struct vnode *, cred_t *); + struct pathname *, int, struct vnode *, cred_t *, + caller_context_t *, int *, pathname_t *); static int cachefs_create(struct vnode *, char *, struct vattr *, - enum vcexcl, int, struct vnode **, cred_t *, int); + enum vcexcl, int, struct vnode **, cred_t *, int, + caller_context_t *, vsecattr_t *); static int cachefs_create_connected(vnode_t *dvp, char *nm, vattr_t *vap, enum vcexcl exclusive, int mode, vnode_t **vpp, cred_t *cr); static int cachefs_create_disconnected(vnode_t *dvp, char *nm, vattr_t *vap, enum vcexcl exclusive, int mode, vnode_t **vpp, cred_t *cr); -static int cachefs_remove(struct vnode *, char *, cred_t *); +static int cachefs_remove(struct vnode *, char *, cred_t *, + caller_context_t *, int); static int cachefs_link(struct vnode *, struct vnode *, char *, - cred_t *); + cred_t *, caller_context_t *, int); static int cachefs_rename(struct vnode *, char *, struct vnode *, - char *, cred_t *); + char *, cred_t *, caller_context_t *, int); static int cachefs_mkdir(struct vnode *, char *, struct - vattr *, struct vnode **, cred_t *); + vattr *, struct vnode **, cred_t *, caller_context_t *, + int, vsecattr_t *); static int cachefs_rmdir(struct vnode *, char *, struct vnode *, - cred_t *); + cred_t *, caller_context_t *, int); static int cachefs_readdir(struct vnode *, struct uio *, - cred_t *, int *); + cred_t *, int *, caller_context_t *, int); static int cachefs_symlink(struct vnode *, char *, struct vattr *, - char *, cred_t *); -static int cachefs_readlink(struct vnode *, struct uio *, cred_t *); + char *, cred_t *, caller_context_t *, int); +static int cachefs_readlink(struct vnode *, struct uio *, cred_t *, + caller_context_t *); static int cachefs_readlink_connected(vnode_t *vp, uio_t *uiop, cred_t *cr); static int cachefs_readlink_disconnected(vnode_t *vp, uio_t *uiop); -static int cachefs_fsync(struct vnode *, int, cred_t *); -static void cachefs_inactive(struct vnode *, cred_t *); -static int cachefs_fid(struct vnode *, struct fid *); +static int cachefs_fsync(struct vnode *, int, cred_t *, + caller_context_t *); +static void cachefs_inactive(struct vnode *, cred_t *, caller_context_t *); +static int cachefs_fid(struct vnode *, struct fid *, caller_context_t *); static int cachefs_rwlock(struct vnode *, int, caller_context_t *); static void cachefs_rwunlock(struct vnode *, int, caller_context_t *); -static int cachefs_seek(struct vnode *, offset_t, offset_t *); +static int cachefs_seek(struct vnode *, offset_t, offset_t *, + caller_context_t *); static int cachefs_frlock(struct vnode *, int, struct flock64 *, - int, offset_t, struct flk_callback *, cred_t *); + int, offset_t, struct flk_callback *, cred_t *, + caller_context_t *); static int cachefs_space(struct vnode *, int, struct flock64 *, int, offset_t, cred_t *, caller_context_t *); -static int cachefs_realvp(struct vnode *, struct vnode **); +static int cachefs_realvp(struct vnode *, struct vnode **, + caller_context_t *); static int cachefs_getpage(struct vnode *, offset_t, size_t, uint_t *, struct page *[], size_t, struct seg *, caddr_t, - enum seg_rw, cred_t *); + enum seg_rw, cred_t *, caller_context_t *); static int cachefs_getapage(struct vnode *, u_offset_t, size_t, uint_t *, struct page *[], size_t, struct seg *, caddr_t, enum seg_rw, cred_t *); @@ -197,37 +208,42 @@ static int cachefs_getapage_back(struct vnode *, u_offset_t, size_t, uint_t *, struct page *[], size_t, struct seg *, caddr_t, enum seg_rw, cred_t *); static int cachefs_putpage(struct vnode *, offset_t, size_t, int, - cred_t *); + cred_t *, caller_context_t *); static int cachefs_map(struct vnode *, offset_t, struct as *, - caddr_t *, size_t, uchar_t, uchar_t, uint_t, cred_t *); + caddr_t *, size_t, uchar_t, uchar_t, uint_t, cred_t *, + caller_context_t *); static int cachefs_addmap(struct vnode *, offset_t, struct as *, - caddr_t, size_t, uchar_t, uchar_t, uint_t, cred_t *); + caddr_t, size_t, uchar_t, uchar_t, uint_t, cred_t *, + caller_context_t *); static int cachefs_delmap(struct vnode *, offset_t, struct as *, - caddr_t, size_t, uint_t, uint_t, uint_t, cred_t *); + caddr_t, size_t, uint_t, uint_t, uint_t, cred_t *, + caller_context_t *); static int cachefs_setsecattr(vnode_t *vp, vsecattr_t *vsec, - int flag, cred_t *cr); + int flag, cred_t *cr, caller_context_t *); static int cachefs_getsecattr(vnode_t *vp, vsecattr_t *vsec, - int flag, cred_t *cr); + int flag, cred_t *cr, caller_context_t *); static int cachefs_shrlock(vnode_t *, int, struct shrlock *, int, - cred_t *); + cred_t *, caller_context_t *); static int cachefs_getsecattr_connected(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr); static int cachefs_getsecattr_disconnected(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr); -static int cachefs_dump(struct vnode *, caddr_t, int, int); +static int cachefs_dump(struct vnode *, caddr_t, int, int, + caller_context_t *); static int cachefs_pageio(struct vnode *, page_t *, - u_offset_t, size_t, int, cred_t *); + u_offset_t, size_t, int, cred_t *, caller_context_t *); static int cachefs_writepage(struct vnode *vp, caddr_t base, int tcount, struct uio *uiop); -static int cachefs_pathconf(vnode_t *, int, ulong_t *, cred_t *); +static int cachefs_pathconf(vnode_t *, int, ulong_t *, cred_t *, + caller_context_t *); static int cachefs_read_backfs_nfsv4(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr, caller_context_t *ct); static int cachefs_write_backfs_nfsv4(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr, caller_context_t *ct); static int cachefs_getattr_backfs_nfsv4(vnode_t *vp, vattr_t *vap, - int flags, cred_t *cr); + int flags, cred_t *cr, caller_context_t *ct); static int cachefs_remove_backfs_nfsv4(vnode_t *dvp, char *nm, cred_t *cr, vnode_t *vp); static int cachefs_getpage_backfs_nfsv4(struct vnode *vp, offset_t off, @@ -305,7 +321,7 @@ cachefs_getvnodeops(void) } static int -cachefs_open(vnode_t **vpp, int flag, cred_t *cr) +cachefs_open(vnode_t **vpp, int flag, cred_t *cr, caller_context_t *ct) { int error = 0; cnode_t *cp = VTOC(*vpp); @@ -413,7 +429,7 @@ cachefs_open(vnode_t **vpp, int flag, cred_t *cr) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_open (nfsv4): cnode %p, " "backvp %p\n", cp, cp->c_backvp)); - error = VOP_OPEN(&cp->c_backvp, flag, cr); + error = VOP_OPEN(&cp->c_backvp, flag, cr, ct); if (CFS_TIMEOUT(fscp, error)) { mutex_exit(&cp->c_statelock); cachefs_cd_release(fscp); @@ -469,7 +485,8 @@ out: /* ARGSUSED */ static int -cachefs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr) +cachefs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr, + caller_context_t *ct) { int error = 0; cnode_t *cp = VTOC(vp); @@ -552,7 +569,7 @@ cachefs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr) ("cachefs_close (nfsv4): cnode %p, " "backvp %p\n", cp, cp->c_backvp)); error = VOP_CLOSE(cp->c_backvp, flag, count, - offset, cr); + offset, cr, ct); if (CFS_TIMEOUT(fscp, error)) { mutex_exit(&cp->c_statelock); cachefs_cd_release(fscp); @@ -627,7 +644,7 @@ cachefs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr) if (cp->c_backvp && (fscp->fs_cdconnected == CFS_CD_CONNECTED)) { error = VOP_CLOSE(cp->c_backvp, flag, close_cnt, - offset, cr); + offset, cr, ct); if (CFS_TIMEOUT(fscp, error)) { mutex_exit(&cp->c_statelock); cachefs_cd_release(fscp); @@ -1706,7 +1723,8 @@ out: /*ARGSUSED*/ static int -cachefs_dump(struct vnode *vp, caddr_t foo1, int foo2, int foo3) +cachefs_dump(struct vnode *vp, caddr_t foo1, int foo2, int foo3, + caller_context_t *ct) { return (ENOSYS); /* should we panic if we get here? */ } @@ -1714,7 +1732,7 @@ cachefs_dump(struct vnode *vp, caddr_t foo1, int foo2, int foo3) /*ARGSUSED*/ static int cachefs_ioctl(struct vnode *vp, int cmd, intptr_t arg, int flag, cred_t *cred, - int *rvalp) + int *rvalp, caller_context_t *ct) { int error; struct cnode *cp = VTOC(vp); @@ -1989,7 +2007,8 @@ cachefs_fileno_conflict(fscache_t *fscp, ino64_t old) /*ARGSUSED*/ static int -cachefs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) +cachefs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, + caller_context_t *ct) { struct cnode *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -2007,7 +2026,7 @@ cachefs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) /* Call backfilesystem getattr if NFSv4 */ if (CFS_ISFS_BACKFS_NFSV4(fscp)) { - error = cachefs_getattr_backfs_nfsv4(vp, vap, flags, cr); + error = cachefs_getattr_backfs_nfsv4(vp, vap, flags, cr, ct); goto out; } @@ -2175,7 +2194,7 @@ out: */ static int cachefs_getattr_backfs_nfsv4(vnode_t *vp, vattr_t *vap, - int flags, cred_t *cr) + int flags, cred_t *cr, caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -2198,7 +2217,7 @@ cachefs_getattr_backfs_nfsv4(vnode_t *vp, vattr_t *vap, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_getattr_backfs_nfsv4: cnode %p," " backvp %p\n", cp, backvp)); - error = VOP_GETATTR(backvp, vap, flags, cr); + error = VOP_GETATTR(backvp, vap, flags, cr, ct); /* Update attributes */ cp->c_attr = *vap; @@ -2252,7 +2271,7 @@ cachefs_setattr( held = 0; } - /* aquire access to the file system */ + /* acquire access to the file system */ error = cachefs_cd_access(fscp, connected, 1); if (error) break; @@ -2461,7 +2480,7 @@ cachefs_setattr_connected( /* XXX bob: given what modify_cobject does this seems unnecessary */ cp->c_attr.va_mask = AT_ALL; - error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr); + error = VOP_GETATTR(cp->c_backvp, &cp->c_attr, 0, cr, ct); if (error) goto out; @@ -2719,7 +2738,8 @@ out: /* ARGSUSED */ static int -cachefs_access(vnode_t *vp, int mode, int flags, cred_t *cr) +cachefs_access(vnode_t *vp, int mode, int flags, cred_t *cr, + caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -2842,7 +2862,7 @@ cachefs_access_connected(struct vnode *vp, int mode, int flags, cred_t *cr) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_access (nfsv4): cnode %p, backvp %p\n", cp, cp->c_backvp)); - error = VOP_ACCESS(cp->c_backvp, mode, flags, cr); + error = VOP_ACCESS(cp->c_backvp, mode, flags, cr, NULL); /* * even though we don't `need' the ACL to do access @@ -2873,8 +2893,9 @@ out: * CFS has a fastsymlink scheme. If the size of the link is < C_FSL_SIZE, then * the link is placed in the metadata itself (no front file is allocated). */ +/*ARGSUSED*/ static int -cachefs_readlink(vnode_t *vp, uio_t *uiop, cred_t *cr) +cachefs_readlink(vnode_t *vp, uio_t *uiop, cred_t *cr, caller_context_t *ct) { int error = 0; cnode_t *cp = VTOC(vp); @@ -3125,7 +3146,7 @@ out: /*ARGSUSED*/ static int -cachefs_fsync(vnode_t *vp, int syncflag, cred_t *cr) +cachefs_fsync(vnode_t *vp, int syncflag, cred_t *cr, caller_context_t *ct) { cnode_t *cp = VTOC(vp); int error = 0; @@ -3215,7 +3236,8 @@ cachefs_fsync(vnode_t *vp, int syncflag, cred_t *cr) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_fsync (nfsv4): cnode %p, " "backvp %p\n", cp, cp->c_backvp)); - error = VOP_FSYNC(cp->c_backvp, syncflag, cr); + error = VOP_FSYNC(cp->c_backvp, syncflag, cr, + ct); if (CFS_TIMEOUT(fscp, error)) { mutex_exit(&cp->c_statelock); cachefs_cd_release(fscp); @@ -3304,13 +3326,13 @@ cachefs_sync_metadata(cnode_t *cp) if (cp->c_flags & CN_NEED_FRONT_SYNC) { if (cp->c_frontvp != NULL) { - error = VOP_FSYNC(cp->c_frontvp, FSYNC, kcred); + error = VOP_FSYNC(cp->c_frontvp, FSYNC, kcred, NULL); if (error) { cp->c_metadata.md_timestamp.tv_sec = 0; } else { va.va_mask = AT_MTIME; error = VOP_GETATTR(cp->c_frontvp, &va, 0, - kcred); + kcred, NULL); if (error) goto out; cp->c_metadata.md_timestamp = va.va_mtime; @@ -3376,8 +3398,9 @@ out: * calls cachefs_inactive. * Because of the dnlc, it is not safe to grab most locks here. */ +/*ARGSUSED*/ static void -cachefs_inactive(struct vnode *vp, cred_t *cr) +cachefs_inactive(struct vnode *vp, cred_t *cr, caller_context_t *ct) { cnode_t *cp; struct cachefs_req *rp; @@ -3425,7 +3448,9 @@ cachefs_inactive(struct vnode *vp, cred_t *cr) /* ARGSUSED */ static int cachefs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, - struct pathname *pnp, int flags, vnode_t *rdir, cred_t *cr) + struct pathname *pnp, int flags, vnode_t *rdir, cred_t *cr, + caller_context_t *ct, int *direntflags, pathname_t *realpnp) + { int error = 0; cnode_t *dcp = VTOC(dvp); @@ -3740,13 +3765,13 @@ cachefs_lookup_back(vnode_t *dvp, char *nm, vnode_t **vpp, ("cachefs_lookup (nfsv4): dcp %p, dbackvp %p, name %s\n", dcp, dcp->c_backvp, nm)); error = VOP_LOOKUP(dcp->c_backvp, nm, &backvp, (struct pathname *)NULL, - 0, (vnode_t *)NULL, cr); + 0, (vnode_t *)NULL, cr, NULL, NULL, NULL); if (error) goto out; if (IS_DEVVP(backvp)) { struct vnode *devvp = backvp; - if (VOP_REALVP(devvp, &backvp) == 0) { + if (VOP_REALVP(devvp, &backvp, NULL) == 0) { VN_HOLD(backvp); VN_RELE(devvp); } @@ -3793,7 +3818,9 @@ out: /*ARGSUSED7*/ static int cachefs_create(vnode_t *dvp, char *nm, vattr_t *vap, - vcexcl_t exclusive, int mode, vnode_t **vpp, cred_t *cr, int flag) + vcexcl_t exclusive, int mode, vnode_t **vpp, cred_t *cr, int flag, + caller_context_t *ct, vsecattr_t *vsecp) + { cnode_t *dcp = VTOC(dvp); fscache_t *fscp = C_TO_FSCACHE(dcp); @@ -3942,9 +3969,8 @@ cachefs_create_connected(vnode_t *dvp, char *nm, vattr_t *vap, cachefs_access_connected(vp, mode, 0, cr)) == 0) { if ((vap->va_mask & AT_SIZE) && (vp->v_type == VREG)) { vap->va_mask = AT_SIZE; - error = - cachefs_setattr_common(vp, vap, - 0, cr, NULL); + error = cachefs_setattr_common(vp, vap, 0, + cr, NULL); } } if (error) { @@ -3978,11 +4004,11 @@ cachefs_create_connected(vnode_t *dvp, char *nm, vattr_t *vap, ("cachefs_create (nfsv4): dcp %p, dbackvp %p," "name %s\n", dcp, dcp->c_backvp, nm)); error = VOP_CREATE(dcp->c_backvp, nm, vap, exclusive, mode, - &devvp, cr, 0); + &devvp, cr, 0, NULL, NULL); mutex_exit(&dcp->c_statelock); if (error) goto out; - if (VOP_REALVP(devvp, &tvp) == 0) { + if (VOP_REALVP(devvp, &tvp, NULL) == 0) { VN_HOLD(tvp); VN_RELE(devvp); } else { @@ -4096,9 +4122,8 @@ cachefs_create_disconnected(vnode_t *dvp, char *nm, vattr_t *vap, if ((vap->va_mask & AT_SIZE) && (vp->v_type == VREG)) { vap->va_mask = AT_SIZE; - error = - cachefs_setattr_common(vp, vap, - 0, cr, NULL); + error = cachefs_setattr_common(vp, + vap, 0, cr, NULL); } } } @@ -4264,8 +4289,10 @@ out: return (error); } +/*ARGSUSED*/ static int -cachefs_remove(vnode_t *dvp, char *nm, cred_t *cr) +cachefs_remove(vnode_t *dvp, char *nm, cred_t *cr, caller_context_t *ct, + int flags) { cnode_t *dcp = VTOC(dvp); fscache_t *fscp = C_TO_FSCACHE(dcp); @@ -4511,7 +4538,7 @@ cachefs_remove_connected(vnode_t *dvp, char *nm, cred_t *cr, vnode_t *vp) } /* perform the remove on the back fs */ - error = VOP_REMOVE(dcp->c_backvp, nm, cr); + error = VOP_REMOVE(dcp->c_backvp, nm, cr, NULL, 0); if (error) { mutex_exit(&dcp->c_statelock); goto out; @@ -4641,7 +4668,7 @@ cachefs_remove_backfs_nfsv4(vnode_t *dvp, char *nm, cred_t *cr, vnode_t *vp) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_remove (nfsv4): dcp %p, dbackvp %p, name %s\n", dcp, dbackvp, nm)); - error = VOP_REMOVE(dbackvp, nm, cr); + error = VOP_REMOVE(dbackvp, nm, cr, NULL, 0); if (error) { mutex_exit(&cp->c_statelock); goto out; @@ -4789,8 +4816,10 @@ out: return (error); } +/*ARGSUSED*/ static int -cachefs_link(vnode_t *tdvp, vnode_t *fvp, char *tnm, cred_t *cr) +cachefs_link(vnode_t *tdvp, vnode_t *fvp, char *tnm, cred_t *cr, + caller_context_t *ct, int flags) { fscache_t *fscp = VFS_TO_FSCACHE(tdvp->v_vfsp); cnode_t *tdcp = VTOC(tdvp); @@ -4813,7 +4842,7 @@ cachefs_link(vnode_t *tdvp, vnode_t *fvp, char *tnm, cred_t *cr) if (fscp->fs_cache->c_flags & (CACHE_NOFILL | CACHE_NOCACHE)) ASSERT(tdcp->c_flags & CN_NOCACHE); - if (VOP_REALVP(fvp, &realvp) == 0) { + if (VOP_REALVP(fvp, &realvp, ct) == 0) { fvp = realvp; } @@ -4939,7 +4968,7 @@ cachefs_link_connected(vnode_t *tdvp, vnode_t *fvp, char *tnm, cred_t *cr) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_link (nfsv4): tdcp %p, tdbackvp %p, " "name %s\n", tdcp, tdcp->c_backvp, tnm)); - error = VOP_LINK(tdcp->c_backvp, backvp, tnm, cr); + error = VOP_LINK(tdcp->c_backvp, backvp, tnm, cr, NULL, 0); if (error) { mutex_exit(&tdcp->c_statelock); goto out; @@ -4973,7 +5002,7 @@ cachefs_link_connected(vnode_t *tdvp, vnode_t *fvp, char *tnm, cred_t *cr) /* XXX bob: given what modify_cobject does this seems unnecessary */ fcp->c_attr.va_mask = AT_ALL; - error = VOP_GETATTR(fcp->c_backvp, &fcp->c_attr, 0, cr); + error = VOP_GETATTR(fcp->c_backvp, &fcp->c_attr, 0, cr, NULL); mutex_exit(&fcp->c_statelock); out: if (backvp) @@ -5108,9 +5137,10 @@ out: */ kmutex_t cachefs_rename_lock; +/*ARGSUSED*/ static int cachefs_rename(vnode_t *odvp, char *onm, vnode_t *ndvp, - char *nnm, cred_t *cr) + char *nnm, cred_t *cr, caller_context_t *ct, int flags) { fscache_t *fscp = C_TO_FSCACHE(VTOC(odvp)); cachefscache_t *cachep = fscp->fs_cache; @@ -5125,7 +5155,7 @@ cachefs_rename(vnode_t *odvp, char *onm, vnode_t *ndvp, if (getzoneid() != GLOBAL_ZONEID) return (EPERM); - if (VOP_REALVP(ndvp, &realvp) == 0) + if (VOP_REALVP(ndvp, &realvp, ct) == 0) ndvp = realvp; /* @@ -5286,7 +5316,7 @@ cachefs_rename(vnode_t *odvp, char *onm, vnode_t *ndvp, bzero(&gone, sizeof (gone)); gone.fid_len = MAXFIDSZ; if (delvp != NULL) - (void) VOP_FID(delvp, &gone); + (void) VOP_FID(delvp, &gone, ct); cachefs_log_rename(cachep, error, fscp->fs_cfsvfsp, &gone, 0, (delvp != NULL), crgetuid(cr)); @@ -5407,7 +5437,8 @@ cachefs_rename_connected(vnode_t *odvp, char *onm, vnode_t *ndvp, ("cachefs_rename (nfsv4): odcp %p, odbackvp %p, " " ndcp %p, ndbackvp %p, onm %s, nnm %s\n", odcp, odcp->c_backvp, ndcp, ndcp->c_backvp, onm, nnm)); - error = VOP_RENAME(odcp->c_backvp, onm, ndcp->c_backvp, nnm, cr); + error = VOP_RENAME(odcp->c_backvp, onm, ndcp->c_backvp, nnm, cr, NULL, + 0); if (error) goto out; @@ -5780,9 +5811,10 @@ out: return (error); } +/*ARGSUSED*/ static int cachefs_mkdir(vnode_t *dvp, char *nm, vattr_t *vap, vnode_t **vpp, - cred_t *cr) + cred_t *cr, caller_context_t *ct, int flags, vsecattr_t *vsecp) { cnode_t *dcp = VTOC(dvp); fscache_t *fscp = C_TO_FSCACHE(dcp); @@ -5926,7 +5958,7 @@ cachefs_mkdir_connected(vnode_t *dvp, char *nm, vattr_t *vap, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_mkdir (nfsv4): dcp %p, dbackvp %p, " "name %s\n", dcp, dcp->c_backvp, nm)); - error = VOP_MKDIR(dcp->c_backvp, nm, vap, &vp, cr); + error = VOP_MKDIR(dcp->c_backvp, nm, vap, &vp, cr, NULL, 0, NULL); mutex_exit(&dcp->c_statelock); if (error) { goto out; @@ -6150,8 +6182,10 @@ out: return (error); } +/*ARGSUSED*/ static int -cachefs_rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr) +cachefs_rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr, + caller_context_t *ct, int flags) { cnode_t *dcp = VTOC(dvp); fscache_t *fscp = C_TO_FSCACHE(dcp); @@ -6269,7 +6303,7 @@ cachefs_rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr) } /* must not be current dir */ - if (VOP_CMP(vp, cdir)) { + if (VOP_CMP(vp, cdir, ct)) { error = EINVAL; break; } @@ -6372,7 +6406,7 @@ cachefs_rmdir_connected(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_rmdir (nfsv4): dcp %p, dbackvp %p, " "name %s\n", dcp, dcp->c_backvp, nm)); - error = VOP_RMDIR(dcp->c_backvp, nm, cdir, cr); + error = VOP_RMDIR(dcp->c_backvp, nm, cdir, cr, NULL, 0); if (error) goto out; @@ -6507,9 +6541,10 @@ out: return (error); } +/*ARGSUSED*/ static int cachefs_symlink(vnode_t *dvp, char *lnm, vattr_t *tva, - char *tnm, cred_t *cr) + char *tnm, cred_t *cr, caller_context_t *ct, int flags) { cnode_t *dcp = VTOC(dvp); fscache_t *fscp = C_TO_FSCACHE(dcp); @@ -6635,7 +6670,7 @@ cachefs_symlink_connected(vnode_t *dvp, char *lnm, vattr_t *tva, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_symlink (nfsv4): dcp %p, dbackvp %p, " "lnm %s, tnm %s\n", dcp, dcp->c_backvp, lnm, tnm)); - error = VOP_SYMLINK(dcp->c_backvp, lnm, tva, tnm, cr); + error = VOP_SYMLINK(dcp->c_backvp, lnm, tva, tnm, cr, NULL, 0); if (error) { mutex_exit(&dcp->c_statelock); goto out; @@ -6650,7 +6685,8 @@ cachefs_symlink_connected(vnode_t *dvp, char *lnm, vattr_t *tva, CFSOP_MODIFY_COBJECT(fscp, dcp, cr); /* lookup the symlink we just created and get its fid and attrs */ - (void) VOP_LOOKUP(dcp->c_backvp, lnm, &backvp, NULL, 0, NULL, cr); + (void) VOP_LOOKUP(dcp->c_backvp, lnm, &backvp, NULL, 0, NULL, cr, + NULL, NULL, NULL); if (backvp == NULL) { if (CFS_ISFS_BACKFS_NFSV4(fscp) == 0) cachefs_nocache(dcp); @@ -6891,8 +6927,10 @@ out: return (error); } +/*ARGSUSED*/ static int -cachefs_readdir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp) +cachefs_readdir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp, + caller_context_t *ct, int flags) { cnode_t *dcp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(dcp); @@ -7087,7 +7125,8 @@ cachefs_readdir_connected(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_readdir (nfsv4): " "dcp %p, dbackvp %p\n", dcp, dcp->c_backvp)); - error = VOP_READDIR(dcp->c_backvp, uiop, cr, eofp); + error = VOP_READDIR(dcp->c_backvp, uiop, cr, eofp, + NULL, 0); VOP_RWUNLOCK(dcp->c_backvp, V_WRITELOCK_FALSE, NULL); } @@ -7132,7 +7171,7 @@ cachefs_readback_translate(cnode_t *cp, uio_t *uiop, cred_t *cr, int *eofp) uioin.uio_resid = buffysize; (void) VOP_RWLOCK(cp->c_backvp, V_WRITELOCK_FALSE, NULL); - error = VOP_READDIR(cp->c_backvp, &uioin, cr, eofp); + error = VOP_READDIR(cp->c_backvp, &uioin, cr, eofp, NULL, 0); VOP_RWUNLOCK(cp->c_backvp, V_WRITELOCK_FALSE, NULL); if (error != 0) @@ -7186,8 +7225,9 @@ cachefs_readdir_disconnected(vnode_t *vp, uio_t *uiop, cred_t *cr, return (error); } +/*ARGSUSED*/ static int -cachefs_fid(struct vnode *vp, struct fid *fidp) +cachefs_fid(struct vnode *vp, struct fid *fidp, caller_context_t *ct) { int error = 0; struct cnode *cp = VTOC(vp); @@ -7257,7 +7297,8 @@ cachefs_rwunlock(struct vnode *vp, int write_lock, caller_context_t *ctp) /* ARGSUSED */ static int -cachefs_seek(struct vnode *vp, offset_t ooff, offset_t *noffp) +cachefs_seek(struct vnode *vp, offset_t ooff, offset_t *noffp, + caller_context_t *ct) { return (0); } @@ -7266,10 +7307,11 @@ static int cachefs_lostpage = 0; /* * Return all the pages from [off..off+len] in file */ +/*ARGSUSED*/ static int cachefs_getpage(struct vnode *vp, offset_t off, size_t len, uint_t *protp, struct page *pl[], size_t plsz, struct seg *seg, - caddr_t addr, enum seg_rw rw, cred_t *cr) + caddr_t addr, enum seg_rw rw, cred_t *cr, caller_context_t *ct) { cnode_t *cp = VTOC(vp); int error; @@ -7441,7 +7483,7 @@ cachefs_getpage_backfs_nfsv4(struct vnode *vp, offset_t off, size_t len, ("cachefs_getpage_backfs_nfsv4: cnode %p, backvp %p\n", cp, backvp)); error = VOP_GETPAGE(backvp, off, len, protp, pl, plsz, seg, - addr, rw, cr); + addr, rw, cr, NULL); return (error); } @@ -7507,7 +7549,7 @@ again: } error = VOP_GETPAGE(cp->c_backvp, off, PAGESIZE, protp, ourpl, PAGESIZE, seg, - addr, S_READ, cr); + addr, S_READ, cr, NULL); /* * backfs returns EFAULT when we are trying for a * page beyond EOF but cachefs has the knowledge that @@ -7588,13 +7630,14 @@ again: /* else XXX assert CN_NOCACHE? */ error = VOP_GETPAGE(cp->c_backvp, (offset_t)off, PAGESIZE, protp, ourpl, popsize, - seg, addr, S_READ, cr); + seg, addr, S_READ, cr, NULL); if (error) goto out; fscp->fs_stats.st_misses++; } else { if (cp->c_flags & CN_POPULATION_PENDING) { - error = VOP_FSYNC(cp->c_frontvp, FSYNC, cr); + error = VOP_FSYNC(cp->c_frontvp, FSYNC, cr, + NULL); cp->c_flags &= ~CN_POPULATION_PENDING; if (error) { cachefs_nocache(cp); @@ -7608,7 +7651,7 @@ again: */ error = VOP_GETPAGE(cp->c_frontvp, (offset_t)off, PAGESIZE, protp, ourpl, PAGESIZE, seg, addr, - rw, cr); + rw, cr, NULL); if (CACHEFS_LOG_LOGGING(cachep, CACHEFS_LOG_GPFRONT)) cachefs_log_gpfront(cachep, error, fscp->fs_cfsvfsp, @@ -7718,7 +7761,7 @@ again: } error = VOP_GETPAGE(cp->c_backvp, (offset_t)off, PAGESIZE, protp, ourpl, PAGESIZE, seg, - addr, S_READ, cr); + addr, S_READ, cr, NULL); if (error) goto out; @@ -7776,8 +7819,10 @@ out: return (error); } +/*ARGSUSED*/ static int -cachefs_putpage(vnode_t *vp, offset_t off, size_t len, int flags, cred_t *cr) +cachefs_putpage(vnode_t *vp, offset_t off, size_t len, int flags, cred_t *cr, + caller_context_t *ct) { cnode_t *cp = VTOC(vp); int error = 0; @@ -7874,7 +7919,7 @@ cachefs_putpage_backfs_nfsv4(vnode_t *vp, offset_t off, size_t len, int flags, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_putpage_backfs_nfsv4: cnode %p, backvp %p\n", cp, backvp)); - error = VOP_PUTPAGE(backvp, off, len, flags, cr); + error = VOP_PUTPAGE(backvp, off, len, flags, cr, NULL); return (error); } @@ -8046,7 +8091,8 @@ again: /*ARGSUSED*/ static int cachefs_map(struct vnode *vp, offset_t off, struct as *as, caddr_t *addrp, - size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, cred_t *cr) + size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, cred_t *cr, + caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -8224,7 +8270,8 @@ cachefs_map_backfs_nfsv4(struct vnode *vp, offset_t off, struct as *as, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_map_backfs_nfsv4: cnode %p, backvp %p\n", cp, backvp)); - error = VOP_MAP(backvp, off, as, addrp, len, prot, maxprot, flags, cr); + error = VOP_MAP(backvp, off, as, addrp, len, prot, maxprot, flags, cr, + NULL); return (error); } @@ -8233,7 +8280,7 @@ cachefs_map_backfs_nfsv4(struct vnode *vp, offset_t off, struct as *as, static int cachefs_addmap(struct vnode *vp, offset_t off, struct as *as, caddr_t addr, size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, - cred_t *cr) + cred_t *cr, caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -8261,7 +8308,7 @@ cachefs_addmap(struct vnode *vp, offset_t off, struct as *as, static int cachefs_delmap(struct vnode *vp, offset_t off, struct as *as, caddr_t addr, size_t len, uint_t prot, uint_t maxprot, uint_t flags, - cred_t *cr) + cred_t *cr, caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -8346,7 +8393,8 @@ cachefs_delmap(struct vnode *vp, offset_t off, struct as *as, /* ARGSUSED */ static int cachefs_frlock(struct vnode *vp, int cmd, struct flock64 *bfp, int flag, - offset_t offset, struct flk_callback *flk_cbp, cred_t *cr) + offset_t offset, struct flk_callback *flk_cbp, cred_t *cr, + caller_context_t *ct) { struct cnode *cp = VTOC(vp); int error; @@ -8382,7 +8430,7 @@ cachefs_frlock(struct vnode *vp, int cmd, struct flock64 *bfp, int flag, /* XXX bob: nfs does a bunch more checks than we do */ if (CFS_ISFS_LLOCK(fscp)) { ASSERT(CFS_ISFS_BACKFS_NFSV4(fscp) == 0); - return (fs_frlock(vp, cmd, bfp, flag, offset, flk_cbp, cr)); + return (fs_frlock(vp, cmd, bfp, flag, offset, flk_cbp, cr, ct)); } for (;;) { @@ -8441,7 +8489,7 @@ cachefs_frlock(struct vnode *vp, int cmd, struct flock64 *bfp, int flag, if (bfp->l_type != F_UNLCK && cmd != F_GETLK && !CFS_ISFS_BACKFS_NFSV4(fscp)) { error = cachefs_putpage( - vp, (offset_t)0, 0, B_INVAL, cr); + vp, (offset_t)0, 0, B_INVAL, cr, ct); if (error) { error = ENOLCK; VN_RELE(backvp); @@ -8453,7 +8501,8 @@ cachefs_frlock(struct vnode *vp, int cmd, struct flock64 *bfp, int flag, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_frlock (nfsv4): cp %p, backvp %p\n", cp, backvp)); - error = VOP_FRLOCK(backvp, cmd, bfp, flag, offset, NULL, cr); + error = VOP_FRLOCK(backvp, cmd, bfp, flag, offset, NULL, cr, + ct); VN_RELE(backvp); if (CFS_TIMEOUT(fscp, error)) { connected = 1; @@ -8571,7 +8620,7 @@ cachefs_space_backfs_nfsv4(struct vnode *vp, int cmd, struct flock64 *bfp, /*ARGSUSED*/ static int -cachefs_realvp(struct vnode *vp, struct vnode **vpp) +cachefs_realvp(struct vnode *vp, struct vnode **vpp, caller_context_t *ct) { return (EINVAL); } @@ -8579,7 +8628,7 @@ cachefs_realvp(struct vnode *vp, struct vnode **vpp) /*ARGSUSED*/ static int cachefs_pageio(struct vnode *vp, page_t *pp, u_offset_t io_off, size_t io_len, - int flags, cred_t *cr) + int flags, cred_t *cr, caller_context_t *ct) { return (ENOSYS); } @@ -8618,7 +8667,7 @@ cachefs_setsecattr_connected(cnode_t *cp, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_setsecattr (nfsv4): cp %p, backvp %p", cp, cp->c_backvp)); - error = VOP_SETSECATTR(cp->c_backvp, vsec, flag, cr); + error = VOP_SETSECATTR(cp->c_backvp, vsec, flag, cr, NULL); if (error) { goto out; } @@ -8742,8 +8791,10 @@ out: return (error); } +/*ARGSUSED*/ static int -cachefs_setsecattr(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr) +cachefs_setsecattr(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr, + caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -8791,7 +8842,7 @@ cachefs_setsecattr(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr) held = 0; } - /* aquire access to the file system */ + /* acquire access to the file system */ error = cachefs_cd_access(fscp, connected, 1); if (error) break; @@ -8883,7 +8934,8 @@ cachefs_acl2perm(cnode_t *cp, vsecattr_t *vsec) } static int -cachefs_getsecattr(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr) +cachefs_getsecattr(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr, + caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -8913,7 +8965,7 @@ cachefs_getsecattr(vnode_t *vp, vsecattr_t *vsec, int flag, cred_t *cr) CFS_BACKFS_NFSV4_ASSERT_CNODE(cp); if (fscp->fs_info.fi_mntflags & CFS_NOACL) { - error = fs_fab_acl(vp, vsec, flag, cr); + error = fs_fab_acl(vp, vsec, flag, cr, ct); goto out; } @@ -8974,7 +9026,8 @@ out: } static int -cachefs_shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag, cred_t *cr) +cachefs_shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag, cred_t *cr, + caller_context_t *ct) { cnode_t *cp = VTOC(vp); fscache_t *fscp = C_TO_FSCACHE(cp); @@ -9014,7 +9067,7 @@ cachefs_shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag, cred_t *cr) CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_shrlock (nfsv4): cp %p, backvp %p", cp, backvp)); - error = VOP_SHRLOCK(backvp, cmd, shr, flag, cr); + error = VOP_SHRLOCK(backvp, cmd, shr, flag, cr, ct); } out: @@ -9065,7 +9118,7 @@ cachefs_getsecattr_connected(vnode_t *vp, vsecattr_t *vsec, int flag, CFS_DPRINT_BACKFS_NFSV4(fscp, ("cachefs_getsecattr (nfsv4): cp %p, backvp %p", cp, cp->c_backvp)); - error = VOP_GETSECATTR(cp->c_backvp, vsec, flag, cr); + error = VOP_GETSECATTR(cp->c_backvp, vsec, flag, cr, NULL); if (error) goto out; @@ -9178,7 +9231,7 @@ cachefs_cacheacl(cnode_t *cp, vsecattr_t *vsecp) bzero(&vsec, sizeof (vsec)); vsecp->vsa_mask = VSA_ACL | VSA_ACLCNT | VSA_DFACL | VSA_DFACLCNT; - error = VOP_GETSECATTR(cp->c_backvp, vsecp, 0, kcred); + error = VOP_GETSECATTR(cp->c_backvp, vsecp, 0, kcred, NULL); if (error != 0) { goto out; } @@ -9256,7 +9309,7 @@ cachefs_cacheacl(cnode_t *cp, vsecattr_t *vsecp) ASSERT(vp != NULL); (void) VOP_RWLOCK(vp, V_WRITELOCK_TRUE, NULL); - error = VOP_SETSECATTR(vp, vsecp, 0, kcred); + error = VOP_SETSECATTR(vp, vsecp, 0, kcred, NULL); VOP_RWUNLOCK(vp, V_WRITELOCK_TRUE, NULL); if (error != 0) { #ifdef CFSDEBUG @@ -9320,7 +9373,7 @@ cachefs_purgeacl(cnode_t *cp) (void) strcat(name, ".d"); (void) VOP_RMDIR(cp->c_filegrp->fg_dirvp, name, - cp->c_filegrp->fg_dirvp, kcred); + cp->c_filegrp->fg_dirvp, kcred, NULL, 0); } cp->c_metadata.md_flags &= ~(MD_ACL | MD_ACLDIR); @@ -9345,7 +9398,7 @@ cachefs_getacldirvp(cnode_t *cp) make_ascii_name(&cp->c_id, name); (void) strcat(name, ".d"); error = VOP_LOOKUP(cp->c_filegrp->fg_dirvp, - name, &cp->c_acldirvp, NULL, 0, NULL, kcred); + name, &cp->c_acldirvp, NULL, 0, NULL, kcred, NULL, NULL, NULL); if ((error != 0) && (error != ENOENT)) goto out; @@ -9360,7 +9413,7 @@ cachefs_getacldirvp(cnode_t *cp) AT_UID | AT_GID; error = VOP_MKDIR(cp->c_filegrp->fg_dirvp, - name, &va, &cp->c_acldirvp, kcred); + name, &va, &cp->c_acldirvp, kcred, NULL, 0, NULL); if (error != 0) goto out; } @@ -9432,7 +9485,7 @@ cachefs_getaclfromcache(cnode_t *cp, vsecattr_t *vsec) } if (vp != NULL) { - if ((error = VOP_GETSECATTR(vp, vsec, 0, kcred)) != 0) { + if ((error = VOP_GETSECATTR(vp, vsec, 0, kcred, NULL)) != 0) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_VOPS) printf("cachefs_getaclfromcache: error %d\n", @@ -9858,7 +9911,8 @@ again: error = ETIMEDOUT; } if (error == 0) - error = VOP_GETSECATTR(cp->c_backvp, &vsec, 0, cr); + error = VOP_GETSECATTR(cp->c_backvp, &vsec, 0, cr, + NULL); if (error != 0) { #ifdef CFSDEBUG CFS_DEBUG(CFSDEBUG_VOPS) @@ -10104,8 +10158,8 @@ cachefs_modified(cnode_t *cp) /* identify file so fsck knows it is modified */ va.va_mode = 0766; va.va_mask = AT_MODE; - error = VOP_SETATTR(cp->c_frontvp, &va, - 0, kcred, NULL); + error = VOP_SETATTR(cp->c_frontvp, + &va, 0, kcred, NULL); if (error) { cmn_err(CE_WARN, "Cannot change ff mode.\n"); @@ -10184,7 +10238,8 @@ cachefs_vtype_aclok(vnode_t *vp) } static int -cachefs_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr) +cachefs_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, + caller_context_t *ct) { int error = 0; fscache_t *fscp = C_TO_FSCACHE(VTOC(vp)); @@ -10202,7 +10257,7 @@ cachefs_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr) } (*valp)++; } else - error = fs_pathconf(vp, cmd, valp, cr); + error = fs_pathconf(vp, cmd, valp, cr, ct); return (error); } |