summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/cachefs/cachefs_filegrp.c
diff options
context:
space:
mode:
authoramw <none@none>2007-10-25 16:34:29 -0700
committeramw <none@none>2007-10-25 16:34:29 -0700
commitda6c28aaf62fa55f0fdb8004aa40f88f23bf53f0 (patch)
tree65be91fb78a6a66183197595333f2e8aafb4640a /usr/src/uts/common/fs/cachefs/cachefs_filegrp.c
parente845e33dd0d1aea22db7edaa8c7d43955d24609b (diff)
downloadillumos-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/cachefs_filegrp.c')
-rw-r--r--usr/src/uts/common/fs/cachefs/cachefs_filegrp.c57
1 files changed, 30 insertions, 27 deletions
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");