summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrankho <none@none>2007-07-16 06:31:58 -0700
committerfrankho <none@none>2007-07-16 06:31:58 -0700
commit80d3443290aca22ad7fb6c18568d19d37517ebbf (patch)
treea4d94081cd5a63877f2b1542b048fc84b9e7b7b1
parentb5134f312c2b7282d48e5c29146a2ec3674d02f2 (diff)
downloadillumos-gate-80d3443290aca22ad7fb6c18568d19d37517ebbf.tar.gz
6561724 UFS cstyle cleanup, and TRACE_*() macro call removals
-rw-r--r--usr/src/uts/common/fs/ufs/lufs.c21
-rw-r--r--usr/src/uts/common/fs/ufs/lufs_debug.c11
-rw-r--r--usr/src/uts/common/fs/ufs/lufs_log.c23
-rw-r--r--usr/src/uts/common/fs/ufs/lufs_map.c85
-rw-r--r--usr/src/uts/common/fs/ufs/lufs_thread.c9
-rw-r--r--usr/src/uts/common/fs/ufs/lufs_top.c25
-rw-r--r--usr/src/uts/common/fs/ufs/quota.c2
-rw-r--r--usr/src/uts/common/fs/ufs/quota_ufs.c45
-rw-r--r--usr/src/uts/common/fs/ufs/quotacalls.c19
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_acl.c45
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_alloc.c42
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_bmap.c40
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_dir.c38
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_directio.c36
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_filio.c35
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_inode.c69
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_lockfs.c17
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_panic.c133
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_subr.c57
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_thread.c40
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_trans.c17
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_vfsops.c68
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_vnops.c357
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_xattr.c15
24 files changed, 529 insertions, 720 deletions
diff --git a/usr/src/uts/common/fs/ufs/lufs.c b/usr/src/uts/common/fs/ufs/lufs.c
index 05f34caa29..c64db5c13d 100644
--- a/usr/src/uts/common/fs/ufs/lufs.c
+++ b/usr/src/uts/common/fs/ufs/lufs.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.
*/
@@ -285,7 +284,7 @@ lufs_snarf(ufsvfs_t *ufsvfsp, struct fs *fs, int ronly)
}
ebp = (void *)bp->b_un.b_addr;
if (!checksum(&ebp->chksum, (int32_t *)bp->b_un.b_addr,
- fs->fs_bsize)) {
+ fs->fs_bsize)) {
brelse(bp);
return (ENODEV);
}
@@ -307,7 +306,7 @@ lufs_snarf(ufsvfs_t *ufsvfsp, struct fs *fs, int ronly)
* can require more than a 32-bit field.
*/
nb = (size_t)(sizeof (ic_extent_block_t) +
- ((ebp->nextents - 1) * sizeof (ic_extent_t)));
+ ((ebp->nextents - 1) * sizeof (ic_extent_t)));
nebp = kmem_alloc(nb, KM_SLEEP);
nebp->ic_nextents = ebp->nextents;
nebp->ic_nbytes = ebp->nbytes;
@@ -1076,7 +1075,7 @@ recheck:
fs->fs_reclaim &= ~FS_RECLAIM;
fs->fs_reclaim |= FS_RECLAIMING;
ufs_thread_start(&ufsvfsp->vfs_reclaim,
- ufs_thread_reclaim, vfsp);
+ ufs_thread_reclaim, vfsp);
} else
fs->fs_reclaim |= reclaim;
@@ -1225,8 +1224,8 @@ lufs_write_strategy(ml_unit_t *ul, buf_t *bp)
va = bp_mapin_common(bp, VM_SLEEP);
ASSERT(((ul->un_debug & MT_WRITE_CHECK) == 0) ||
- (ul->un_matamap == NULL)||
- matamap_within(ul->un_matamap, mof, nb));
+ (ul->un_matamap == NULL)||
+ matamap_within(ul->un_matamap, mof, nb));
/*
* move to logmap
@@ -1256,8 +1255,8 @@ lufs_write_strategy(ml_unit_t *ul, buf_t *bp)
* Check that we are not updating metadata, or if so then via B_PHYS.
*/
ASSERT((ul->un_matamap == NULL) ||
- !(matamap_overlap(ul->un_matamap, mof, nb) &&
- ((bp->b_flags & B_PHYS) == 0)));
+ !(matamap_overlap(ul->un_matamap, mof, nb) &&
+ ((bp->b_flags & B_PHYS) == 0)));
ul->un_ufsvfs->vfs_iotstamp = lbolt;
logstats.ls_lwrites.value.ui64++;
diff --git a/usr/src/uts/common/fs/ufs/lufs_debug.c b/usr/src/uts/common/fs/ufs/lufs_debug.c
index 9c5124195f..07c2bf8a50 100644
--- a/usr/src/uts/common/fs/ufs/lufs_debug.c
+++ b/usr/src/uts/common/fs/ufs/lufs_debug.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.
@@ -22,7 +21,7 @@
#pragma ident "%Z%%M% %I% %E% SMI"
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -135,7 +134,7 @@ top_begin_debug(ml_unit_t *ul, top_t topid, ulong_t size)
if (ul->un_debug & MT_TRACE)
top_trace(DT_BOT, ul->un_dev,
- (long long)topid, (long)size, (long)0);
+ (long long)topid, (long)size, (long)0);
ASSERT(curthread->t_flag & T_DONTBLOCK);
@@ -201,7 +200,7 @@ top_delta_debug(
* check for delta contained fully within matamap
*/
ASSERT((ul->un_matamap == NULL) ||
- matamap_within(ul->un_matamap, mof, nb));
+ matamap_within(ul->un_matamap, mof, nb));
/*
* maintain transaction info
diff --git a/usr/src/uts/common/fs/ufs/lufs_log.c b/usr/src/uts/common/fs/ufs/lufs_log.c
index 6bc6d50240..ae893beb12 100644
--- a/usr/src/uts/common/fs/ufs/lufs_log.c
+++ b/usr/src/uts/common/fs/ufs/lufs_log.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.
*/
@@ -224,12 +223,12 @@ ldl_strategy(ml_unit_t *ul, buf_t *pb)
* the un_log mutex resulting in a deadlock.
*/
if (ufsvfsp->vfs_snapshot) {
- (void) tsd_set(bypass_snapshot_throttle_key, \
- (void *)1);
+ (void) tsd_set(bypass_snapshot_throttle_key,
+ (void *)1);
fssnap_strategy(&ufsvfsp->vfs_snapshot, cb);
- (void) tsd_set(bypass_snapshot_throttle_key, \
- (void *)0);
+ (void) tsd_set(bypass_snapshot_throttle_key,
+ (void *)0);
} else {
(void) bdev_strategy(cb);
}
@@ -929,7 +928,7 @@ ldl_round_commit(ml_unit_t *ul)
*/
/* LINTED */
st = (sect_trailer_t *)
- ((bp->b_un.b_addr + bcount) - sizeof (*st));
+ ((bp->b_un.b_addr + bcount) - sizeof (*st));
st->st_tid = ul->un_logmap->mtm_tid;
st->st_ident = ul->un_tail_ident++;
@@ -987,7 +986,7 @@ ldl_has_space(ml_unit_t *ul, mapentry_t *me)
if (ul->un_head_lof <= ul->un_tail_lof)
nfb = (ul->un_head_lof - ul->un_bol_lof) +
- (ul->un_eol_lof - ul->un_tail_lof);
+ (ul->un_eol_lof - ul->un_tail_lof);
else
nfb = ul->un_head_lof - ul->un_tail_lof;
@@ -1181,7 +1180,7 @@ ldl_read(
return (EIO);
}
ASSERT(((me->me_flags & ME_ROLL) == 0) ||
- (bp != ul->un_wrbuf.cb_dirty));
+ (bp != ul->un_wrbuf.cb_dirty));
actual = fetchbuf(ul, bp, rva, rnb, &lof);
ASSERT(actual);
rva += actual;
@@ -1322,7 +1321,7 @@ ldl_sethead(ml_unit_t *ul, off_t data_lof, uint32_t tid)
ldl_savestate(ul);
ASSERT(((ul->un_logmap->mtm_debug & MT_SCAN) == 0) ||
- ldl_sethead_debug(ul));
+ ldl_sethead_debug(ul));
}
/*
diff --git a/usr/src/uts/common/fs/ufs/lufs_map.c b/usr/src/uts/common/fs/ufs/lufs_map.c
index a415b9a477..483e5f9f9e 100644
--- a/usr/src/uts/common/fs/ufs/lufs_map.c
+++ b/usr/src/uts/common/fs/ufs/lufs_map.c
@@ -21,7 +21,7 @@
#pragma ident "%Z%%M% %I% %E% SMI"
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -137,7 +137,7 @@ map_put(mt_map_t *mtm)
map_free_entries(mtm);
ASSERT(map_put_debug(mtm));
kmem_free(mtm->mtm_hash,
- (size_t) (sizeof (mapentry_t *) * mtm->mtm_nhash));
+ (size_t) (sizeof (mapentry_t *) * mtm->mtm_nhash));
mutex_destroy(&mtm->mtm_mutex);
mutex_destroy(&mtm->mtm_scan_mutex);
cv_destroy(&mtm->mtm_to_roll_cv);
@@ -229,7 +229,7 @@ deltamap_add(
mapentry_t **mep;
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
mutex_enter(&mtm->mtm_mutex);
@@ -250,20 +250,20 @@ deltamap_add(
mep = MAP_HASH(mof, mtm);
for (me = *mep; me; me = me->me_hash) {
if (DATAwithinME(mof, hnb, me)) {
- if (me->me_func == ufs_trans_push_quota) {
/*
* Don't remove quota entries which have
* incremented the ref count (those with a
* ufs_trans_push_quota push function).
* Let logmap_add[_buf] clean them up.
*/
- continue;
- }
- break;
+ if (me->me_func == ufs_trans_push_quota) {
+ continue;
+ }
+ break;
}
ASSERT((dtyp == DT_CANCEL) ||
- (!DATAoverlapME(mof, hnb, me)) ||
- MEwithinDATA(me, mof, hnb));
+ (!DATAoverlapME(mof, hnb, me)) ||
+ MEwithinDATA(me, mof, hnb));
}
if (me) {
@@ -328,7 +328,7 @@ deltamap_add(
mutex_exit(&mtm->mtm_mutex);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
}
/*
@@ -346,7 +346,7 @@ deltamap_remove(mt_map_t *mtm, offset_t mof, off_t nb)
return (NULL);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
mutex_enter(&mtm->mtm_mutex);
for (mer = NULL, hnb = 0; nb; nb -= hnb, mof += hnb) {
@@ -374,7 +374,7 @@ deltamap_remove(mt_map_t *mtm, offset_t mof, off_t nb)
mutex_exit(&mtm->mtm_mutex);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
return (mer);
}
@@ -414,7 +414,7 @@ deltamap_push(ml_unit_t *ul)
mt_map_t *mtm = ul->un_deltamap;
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
/*
* for every entry in the deltamap
@@ -432,7 +432,7 @@ deltamap_push(ml_unit_t *ul)
}
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
}
/*
@@ -443,7 +443,7 @@ int
logmap_need_commit(mt_map_t *mtm)
{
return ((mtm->mtm_nmet > logmap_maxnme_commit) ||
- (mtm->mtm_cfrags >= mtm->mtm_cfragmax));
+ (mtm->mtm_cfrags >= mtm->mtm_cfragmax));
}
int
@@ -547,7 +547,7 @@ logmap_remove_roll(mt_map_t *mtm, offset_t mof, off_t nb)
off_t savnb = nb;
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
again:
if (dolock)
@@ -593,7 +593,7 @@ again:
mutex_exit(&mtm->mtm_mutex);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
if (dolock)
rw_exit(&mtm->mtm_rwlock);
@@ -611,7 +611,7 @@ logmap_next_roll(mt_map_t *logmap, offset_t *mofp)
mapentry_t *me;
ASSERT(((logmap->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(logmap));
+ map_check_linkage(logmap));
mutex_enter(&logmap->mtm_mutex);
for (me = logmap->mtm_next; me != (mapentry_t *)logmap;
@@ -691,7 +691,7 @@ logmap_list_get(
again:
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
rw_enter(&mtm->mtm_rwlock, rwtype);
*age = NULL;
@@ -763,7 +763,7 @@ logmap_list_get_roll(mt_map_t *logmap, offset_t mof, rollbuf_t *rbp)
ASSERT(RW_LOCK_HELD(&logmap->mtm_rwlock));
ASSERT(((logmap->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(logmap));
+ map_check_linkage(logmap));
ASSERT((mof & MAPBLOCKOFF) == 0);
rbp->rb_crb = NULL;
@@ -830,7 +830,7 @@ out:
mutex_exit(&logmap->mtm_mutex);
ASSERT(((logmap->mtm_debug & MT_SCAN) == 0) ||
- logmap_logscan_debug(logmap, age));
+ logmap_logscan_debug(logmap, age));
ASSERT(RW_LOCK_HELD(&logmap->mtm_rwlock));
return (0); /* success */
}
@@ -999,12 +999,11 @@ static void
logmap_abort(ml_unit_t *ul, uint32_t tid)
{
struct mt_map *mtm = ul->un_logmap; /* Log map */
- mapentry_t *me,
- **mep;
+ mapentry_t *me, **mep;
int i;
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
/*
* wait for any outstanding reads to finish; lock out future reads
@@ -1033,7 +1032,7 @@ logmap_abort(ml_unit_t *ul, uint32_t tid)
mep = &mtm->mtm_hash[i];
while ((me = *mep) != NULL) {
if (me->me_tid == tid ||
- me->me_tid == mtm->mtm_committid) {
+ me->me_tid == mtm->mtm_committid) {
*mep = me->me_hash;
me->me_next->me_prev = me->me_prev;
me->me_prev->me_next = me->me_next;
@@ -1056,7 +1055,7 @@ logmap_abort(ml_unit_t *ul, uint32_t tid)
rw_exit(&mtm->mtm_rwlock);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
}
static void
@@ -1100,7 +1099,7 @@ logmap_add(
logmap_wait_space(mtm, ul, melist);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
mtm->mtm_ref = 1;
mtm->mtm_dirty++;
@@ -1171,8 +1170,8 @@ logmap_add(
continue;
}
ASSERT((va == NULL) ||
- ((mtm->mtm_debug & MT_LOG_WRITE_CHECK) == 0) ||
- map_check_ldl_write(ul, va, vamof, me));
+ ((mtm->mtm_debug & MT_LOG_WRITE_CHECK) == 0) ||
+ map_check_ldl_write(ul, va, vamof, me));
/*
* put on hash
@@ -1193,7 +1192,7 @@ logmap_add(
}
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
mutex_exit(&ul->un_log_mutex);
}
@@ -1229,7 +1228,7 @@ logmap_add_buf(
logmap_wait_space(mtm, ul, melist);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
mtm->mtm_ref = 1;
mtm->mtm_dirty++;
@@ -1375,7 +1374,7 @@ logmap_add_buf(
continue;
}
ASSERT(((mtm->mtm_debug & MT_LOG_WRITE_CHECK) == 0) ||
- map_check_ldl_write(ul, va, vamof, me));
+ map_check_ldl_write(ul, va, vamof, me));
/*
* put on hash
@@ -1396,7 +1395,7 @@ logmap_add_buf(
}
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
mutex_exit(&ul->un_log_mutex);
}
@@ -1411,7 +1410,7 @@ logmap_free_cancel(mt_map_t *mtm, mapentry_t **cancelhead)
mapentry_t **mep;
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
again:
if (dolock)
@@ -1483,7 +1482,7 @@ again:
rw_exit(&mtm->mtm_rwlock);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
}
@@ -1597,7 +1596,7 @@ logmap_roll_dev(ml_unit_t *ul)
again:
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
if (ul->un_flags & (LDL_ERROR|LDL_NOROLL))
return;
@@ -1632,7 +1631,7 @@ again:
(void) ufs_putsummaryinfo(ul->un_dev, ufsvfsp, ufsvfsp->vfs_fs);
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
}
static void
@@ -1708,8 +1707,8 @@ logmap_cancel_delta(ml_unit_t *ul, offset_t mof, int32_t nb, int metadata)
if (!(metadata)) {
frags = blkoff(ul->un_ufsvfs->vfs_fs, nb);
if (frags)
- mtm->mtm_cfrags += numfrags(ul->un_ufsvfs->vfs_fs,
- frags);
+ mtm->mtm_cfrags +=
+ numfrags(ul->un_ufsvfs->vfs_fs, frags);
}
mutex_exit(&mtm->mtm_mutex);
@@ -1729,7 +1728,7 @@ logmap_cancel(ml_unit_t *ul, offset_t mof, off_t nb, int metadata)
crb_t *crb;
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
for (hnb = 0; nb; nb -= hnb, mof += hnb) {
hnb = MAPBLOCKSIZE - (mof & MAPBLOCKOFF);
@@ -1770,7 +1769,7 @@ logmap_cancel(ml_unit_t *ul, offset_t mof, off_t nb, int metadata)
}
ASSERT(((mtm->mtm_debug & MT_CHECK_MAP) == 0) ||
- map_check_linkage(mtm));
+ map_check_linkage(mtm));
}
/*
@@ -1857,7 +1856,7 @@ logmap_logscan_add(ml_unit_t *ul, struct delta *dp, off_t lof, size_t *nbp)
mtm->mtm_tid++;
mtm->mtm_committid = mtm->mtm_tid;
ASSERT(((mtm->mtm_debug & MT_SCAN) == 0) ||
- logmap_logscan_commit_debug(lof, mtm));
+ logmap_logscan_commit_debug(lof, mtm));
}
/*
* return #bytes to next sector (next delta header)
@@ -1889,7 +1888,7 @@ logmap_logscan_add(ml_unit_t *ul, struct delta *dp, off_t lof, size_t *nbp)
break;
default:
ASSERT(((mtm->mtm_debug & MT_SCAN) == 0) ||
- logmap_logscan_add_debug(dp, mtm));
+ logmap_logscan_add_debug(dp, mtm));
break;
}
diff --git a/usr/src/uts/common/fs/ufs/lufs_thread.c b/usr/src/uts/common/fs/ufs/lufs_thread.c
index 044d61082f..fba11199a6 100644
--- a/usr/src/uts/common/fs/ufs/lufs_thread.c
+++ b/usr/src/uts/common/fs/ufs/lufs_thread.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.
*/
@@ -94,7 +93,7 @@ trans_roll_wait(mt_map_t *logmap, callb_cpr_t *cprinfop)
logmap->mtm_flags &= ~(MTM_FORCE_ROLL | MTM_ROLLING);
CALLB_CPR_SAFE_BEGIN(cprinfop);
(void) cv_timedwait(&logmap->mtm_to_roll_cv, &logmap->mtm_mutex,
- lbolt + trans_roll_tics);
+ lbolt + trans_roll_tics);
CALLB_CPR_SAFE_END(cprinfop, &logmap->mtm_mutex);
logmap->mtm_flags |= MTM_ROLLING;
mutex_exit(&logmap->mtm_mutex);
diff --git a/usr/src/uts/common/fs/ufs/lufs_top.c b/usr/src/uts/common/fs/ufs/lufs_top.c
index daf2b318aa..e83df88f2e 100644
--- a/usr/src/uts/common/fs/ufs/lufs_top.c
+++ b/usr/src/uts/common/fs/ufs/lufs_top.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.
*/
@@ -66,7 +65,7 @@ top_delta(
ASSERT(ufsvfsp->vfs_dev == ul->un_dev);
ASSERT(nb);
ASSERT(((ul->un_debug & (MT_TRANSACT|MT_MATAMAP)) == 0) ||
- top_delta_debug(ul, mof, nb, dtyp));
+ top_delta_debug(ul, mof, nb, dtyp));
deltamap_add(ul->un_deltamap, mof, nb, dtyp, func, arg, tp);
@@ -88,8 +87,8 @@ top_cancel(ufsvfs_t *ufsvfsp, offset_t mof, off_t nb, int flags)
ASSERT(ufsvfsp->vfs_dev == ul->un_dev);
ASSERT(nb);
ASSERT(((ul->un_debug & (MT_TRANSACT|MT_MATAMAP)) == 0) ||
- (!(flags & metadata) ||
- top_delta_debug(ul, mof, nb, DT_CANCEL)));
+ (!(flags & metadata) ||
+ top_delta_debug(ul, mof, nb, DT_CANCEL)));
if (metadata)
deltamap_del(ul->un_deltamap, mof, nb);
@@ -336,7 +335,7 @@ retry:
mutex_exit(&mtm->mtm_lock);
ASSERT(((ul->un_debug & MT_TRANSACT) == 0) ||
- top_begin_debug(ul, topid, size));
+ top_begin_debug(ul, topid, size));
}
int tryfail_cnt;
@@ -435,7 +434,7 @@ retry:
mutex_exit(&mtm->mtm_lock);
ASSERT(((ul->un_debug & MT_TRANSACT) == 0) ||
- top_begin_debug(ul, topid, size));
+ top_begin_debug(ul, topid, size));
return (0);
}
@@ -450,7 +449,7 @@ top_end_sync(ufsvfs_t *ufsvfsp, int *ep, top_t topid, ulong_t size)
ASSERT(ufsvfsp->vfs_dev == ul->un_dev);
ASSERT(((ul->un_debug & MT_TRANSACT) == 0) ||
- top_end_debug(ul, mtm, topid, size));
+ top_end_debug(ul, mtm, topid, size));
mutex_enter(&mtm->mtm_lock);
tid = mtm->mtm_tid;
@@ -492,7 +491,7 @@ top_end_sync(ufsvfs_t *ufsvfsp, int *ep, top_t topid, ulong_t size)
deltamap_push(ul);
ASSERT(((ul->un_debug & MT_FORCEROLL) == 0) ||
- top_roll_debug(ul));
+ top_roll_debug(ul));
mtm->mtm_tid = tid + 1; /* can overflow to 0 */
@@ -584,7 +583,7 @@ top_end_async(ufsvfs_t *ufsvfsp, top_t topid, ulong_t size)
ASSERT(tp);
ASSERT(ufsvfsp->vfs_dev == ul->un_dev);
ASSERT(((ul->un_debug & MT_TRANSACT) == 0) ||
- top_end_debug(ul, mtm, topid, size));
+ top_end_debug(ul, mtm, topid, size));
mutex_enter(&mtm->mtm_lock);
@@ -731,7 +730,7 @@ top_log(ufsvfs_t *ufsvfsp, char *va, offset_t vamof, off_t nb,
}
ASSERT((ul->un_matamap == NULL) ||
- matamap_within(ul->un_matamap, vamof, nb));
+ matamap_within(ul->un_matamap, vamof, nb));
}
diff --git a/usr/src/uts/common/fs/ufs/quota.c b/usr/src/uts/common/fs/ufs/quota.c
index 674635fda6..b2eeddab12 100644
--- a/usr/src/uts/common/fs/ufs/quota.c
+++ b/usr/src/uts/common/fs/ufs/quota.c
@@ -273,7 +273,7 @@ loop:
rw_exit(&qip->i_contents);
if ((bn != UFS_HOLE) && !err) {
dqp->dq_mof = ldbtob(bn) +
- (offset_t)(dqoff(uid) & (DEV_BSIZE - 1));
+ (offset_t)(dqoff(uid) & (DEV_BSIZE - 1));
} else {
dqp->dq_mof = UFS_HOLE;
}
diff --git a/usr/src/uts/common/fs/ufs/quota_ufs.c b/usr/src/uts/common/fs/ufs/quota_ufs.c
index 2df2a0281e..490d0d1113 100644
--- a/usr/src/uts/common/fs/ufs/quota_ufs.c
+++ b/usr/src/uts/common/fs/ufs/quota_ufs.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.
*/
@@ -146,7 +145,7 @@ chkdq(struct inode *ip, long change, int force, struct cred *cr,
* Shadow inodes do not need to hold the vfs_dqrwlock lock.
*/
ASSERT((ip->i_mode & IFMT) == IFSHAD ||
- RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock));
+ RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock));
ASSERT(RW_WRITE_HELD(&ip->i_contents));
if (change == 0)
@@ -188,7 +187,7 @@ chkdq(struct inode *ip, long change, int force, struct cred *cr,
struct dquot *xdqp;
error = getdiskquota((uid_t)ip->i_uid, ufsvfsp, 0,
- &xdqp);
+ &xdqp);
switch (error) {
/*
* Either the error was transient or the quota
@@ -322,7 +321,7 @@ chkdq(struct inode *ip, long change, int force, struct cred *cr,
/* If the user was not informed yet and the caller */
/* is the owner of the file */
if ((dqp->dq_flags & DQ_BLKS) == 0 &&
- ip->i_uid == crgetruid(cr)) {
+ ip->i_uid == crgetruid(cr)) {
errmsg = msg1;
dqp->dq_flags |= DQ_BLKS;
}
@@ -336,7 +335,7 @@ chkdq(struct inode *ip, long change, int force, struct cred *cr,
dqp->dq_flags |= DQ_MOD;
dqp->dq_btimelimit = now +
((struct ufsvfs *)ITOV(ip)->v_vfsp->vfs_data)
- ->vfs_btimelimit;
+ ->vfs_btimelimit;
if (ip->i_uid == crgetruid(cr)) {
errmsg = msg2;
}
@@ -344,7 +343,7 @@ chkdq(struct inode *ip, long change, int force, struct cred *cr,
/* If the user was not informed yet and the */
/* caller is the owner of the file */
if ((dqp->dq_flags & DQ_BLKS) == 0 &&
- ip->i_uid == crgetruid(cr)) {
+ ip->i_uid == crgetruid(cr)) {
errmsg = msg3;
dqp->dq_flags |= DQ_BLKS;
}
@@ -390,14 +389,14 @@ out:
* effect of the caller's uprintf().
*/
*lenp = strlen(errmsg) + 20 + 20 +
- strlen(ip->i_fs->fs_fsmnt) + 1;
+ strlen(ip->i_fs->fs_fsmnt) + 1;
*uerrp = (char *)kmem_alloc(*lenp, KM_NOSLEEP);
if (*uerrp != NULL) {
/* errmsg+1 => skip leading ! */
(void) sprintf(*uerrp, errmsg+1,
- (int)ttoproc(curthread)->p_pid,
- (int)ip->i_uid, (int)ip->i_number,
- ip->i_fs->fs_fsmnt);
+ (int)ttoproc(curthread)->p_pid,
+ (int)ip->i_uid, (int)ip->i_number,
+ ip->i_fs->fs_fsmnt);
}
} else {
/*
@@ -405,9 +404,9 @@ out:
* message buffer.
*/
cmn_err(CE_NOTE, errmsg,
- (int)ttoproc(curthread)->p_pid,
- (int)ip->i_uid, (int)ip->i_number,
- ip->i_fs->fs_fsmnt);
+ (int)ttoproc(curthread)->p_pid,
+ (int)ip->i_uid, (int)ip->i_number,
+ ip->i_fs->fs_fsmnt);
}
}
return (error);
@@ -526,7 +525,7 @@ chkiq(struct ufsvfs *ufsvfsp, int change, struct inode *ip, uid_t uid,
}
error = EDQUOT;
} else if (change == 1 && ncurfiles >= dqp->dq_fsoftlimit &&
- dqp->dq_fsoftlimit) {
+ dqp->dq_fsoftlimit) {
now = gethrestime_sec();
if (ncurfiles == dqp->dq_fsoftlimit ||
dqp->dq_ftimelimit == 0) {
@@ -539,7 +538,7 @@ chkiq(struct ufsvfs *ufsvfsp, int change, struct inode *ip, uid_t uid,
/* If the user was not informed yet and the */
/* caller is the owner of the file */
if ((dqp->dq_flags & DQ_FILES) == 0 &&
- uid == crgetruid(cr)) {
+ uid == crgetruid(cr)) {
errmsg = err3;
dqp->dq_flags |= DQ_FILES;
}
@@ -569,13 +568,13 @@ out:
* effect of the caller's uprintf().
*/
*lenp = strlen(errmsg) + 20 + 20 +
- strlen(ufsvfsp->vfs_fs->fs_fsmnt) + 1;
+ strlen(ufsvfsp->vfs_fs->fs_fsmnt) + 1;
*uerrp = (char *)kmem_alloc(*lenp, KM_NOSLEEP);
if (*uerrp != NULL) {
/* errmsg+1 => skip leading ! */
(void) sprintf(*uerrp, errmsg+1,
- (int)ttoproc(curthread)->p_pid,
- (int)uid, ufsvfsp->vfs_fs->fs_fsmnt);
+ (int)ttoproc(curthread)->p_pid,
+ (int)uid, ufsvfsp->vfs_fs->fs_fsmnt);
}
} else {
/*
@@ -583,8 +582,8 @@ out:
* message buffer.
*/
cmn_err(CE_NOTE, errmsg,
- (int)ttoproc(curthread)->p_pid,
- (int)uid, ufsvfsp->vfs_fs->fs_fsmnt);
+ (int)ttoproc(curthread)->p_pid,
+ (int)uid, ufsvfsp->vfs_fs->fs_fsmnt);
}
}
return (error);
diff --git a/usr/src/uts/common/fs/ufs/quotacalls.c b/usr/src/uts/common/fs/ufs/quotacalls.c
index 3f02a0932a..6474acbfff 100644
--- a/usr/src/uts/common/fs/ufs/quotacalls.c
+++ b/usr/src/uts/common/fs/ufs/quotacalls.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.
*/
@@ -238,8 +237,8 @@ opendq(
*/
if (VTOI(vp) != ufsvfsp->vfs_qinod) {
cmn_err(CE_WARN, "Previous quota file still in use."
- " Disable quotas on %s before enabling.\n",
- VTOI(vp)->i_fs->fs_fsmnt);
+ " Disable quotas on %s before enabling.\n",
+ VTOI(vp)->i_fs->fs_fsmnt);
VN_RELE(vp);
rw_exit(&ufsvfsp->vfs_dqrwlock);
return (0);
@@ -272,7 +271,7 @@ opendq(
" from quota file\n");
rw_exit(&qip->i_contents);
(void) VOP_PUTPAGE(vp, (offset_t)0, (size_t)qip->i_size,
- B_INVAL, kcred);
+ B_INVAL, kcred);
} else {
rw_exit(&qip->i_contents);
}
@@ -638,8 +637,8 @@ setquota(int cmd, uid_t uid, struct ufsvfs *ufsvfsp,
qip = ufsvfsp->vfs_qinod;
rw_enter(&qip->i_contents, RW_WRITER);
(void) ufs_rdwri(UIO_WRITE, FWRITE | FSYNC, qip, (caddr_t)&dqp->dq_dqb,
- sizeof (struct dqblk), dqoff(uid), UIO_SYSSPACE,
- (int *)NULL, kcred);
+ sizeof (struct dqblk), dqoff(uid), UIO_SYSSPACE,
+ (int *)NULL, kcred);
rw_exit(&qip->i_contents);
(void) VOP_PUTPAGE(ITOV(qip), dqoff(dqp->dq_uid) & ~qip->i_fs->fs_bmask,
@@ -845,7 +844,7 @@ quotasync(struct ufsvfs *ufsvfsp, int do_lock)
* want to wait to avoid deadlock.
*/
if (rw_tryenter(&ufsvfsp->vfs_dqrwlock,
- RW_READER) == 0) {
+ RW_READER) == 0) {
mutex_exit(&dqp->dq_lock);
continue;
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_acl.c b/usr/src/uts/common/fs/ufs/ufs_acl.c
index bed522d758..23cdc55a5b 100644
--- a/usr/src/uts/common/fs/ufs/ufs_acl.c
+++ b/usr/src/uts/common/fs/ufs/ufs_acl.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"
@@ -139,7 +138,7 @@ ufs_si_store(struct inode *ip, si_t *sp, int puship, cred_t *cr)
ip->i_mode = (ip->i_smode & ~0777) |
((sp->aowner->acl_ic_perm & 07) << 6) |
(((sp->aclass.acl_ismask ? sp->aclass.acl_maskbits :
- sp->agroup->acl_ic_perm) & 07) << 3) |
+ sp->agroup->acl_ic_perm) & 07) << 3) |
(sp->aother->acl_ic_perm & 07);
TRANS_INODE(ip->i_ufsvfs, ip);
ufs_iupdat(ip, 1);
@@ -236,10 +235,10 @@ loop:
sip->i_nlink = 1;
sip->i_uid = crgetuid(cr);
sip->i_suid = (ulong_t)sip->i_uid > (ulong_t)USHRT_MAX ?
- UID_LONG : sip->i_uid;
+ UID_LONG : sip->i_uid;
sip->i_gid = crgetgid(cr);
sip->i_sgid = (ulong_t)sip->i_gid > (ulong_t)USHRT_MAX ?
- GID_LONG : sip->i_gid;
+ GID_LONG : sip->i_gid;
sip->i_shadow = 0;
TRANS_INODE(ufsvfsp, sip);
sip->i_ufs_acl = NULL;
@@ -769,7 +768,7 @@ ufs_acl_get(struct inode *ip, vsecattr_t *vsap, int flag, cred_t *cr)
aclentp->a_perm = ((ushort_t)(ip->i_mode & 0070)) >> 3;
aclentp->a_id = 0; /* Really undefined */
ksort((caddr_t)vsap->vsa_aclentp, vsap->vsa_aclcnt,
- sizeof (aclent_t), cmp2acls);
+ sizeof (aclent_t), cmp2acls);
}
return (0);
@@ -1011,14 +1010,14 @@ vsecattr2aclentry(vsecattr_t *vsap, si_t **spp)
/* Sort & validate the lists on the vsap */
ksort((caddr_t)vsap->vsa_aclentp, vsap->vsa_aclcnt,
- sizeof (aclent_t), cmp2acls);
+ sizeof (aclent_t), cmp2acls);
ksort((caddr_t)vsap->vsa_dfaclentp, vsap->vsa_dfaclcnt,
- sizeof (aclent_t), cmp2acls);
+ sizeof (aclent_t), cmp2acls);
if ((err = acl_validate(vsap->vsa_aclentp,
- vsap->vsa_aclcnt, ACL_CHECK)) != 0)
+ vsap->vsa_aclcnt, ACL_CHECK)) != 0)
return (err);
if ((err = acl_validate(vsap->vsa_dfaclentp,
- vsap->vsa_dfaclcnt, DEF_ACL_CHECK)) != 0)
+ vsap->vsa_dfaclcnt, DEF_ACL_CHECK)) != 0)
return (err);
/* Create new si struct and hang acl's off it */
@@ -1168,12 +1167,12 @@ aclentry2vsecattr(si_t *sp, vsecattr_t *vsap)
/* Sort the acl list */
ksort((caddr_t)vsap->vsa_aclentp, vsap->vsa_aclcnt,
- sizeof (aclent_t), cmp2acls);
+ sizeof (aclent_t), cmp2acls);
/* Check the acl list */
if ((err = acl_validate(vsap->vsa_aclentp,
- vsap->vsa_aclcnt, ACL_CHECK)) != 0) {
- kmem_free(vsap->vsa_aclentp, numacls *
- sizeof (aclent_t));
+ vsap->vsa_aclcnt, ACL_CHECK)) != 0) {
+ kmem_free(vsap->vsa_aclentp,
+ numacls * sizeof (aclent_t));
vsap->vsa_aclentp = NULL;
return (err);
}
@@ -1197,8 +1196,8 @@ do_defaults:
vsap->vsa_dfaclcnt = numacls;
if (vsap->vsa_mask & VSA_DFACL) {
- vsap->vsa_dfaclentp = kmem_zalloc(numacls * sizeof (aclent_t),
- KM_SLEEP);
+ vsap->vsa_dfaclentp =
+ kmem_zalloc(numacls * sizeof (aclent_t), KM_SLEEP);
aclentp = vsap->vsa_dfaclentp;
formvsec(DEF_USER_OBJ, sp->downer, &aclentp);
formvsec(DEF_USER, sp->dusers, &aclentp);
@@ -1215,7 +1214,7 @@ do_defaults:
/* Sort the default acl list */
ksort((caddr_t)vsap->vsa_dfaclentp, vsap->vsa_dfaclcnt,
- sizeof (aclent_t), cmp2acls);
+ sizeof (aclent_t), cmp2acls);
if ((err = acl_validate(vsap->vsa_dfaclentp,
vsap->vsa_dfaclcnt, DEF_ACL_CHECK)) != 0) {
if (vsap->vsa_aclentp != NULL)
@@ -1333,7 +1332,7 @@ ufs_si_inherit(struct inode *ip, struct inode *tdp, o_mode_t mode, cred_t *cr)
rw_enter(&sp->s_lock, RW_READER);
ASSERT(((tdp->i_mode & IFMT) == IFDIR) ||
- ((tdp->i_mode & IFMT) == IFATTRDIR));
+ ((tdp->i_mode & IFMT) == IFATTRDIR));
mask = ((sp->downer != NULL) ? 1 : 0) |
((sp->dgroup != NULL) ? 2 : 0) |
@@ -1380,7 +1379,7 @@ ufs_si_inherit(struct inode *ip, struct inode *tdp, o_mode_t mode, cred_t *cr)
/* copy default acl if necessary */
if (((ip->i_mode & IFMT) == IFDIR) ||
- ((ip->i_mode & IFMT) == IFATTRDIR)) {
+ ((ip->i_mode & IFMT) == IFATTRDIR)) {
acl_cpy(sp->downer, (ufs_ic_acl_t *)&tsp->downer);
acl_cpy(sp->dgroup, (ufs_ic_acl_t *)&tsp->dgroup);
acl_cpy(sp->dother, (ufs_ic_acl_t *)&tsp->dother);
@@ -2038,10 +2037,10 @@ si_cmp(si_t *sp1, si_t *sp2)
if (sp1->dclass.acl_ismask != sp2->dclass.acl_ismask)
return (1);
if (sp1->aclass.acl_ismask &&
- sp1->aclass.acl_maskbits != sp2->aclass.acl_maskbits)
+ sp1->aclass.acl_maskbits != sp2->aclass.acl_maskbits)
return (1);
if (sp1->dclass.acl_ismask &&
- sp1->dclass.acl_maskbits != sp2->dclass.acl_maskbits)
+ sp1->dclass.acl_maskbits != sp2->dclass.acl_maskbits)
return (1);
return (0);
diff --git a/usr/src/uts/common/fs/ufs/ufs_alloc.c b/usr/src/uts/common/fs/ufs/ufs_alloc.c
index 763dd5e4e5..ff954177e9 100644
--- a/usr/src/uts/common/fs/ufs/ufs_alloc.c
+++ b/usr/src/uts/common/fs/ufs/ufs_alloc.c
@@ -156,12 +156,12 @@ alloc(struct inode *ip, daddr_t bpref, int size, daddr_t *bnp, cred_t *cr)
* size is guaranteed to be >= zero by our caller.
*/
(void) chkdq(ip, -(long)btodb(size), 0, cr, (char **)NULL,
- (size_t *)NULL);
+ (size_t *)NULL);
nospace:
mutex_enter(&ufsvfsp->vfs_lock);
if ((lbolt - ufsvfsp->vfs_lastwhinetime) > (hz << 2) &&
- (!(TRANS_ISTRANS(ufsvfsp)) || !(ip->i_flag & IQUIET))) {
+ (!(TRANS_ISTRANS(ufsvfsp)) || !(ip->i_flag & IQUIET))) {
ufsvfsp->vfs_lastwhinetime = lbolt;
cmn_err(CE_NOTE, "alloc: %s: file system full", fs->fs_fsmnt);
}
@@ -242,7 +242,7 @@ realloccg(struct inode *ip, daddr_t bprev, daddr_t bpref, int osize,
*/
request = (fs->fs_optim == FS_OPTTIME) ? fs->fs_bsize : nsize;
bno = (daddr_t)hashalloc(ip, cg, (long)bpref, request,
- (ulong_t (*)())alloccg);
+ (ulong_t (*)())alloccg);
if (bno > 0) {
*bnp = bno;
if (nsize < request)
@@ -258,15 +258,15 @@ realloccg(struct inode *ip, daddr_t bprev, daddr_t bpref, int osize,
* our caller guarantees nsize >= osize.
*/
(void) chkdq(ip, -(long)btodb(nsize - osize), 0, cr, (char **)NULL,
- (size_t *)NULL);
+ (size_t *)NULL);
nospace:
mutex_enter(&ufsvfsp->vfs_lock);
if ((lbolt - ufsvfsp->vfs_lastwhinetime) > (hz << 2) &&
- (!(TRANS_ISTRANS(ufsvfsp)) || !(ip->i_flag & IQUIET))) {
+ (!(TRANS_ISTRANS(ufsvfsp)) || !(ip->i_flag & IQUIET))) {
ufsvfsp->vfs_lastwhinetime = lbolt;
cmn_err(CE_NOTE,
- "realloccg %s: file system full", fs->fs_fsmnt);
+ "realloccg %s: file system full", fs->fs_fsmnt);
}
mutex_exit(&ufsvfsp->vfs_lock);
return (ENOSPC);
@@ -314,8 +314,8 @@ loop:
*/
if ((mode != IFSHAD) && (mode != IFATTRDIR)) {
err = chkiq((struct ufsvfs *)ITOV(pip)->v_vfsp->vfs_data,
- /* change */ 1, (struct inode *)NULL, crgetuid(cr), 0,
- cr, &errmsg, &len);
+ /* change */ 1, (struct inode *)NULL, crgetuid(cr), 0,
+ cr, &errmsg, &len);
/*
* As we haven't acquired any locks yet, dump the message
* now.
@@ -344,8 +344,8 @@ loop:
* the quota subsystem is already messed up.
*/
(void) chkiq(ufsvfsp, /* change */ -1,
- (struct inode *)NULL, crgetuid(cr), 0, cr,
- (char **)NULL, (size_t *)NULL);
+ (struct inode *)NULL, crgetuid(cr), 0, cr,
+ (char **)NULL, (size_t *)NULL);
}
goto noinodes;
}
@@ -357,8 +357,8 @@ loop:
* error return here.
*/
(void) chkiq(ufsvfsp, /* change */ -1,
- (struct inode *)NULL, crgetuid(cr), 0, cr,
- (char **)NULL, (size_t *)NULL);
+ (struct inode *)NULL, crgetuid(cr), 0, cr,
+ (char **)NULL, (size_t *)NULL);
}
ufs_ifree(pip, ino, 0);
return (err);
@@ -378,9 +378,9 @@ loop:
rw_exit(&ip->i_contents);
VN_RELE(ITOV(ip));
cmn_err(CE_WARN,
- "%s: unexpected allocated inode %d, run fsck(1M)%s",
- fs->fs_fsmnt, (int)ino,
- (TRANS_ISTRANS(ufsvfsp) ? " -o f" : ""));
+ "%s: unexpected allocated inode %d, run fsck(1M)%s",
+ fs->fs_fsmnt, (int)ino,
+ (TRANS_ISTRANS(ufsvfsp) ? " -o f" : ""));
goto loop;
}
@@ -926,7 +926,7 @@ fragextend(struct inode *ip, int cg, long bprev, int osize, int nsize)
return (NULL);
}
if ((TRANS_ISCANCEL(ufsvfsp, ldbtob(fsbtodb(fs, bprev + i)),
- fs->fs_fsize))) {
+ fs->fs_fsize))) {
mutex_exit(&ufsvfsp->vfs_lock);
brelse(bp);
return (NULL);
@@ -1288,7 +1288,7 @@ ialloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
if (fs->fs_cs(fs, cg).cs_nifree == 0)
return (0);
bp = UFS_BREAD(ufsvfsp, ip->i_dev, (daddr_t)fsbtodb(fs, cgtod(fs, cg)),
- (int)fs->fs_cgsize);
+ (int)fs->fs_cgsize);
cgp = bp->b_un.b_cg;
if (bp->b_flags & B_ERROR || !cg_chkmagic(cgp) ||
@@ -1341,7 +1341,7 @@ ialloccg(struct inode *ip, int cg, daddr_t ipref, int mode)
mutex_exit(&ufsvfsp->vfs_lock);
(void) ufs_fault(ITOV(ip), "ialloccg: block not in mapfs = %s",
- fs->fs_fsmnt);
+ fs->fs_fsmnt);
return (0);
gotit:
setbit(iused, ipref);
@@ -1404,8 +1404,8 @@ mapsearch(struct ufsvfs *ufsvfsp, struct cg *cgp, daddr_t bpref,
* search the array for a match
*/
loc = scanc((unsigned)len, (uchar_t *)&cg_blksfree(cgp)[first],
- (uchar_t *)fragtbl[fs->fs_frag],
- (int)(1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
+ (uchar_t *)fragtbl[fs->fs_frag],
+ (int)(1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
/*
* match found
*/
@@ -1753,7 +1753,7 @@ exit:
* is not already set.
*/
if ((ip->i_size > MAXOFF32_T) &&
- !(fs->fs_flags & FSLARGEFILES)) {
+ !(fs->fs_flags & FSLARGEFILES)) {
ASSERT(ufsvfsp->vfs_lfflags & UFS_LARGEFILES);
mutex_enter(&ufsvfsp->vfs_lock);
fs->fs_flags |= FSLARGEFILES;
diff --git a/usr/src/uts/common/fs/ufs/ufs_bmap.c b/usr/src/uts/common/fs/ufs/ufs_bmap.c
index 9933ff219a..17894a3499 100644
--- a/usr/src/uts/common/fs/ufs/ufs_bmap.c
+++ b/usr/src/uts/common/fs/ufs/ufs_bmap.c
@@ -229,7 +229,7 @@ bmap_read(struct inode *ip, u_offset_t off, daddr_t *bnp, int *lenp)
if (lbn < NDADDR) {
DOEXTENT(fs, lbn, boff, bnp, lenp,
ip->i_size, &ip->i_db[lbn], NDADDR - lbn, 1,
- ufsvfsp->vfs_iotransz);
+ ufsvfsp->vfs_iotransz);
return (0);
}
@@ -267,7 +267,7 @@ bmap_read(struct inode *ip, u_offset_t off, daddr_t *bnp, int *lenp)
for (; j <= NIADDR; j++) {
ob = nb;
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, fsbtodb(fs, ob), fs->fs_bsize);
+ ip->i_dev, fsbtodb(fs, ob), fs->fs_bsize);
if (bp->b_flags & B_ERROR) {
brelse(bp);
return (EIO);
@@ -289,7 +289,7 @@ bmap_read(struct inode *ip, u_offset_t off, daddr_t *bnp, int *lenp)
}
DOEXTENT(fs, lbn, boff, bnp, lenp, ip->i_size, &bap[i],
MIN(NINDIR(fs) - i, (daddr_t)lblkno(fs, ip->i_size - 1) - lbn + 1),
- 0, ufsvfsp->vfs_iotransz);
+ 0, ufsvfsp->vfs_iotransz);
brelse(bp);
return (0);
}
@@ -392,14 +392,14 @@ bmap_write(struct inode *ip, u_offset_t off, int size,
* a hold of the old block once we free it until
* the I/O is complete.
*/
- err = fbread(ITOV(ip),
- ((offset_t)llbn << fs->fs_bshift),
- (uint_t)bsize, S_OTHER, &fbp);
+ err =
+ fbread(ITOV(ip), ((offset_t)llbn << fs->fs_bshift),
+ (uint_t)bsize, S_OTHER, &fbp);
if (err)
return (err);
pref = blkpref(ip, llbn, (int)llbn, &ip->i_db[0]);
err = realloccg(ip, ob, pref, (int)osize, (int)bsize,
- &nb, cr);
+ &nb, cr);
if (err) {
if (fbp)
fbrelse(fbp, S_OTHER);
@@ -469,9 +469,9 @@ bmap_write(struct inode *ip, u_offset_t off, int size,
*/
ob = nb;
pref = blkpref(ip, lbn, (int)lbn,
- &ip->i_db[0]);
+ &ip->i_db[0]);
err = realloccg(ip, ob, pref, (int)osize,
- (int)nsize, &nb, cr);
+ (int)nsize, &nb, cr);
if (err)
return (err);
if (allocblk)
@@ -546,9 +546,9 @@ bmap_write(struct inode *ip, u_offset_t off, int size,
}
ASSERT(nsize >= osize);
(void) chkdq(ip,
- -(long)btodb(nsize - osize),
- 0, cr, (char **)NULL,
- (size_t *)NULL);
+ -(long)btodb(nsize - osize),
+ 0, cr, (char **)NULL,
+ (size_t *)NULL);
return (err);
}
}
@@ -739,7 +739,7 @@ gotit:
if (j < NIADDR) {
/* Indirect block */
pref = blkpref(ip, lbn, 0,
- (daddr32_t *)0);
+ (daddr32_t *)0);
} else {
/* Data block */
pref = blkpref(ip, lbn, i, &bap[0]);
@@ -782,7 +782,7 @@ gotit:
* blocks never point at garbage.
*/
nbp = UFS_GETBLK(
- ufsvfsp, dev, fsbtodb(fs, nb), bsize);
+ ufsvfsp, dev, fsbtodb(fs, nb), bsize);
clrbuf(nbp);
/* XXX Maybe special-case this? */
@@ -838,7 +838,7 @@ gotit:
if (isdirquota || (issync &&
lbn < llbn))
(void) ufs_fbiwrite(fbp, ip, nb,
- fs->fs_fsize);
+ fs->fs_fsize);
else
fbrelse(fbp, S_WRITE);
}
@@ -847,7 +847,7 @@ gotit:
* re-acquire "bp" buf
*/
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, fsbtodb(fs, ob), bsize);
+ ip->i_dev, fsbtodb(fs, ob), bsize);
if (bp->b_flags & B_ERROR) {
err = geterror(bp);
brelse(bp);
@@ -963,12 +963,12 @@ bmap_has_holes(struct inode *ip)
cnt = NDADDR + 1 + dblks;
else if (j == NIADDR-1) /* double indirection */
cnt = NDADDR + 1 + nindirblks +
- 1 + (dblks + nindiroffset)/nindirblks + dblks;
+ 1 + (dblks + nindiroffset)/nindirblks + dblks;
else if (j == NIADDR-2) { /* triple indirection */
n = (dblks + nindiroffset)/nindirblks;
cnt = NDADDR + 1 + nindirblks +
- 1 + nindirblks + nindirblks*nindirblks +
- 1 + (n + nindiroffset)/nindirblks + n + dblks;
+ 1 + nindirblks + nindirblks*nindirblks +
+ 1 + (n + nindiroffset)/nindirblks + n + dblks;
}
return (mblks < cnt);
@@ -1386,7 +1386,7 @@ bmap_set_bn(struct vnode *vp, u_offset_t off, daddr32_t bn)
for (; j <= NIADDR; j++) {
ob = nb;
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, fsbtodb(fs, ob), fs->fs_bsize);
+ ip->i_dev, fsbtodb(fs, ob), fs->fs_bsize);
if (bp->b_flags & B_ERROR) {
err = geterror(bp);
brelse(bp);
diff --git a/usr/src/uts/common/fs/ufs/ufs_dir.c b/usr/src/uts/common/fs/ufs/ufs_dir.c
index ee70b4bec0..cbf1b4259b 100644
--- a/usr/src/uts/common/fs/ufs/ufs_dir.c
+++ b/usr/src/uts/common/fs/ufs/ufs_dir.c
@@ -317,7 +317,7 @@ restart:
}
if (dp->i_cachedir == CD_ENABLED) {
switch (dnlc_dir_start(dcap, dp->i_size >>
- AV_DIRECT_SHIFT)) {
+ AV_DIRECT_SHIFT)) {
case DNOMEM:
dp->i_cachedir = CD_DISABLED_NOMEM;
ufs_dc_disable_at = gethrtime();
@@ -506,12 +506,12 @@ searchloop:
omtime = dp->i_mtime;
rw_exit(&dp->i_rwlock);
rw_enter(&dp->i_ufsvfs->vfs_dqrwlock,
- RW_READER);
+ RW_READER);
err = ufs_iget_alloced(dp->i_vfs, ep_ino, ipp,
cr);
rw_exit(&dp->i_ufsvfs->vfs_dqrwlock);
ufs_tryirwlock(&dp->i_rwlock, RW_READER,
- retry_disk);
+ retry_disk);
if (indeadlock) {
if (!err)
VN_RELE(ITOV(*ipp));
@@ -553,7 +553,7 @@ searchloop:
}
} else {
rw_enter(&dp->i_ufsvfs->vfs_dqrwlock,
- RW_READER);
+ RW_READER);
err = ufs_iget_alloced(dp->i_vfs, ep_ino, ipp,
cr);
rw_exit(&dp->i_ufsvfs->vfs_dqrwlock);
@@ -1934,7 +1934,7 @@ ufs_diraddentry(
if (slotp->endoff && (slotp->endoff < tdp->i_size)) {
if (!TRANS_ISTRANS(tdp->i_ufsvfs)) {
(void) ufs_itrunc(tdp, (u_offset_t)slotp->endoff, 0,
- cr);
+ cr);
}
}
@@ -2094,7 +2094,7 @@ ufs_dirmakeinode(
ASSERT(vap != NULL);
ASSERT(op == DE_CREATE || op == DE_MKDIR || op == DE_ATTRDIR ||
- op == DE_SYMLINK);
+ op == DE_SYMLINK);
ASSERT((vap->va_mask & (AT_TYPE|AT_MODE)) == (AT_TYPE|AT_MODE));
ASSERT(RW_WRITE_HELD(&tdp->i_rwlock));
ASSERT(RW_WRITE_HELD(&tdp->i_contents));
@@ -2125,7 +2125,7 @@ ufs_dirmakeinode(
if (ip->i_dquot != NULL) {
err = ufs_fault(ITOV(ip),
"ufs_dirmakeinode, ip->i_dquot != NULL: dquot (%s)",
- tdp->i_fs->fs_fsmnt);
+ tdp->i_fs->fs_fsmnt);
rw_exit(&ip->i_contents);
return (err);
}
@@ -2196,10 +2196,10 @@ ufs_dirmakeinode(
*
* where MAXUID was set to 60002. See notes on this in ufs_inode.c
*/
- ip->i_suid = (ulong_t)ip->i_uid > (ulong_t)USHRT_MAX ?
- UID_LONG : ip->i_uid;
- ip->i_sgid = (ulong_t)ip->i_gid > (ulong_t)USHRT_MAX ?
- GID_LONG : ip->i_gid;
+ ip->i_suid =
+ (ulong_t)ip->i_uid > (ulong_t)USHRT_MAX ? UID_LONG : ip->i_uid;
+ ip->i_sgid =
+ (ulong_t)ip->i_gid > (ulong_t)USHRT_MAX ? GID_LONG : ip->i_gid;
/*
* If we're creating a directory, and the parent directory has the
@@ -2350,8 +2350,8 @@ ufs_dirmakedirect(
if (DIRBLKSIZ > dp->i_fs->fs_fsize) {
err = ufs_fault(ITOV(dp),
"ufs_dirmakedirect: bad fs_fsize, DIRBLKSIZ: %d > dp->i_fs->fs_fsize: %d (%s)",
- DIRBLKSIZ, dp->i_fs->fs_fsize,
- dp->i_fs->fs_fsmnt);
+ DIRBLKSIZ, dp->i_fs->fs_fsize,
+ dp->i_fs->fs_fsmnt);
return (err);
}
ip->i_size = DIRBLKSIZ;
@@ -2645,7 +2645,7 @@ retry:
}
pep->d_reclen += ep->d_reclen;
(void) dnlc_dir_add_space(dcap, extra + ep->d_reclen,
- (uint64_t)(slot.offset - slot.size));
+ (uint64_t)(slot.offset - slot.size));
/* adjust the previous pointer in the next entry */
nep = (struct direct *)((char *)ep + ep->d_reclen);
if ((uintptr_t)nep & (DIRBLKSIZ - 1)) {
@@ -2667,7 +2667,7 @@ retry:
}
} else {
(void) dnlc_dir_add_space(dcap, ep->d_reclen,
- (uint64_t)slot.offset);
+ (uint64_t)slot.offset);
}
} else {
/*
@@ -2821,7 +2821,7 @@ blkatoff(
lbn = (daddr_t)lblkno(fs, offset);
bsize = (uint_t)blksize(fs, ip, lbn);
err = fbread(ITOV(ip), (offset_t)(offset & fs->fs_bmask),
- bsize, S_READ, &fbp);
+ bsize, S_READ, &fbp);
if (err) {
*fbpp = (struct fbuf *)NULL;
return (err);
@@ -3109,7 +3109,7 @@ retry_lock:
* with EAGAIN else we just go back and try.
*/
if (RW_ISWRITER(&ip->i_rwlock) &&
- !(RW_WRITE_HELD(&ip->i_rwlock))) {
+ !(RW_WRITE_HELD(&ip->i_rwlock))) {
err = EAGAIN;
if (fbp) {
fbrelse(fbp, S_OTHER);
@@ -3179,11 +3179,11 @@ ufs_xattrdirempty(struct inode *ip, ino_t parentino, struct cred *cr)
*/
if (dp->d_namlen == 1 && dp->d_name[0] == '.' &&
- (ino_t)dp->d_ino == parentino)
+ (ino_t)dp->d_ino == parentino)
continue;
if (dp->d_namlen == 2 && dp->d_name[0] == '.' &&
- dp->d_name[1] == '.') {
+ dp->d_name[1] == '.') {
continue;
}
empty = 0;
diff --git a/usr/src/uts/common/fs/ufs/ufs_directio.c b/usr/src/uts/common/fs/ufs/ufs_directio.c
index 28db521859..b60537ba75 100644
--- a/usr/src/uts/common/fs/ufs/ufs_directio.c
+++ b/usr/src/uts/common/fs/ufs/ufs_directio.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.
*/
@@ -61,7 +60,6 @@
#include <sys/debug.h>
#include <sys/vmsystm.h>
#include <sys/cmn_err.h>
-#include <sys/vtrace.h>
#include <sys/filio.h>
#include <sys/atomic.h>
@@ -157,9 +155,9 @@ void
directio_bufs_init(void)
{
directio_buf_cache = kmem_cache_create("directio_buf_cache",
- sizeof (struct directio_buf), 0,
- directio_buf_constructor, directio_buf_destructor,
- NULL, NULL, NULL, 0);
+ sizeof (struct directio_buf), 0,
+ directio_buf_constructor, directio_buf_destructor,
+ NULL, NULL, NULL, 0);
}
void
@@ -695,8 +693,8 @@ skip_alloc:
if (pplist != NULL)
spplist = pplist +
- btop((uintptr_t)iov->iov_base -
- ((uintptr_t)pglck_base & PAGEMASK));
+ btop((uintptr_t)iov->iov_base -
+ ((uintptr_t)pglck_base & PAGEMASK));
else
spplist = NULL;
@@ -704,7 +702,7 @@ skip_alloc:
* Kick off the direct write requests
*/
directio_start(ufsvfsp, ip->i_dev, nbytes, ldbtob(bn),
- iov->iov_base, S_READ, procp, &tail, spplist);
+ iov->iov_base, S_READ, procp, &tail, spplist);
/*
* Adjust pointers and counters
@@ -739,7 +737,7 @@ skip_alloc:
rw_exit(&ip->i_contents);
rw_enter(&ip->i_contents, RW_WRITER);
(void) VOP_PUTPAGE(vp, (offset_t)0, (size_t)0,
- B_INVAL, cr);
+ B_INVAL, cr);
ufs_directio_kstats.nflushes.value.ui64++;
rw_downgrade(&ip->i_contents);
}
@@ -806,7 +804,7 @@ directio_hole(struct uio *uio, size_t nbytes)
while (error == 0 && phys_uio.uio_resid) {
nzero = (int)MIN(phys_iov.iov_len, ufs_directio_zero_len);
error = uiomove(ufs_directio_zero_buf, nzero, UIO_READ,
- &phys_uio);
+ &phys_uio);
}
return (error);
}
@@ -964,7 +962,7 @@ ufs_directio_read(struct inode *ip, uio_t *uio, cred_t *cr, int *statusp)
*/
pglck_len = (size_t)MIN(pglck_len, ufsvfsp->vfs_ioclustsz);
error = as_pagelock(as, &pplist, pglck_base,
- pglck_len, S_WRITE);
+ pglck_len, S_WRITE);
if (error)
break;
@@ -985,7 +983,7 @@ ufs_directio_read(struct inode *ip, uio_t *uio, cred_t *cr, int *statusp)
if (bn == UFS_HOLE) {
nbytes = (size_t)MIN(fs->fs_bsize -
- (long)blkoff(fs, uoff), nbytes);
+ (long)blkoff(fs, uoff), nbytes);
error = directio_hole(uio, nbytes);
/*
* Hole reads are not added to the list
@@ -1003,8 +1001,8 @@ ufs_directio_read(struct inode *ip, uio_t *uio, cred_t *cr, int *statusp)
*/
if (pplist != NULL)
spplist = pplist +
- btop((uintptr_t)iov->iov_base -
- ((uintptr_t)pglck_base & PAGEMASK));
+ btop((uintptr_t)iov->iov_base -
+ ((uintptr_t)pglck_base & PAGEMASK));
else
spplist = NULL;
@@ -1012,8 +1010,8 @@ ufs_directio_read(struct inode *ip, uio_t *uio, cred_t *cr, int *statusp)
* Kick off the direct read requests
*/
directio_start(ufsvfsp, ip->i_dev, nbytes,
- ldbtob(bn), iov->iov_base,
- S_WRITE, procp, &tail, spplist);
+ ldbtob(bn), iov->iov_base,
+ S_WRITE, procp, &tail, spplist);
}
if (error)
diff --git a/usr/src/uts/common/fs/ufs/ufs_filio.c b/usr/src/uts/common/fs/ufs/ufs_filio.c
index 04c545b190..6a6bc4c421 100644
--- a/usr/src/uts/common/fs/ufs/ufs_filio.c
+++ b/usr/src/uts/common/fs/ufs/ufs_filio.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.
*/
@@ -54,7 +53,6 @@
#include <sys/vmmeter.h>
#include <sys/vmsystm.h>
#include <sys/cmn_err.h>
-#include <sys/vtrace.h>
#include <sys/filio.h>
#include <sys/dnlc.h>
@@ -459,29 +457,28 @@ ufs_fioffs(
ul->un_flags &= ~LDL_NOROLL;
logmap_start_roll(ul);
if (!fsp->fs_ronly && (fsp->fs_reclaim &
- (FS_RECLAIM|FS_RECLAIMING))) {
+ (FS_RECLAIM|FS_RECLAIMING))) {
fsp->fs_reclaim &= ~FS_RECLAIM;
fsp->fs_reclaim |= FS_RECLAIMING;
ufs_thread_start(&ufsvfsp->vfs_reclaim,
- ufs_thread_reclaim,
- vp->v_vfsp);
+ ufs_thread_reclaim, vp->v_vfsp);
if (!fsp->fs_ronly) {
TRANS_SBWRITE(ufsvfsp,
- TOP_SBUPDATE_UPDATE);
+ TOP_SBUPDATE_UPDATE);
if (err =
geterror(ufsvfsp->vfs_bufp)) {
refstr_t *mntpt;
mntpt = vfs_getmntpoint(
- vp->v_vfsp);
+ vp->v_vfsp);
cmn_err(CE_NOTE,
- "Filesystem Flush "
- "Failed to update "
- "Reclaim Status for "
- " %s, Write failed to "
- "update superblock, "
- "error %d",
- refstr_value(mntpt),
- err);
+ "Filesystem Flush "
+ "Failed to update "
+ "Reclaim Status for "
+ " %s, Write failed to "
+ "update superblock, "
+ "error %d",
+ refstr_value(mntpt),
+ err);
refstr_rele(mntpt);
}
}
@@ -618,7 +615,7 @@ ufs_fiotune(struct vnode *vp, struct fiotune *uftp, struct cred *cr)
* Adjust minfrags from minfree
*/
ufsvfsp->vfs_minfrags = (int)((int64_t)fs->fs_dsize *
- fs->fs_minfree / 100);
+ fs->fs_minfree / 100);
/*
* Write the superblock
diff --git a/usr/src/uts/common/fs/ufs/ufs_inode.c b/usr/src/uts/common/fs/ufs/ufs_inode.c
index 121a6b7b7a..76db353cca 100644
--- a/usr/src/uts/common/fs/ufs/ufs_inode.c
+++ b/usr/src/uts/common/fs/ufs/ufs_inode.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.
*/
@@ -186,12 +185,12 @@ ufs_iinit(void)
*/
if (ufs_HW <= ufs_LW) {
cmn_err(CE_WARN,
- "ufs_HW (%d) <= ufs_LW (%d). Check /etc/system.",
- ufs_HW, ufs_LW);
+ "ufs_HW (%d) <= ufs_LW (%d). Check /etc/system.",
+ ufs_HW, ufs_LW);
ufs_LW = UFS_LW_DEFAULT;
ufs_HW = UFS_HW_DEFAULT;
cmn_err(CE_CONT, "using defaults, ufs_HW = %d, ufs_LW = %d\n",
- ufs_HW, ufs_LW);
+ ufs_HW, ufs_LW);
}
/*
@@ -200,11 +199,11 @@ ufs_iinit(void)
if (ufs_ninode <= 0)
ufs_ninode = ncsize;
if (ufs_inode_max == 0)
- ufs_inode_max = (ulong_t)((kmem_maxavail() >> 2) /
- sizeof (struct inode));
+ ufs_inode_max =
+ (ulong_t)((kmem_maxavail() >> 2) / sizeof (struct inode));
if (ufs_ninode > ufs_inode_max || (ufs_ninode == 0 && ncsize == 0)) {
cmn_err(CE_NOTE, "setting ufs_ninode to max value of %ld",
- ufs_inode_max);
+ ufs_inode_max);
ufs_ninode = ufs_inode_max;
}
/*
@@ -318,9 +317,9 @@ ihinit(void)
mutex_init(&ih_lock[i], NULL, MUTEX_DEFAULT, NULL);
}
inode_cache = kmem_cache_create("ufs_inode_cache",
- sizeof (struct inode), 0, ufs_inode_cache_constructor,
- ufs_inode_cache_destructor, ufs_inode_cache_reclaim,
- NULL, NULL, 0);
+ sizeof (struct inode), 0, ufs_inode_cache_constructor,
+ ufs_inode_cache_destructor, ufs_inode_cache_reclaim,
+ NULL, NULL, 0);
}
/*
@@ -700,10 +699,10 @@ ufs_iinactive(struct inode *ip)
mutex_enter(&vp->v_lock);
if (vp->v_count > 1) {
- vp->v_count--; /* release our hold from vn_rele */
- mutex_exit(&vp->v_lock);
- rw_exit(&ip->i_contents);
- return;
+ vp->v_count--; /* release our hold from vn_rele */
+ mutex_exit(&vp->v_lock);
+ rw_exit(&ip->i_contents);
+ return;
}
mutex_exit(&vp->v_lock);
@@ -784,10 +783,10 @@ ufs_iinactive(struct inode *ip)
*/
mutex_enter(&vp->v_lock);
if (vp->v_count > 1) {
- vp->v_count--; /* release our hold from vn_rele */
- mutex_exit(&vp->v_lock);
- rw_exit(&ip->i_contents);
- return;
+ vp->v_count--; /* release our hold from vn_rele */
+ mutex_exit(&vp->v_lock);
+ rw_exit(&ip->i_contents);
+ return;
}
mutex_exit(&vp->v_lock);
uq = &ufs_idle_q;
@@ -925,9 +924,9 @@ ufs_iupdat(struct inode *ip, int waitfor)
* UID_LONG since that would've corresponded to -1.
*/
suid = (ulong_t)ip->i_uid > (ulong_t)USHRT_MAX ?
- UID_LONG : ip->i_uid;
+ UID_LONG : ip->i_uid;
sgid = (ulong_t)ip->i_gid > (ulong_t)USHRT_MAX ?
- GID_LONG : ip->i_gid;
+ GID_LONG : ip->i_gid;
if ((ip->i_suid != suid) || (ip->i_sgid != sgid)) {
ip->i_suid = suid;
@@ -1017,7 +1016,7 @@ ufs_iupdat(struct inode *ip, int waitfor)
*/
if (waitfor && (flag & IBDWRITE)) {
blkflush(ip->i_dev,
- (daddr_t)fsbtodb(fp, itod(fp, ip->i_number)));
+ (daddr_t)fsbtodb(fp, itod(fp, ip->i_number)));
mutex_enter(&ip->i_tlock);
ip->i_flag &= ~IBDWRITE;
mutex_exit(&ip->i_tlock);
@@ -1074,7 +1073,7 @@ indirtrunc(struct inode *ip, daddr_t bn, daddr_t lastbn, int level, int flags)
* writing it.
*/
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, (daddr_t)fsbtodb(fs, bn), (int)fs->fs_bsize);
+ ip->i_dev, (daddr_t)fsbtodb(fs, bn), (int)fs->fs_bsize);
if (bp->b_flags & B_ERROR) {
brelse(bp);
return (0);
@@ -1091,16 +1090,16 @@ indirtrunc(struct inode *ip, daddr_t bn, daddr_t lastbn, int level, int flags)
*/
if (bp->b_flags & B_DELWRI)
TRANS_LOG(ufsvfsp, (caddr_t)bap,
- ldbtob(bp->b_blkno), bp->b_bcount,
- bp->b_un.b_addr, bp->b_bcount);
+ ldbtob(bp->b_blkno), bp->b_bcount,
+ bp->b_un.b_addr, bp->b_bcount);
copy = ngeteblk(fs->fs_bsize);
bcopy((caddr_t)bap, (caddr_t)copy->b_un.b_daddr,
- (uint_t)fs->fs_bsize);
+ (uint_t)fs->fs_bsize);
bzero((caddr_t)&bap[last + 1], zb);
TRANS_BUF(ufsvfsp,
- (caddr_t)&bap[last + 1] - (caddr_t)bap,
- zb, bp, DT_ABZERO);
+ (caddr_t)&bap[last + 1] - (caddr_t)bap,
+ zb, bp, DT_ABZERO);
UFS_BRWRITE(ufsvfsp, bp);
bp = copy, bap = bp->b_un.b_daddr;
@@ -1136,8 +1135,8 @@ indirtrunc(struct inode *ip, daddr_t bn, daddr_t lastbn, int level, int flags)
last = lastbn % factor;
nb = bap[i];
if (nb != 0)
- blocksreleased += indirtrunc(ip, nb, last, level - 1,
- flags);
+ blocksreleased +=
+ indirtrunc(ip, nb, last, level - 1, flags);
}
brelse(bp);
return (blocksreleased);
@@ -1175,7 +1174,7 @@ ufs_itrunc(struct inode *oip, u_offset_t length, int flags, cred_t *cr)
* other uses need the reader lock. opendq() holds the writer lock.
*/
ASSERT((oip->i_mode & IFMT) == IFSHAD ||
- RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock));
+ RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock));
ASSERT(RW_WRITE_HELD(&oip->i_contents));
/*
* We only allow truncation of regular files and directories
@@ -1425,7 +1424,7 @@ ufs_itrunc(struct inode *oip, u_offset_t length, int flags, cred_t *cr)
if (lastiblock[level] < 0) {
ip->i_ib[level] = 0;
free(ip, bn, (off_t)fs->fs_bsize,
- flags | I_IBLK);
+ flags | I_IBLK);
blocksreleased += nblocks;
}
}
@@ -1505,7 +1504,7 @@ done:
oip->i_seq++;
/* blocksreleased is >= zero, so this can not fail */
(void) chkdq(oip, -blocksreleased, 0, cr, (char **)NULL,
- (size_t *)NULL);
+ (size_t *)NULL);
return (0);
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_lockfs.c b/usr/src/uts/common/fs/ufs/ufs_lockfs.c
index 4cfe0d1867..6055532000 100644
--- a/usr/src/uts/common/fs/ufs/ufs_lockfs.c
+++ b/usr/src/uts/common/fs/ufs/ufs_lockfs.c
@@ -53,7 +53,6 @@
#include <sys/vmmeter.h>
#include <sys/vmsystm.h>
#include <sys/cmn_err.h>
-#include <sys/vtrace.h>
#include <sys/acct.h>
#include <sys/dnlc.h>
#include <sys/swap.h>
@@ -539,14 +538,14 @@ ufs_thaw(struct vfs *vfsp, struct ufsvfs *ufsvfsp, struct ulockfs *ulp)
if (error)
goto errout;
error = ufs_scan_inodes(0, ufs_thaw_wlock,
- (void *)ufsvfsp, ufsvfsp);
+ (void *)ufsvfsp, ufsvfsp);
if (error)
goto errout;
}
if (ULOCKFS_IS_HLOCK(ulp) || ULOCKFS_IS_ELOCK(ulp)) {
error = 0;
(void) ufs_scan_inodes(0, ufs_thaw_hlock,
- (void *)ufsvfsp, ufsvfsp);
+ (void *)ufsvfsp, ufsvfsp);
(void) bfinval(ufsvfsp->vfs_dev, 1);
}
} else {
@@ -691,7 +690,7 @@ ufs_reconcile_fs(struct vfs *vfsp, struct ufsvfs *ufsvfsp, int errlck)
mfs->fs_reclaim &= ~FS_RECLAIM;
mfs->fs_reclaim |= FS_RECLAIMING;
ufs_thread_start(&ufsvfsp->vfs_reclaim,
- ufs_thread_reclaim, vfsp);
+ ufs_thread_reclaim, vfsp);
}
/* XXX What to do about sparecon? */
@@ -768,7 +767,7 @@ ufs_reconcile_inode(struct inode *ip, void *arg)
* get the dinode
*/
bp = UFS_BREAD(ip->i_ufsvfs,
- ip->i_dev, (daddr_t)fsbtodb(fs, itod(fs, ip->i_number)),
+ ip->i_dev, (daddr_t)fsbtodb(fs, itod(fs, ip->i_number)),
(int)fs->fs_bsize);
if (bp->b_flags & B_ERROR) {
brelse(bp);
@@ -1047,8 +1046,8 @@ ufs__fiolfs(
int needs_sbwrite;
poll_events |= POLLERR;
- errlck = LOCKFS_IS_ELOCK(&lfs) || LOCKFS_IS_ROELOCK(&lfs)?
- RE_ERRLCK: SET_ERRLCK;
+ errlck = LOCKFS_IS_ELOCK(&lfs) || LOCKFS_IS_ROELOCK(&lfs) ?
+ RE_ERRLCK : SET_ERRLCK;
needs_unlock = !MUTEX_HELD(&ufsvfsp->vfs_lock);
if (needs_unlock)
@@ -1142,7 +1141,7 @@ ufs__fiolfs(
/* don't allow error lock from user to invoke panic */
else if (from_user && errlck == SET_ERRLCK &&
- !(ufsvfsp->vfs_fsfx.fx_flags & (UFSMNT_ONERROR_PANIC >> 4)))
+ !(ufsvfsp->vfs_fsfx.fx_flags & (UFSMNT_ONERROR_PANIC >> 4)))
(void) ufs_fault(ufsvfsp->vfs_root,
ulp->ul_lockfs.lf_comment && ulp->ul_lockfs.lf_comlen > 0 ?
ulp->ul_lockfs.lf_comment: "user-applied error lock");
@@ -1277,7 +1276,7 @@ ufs_check_lockfs(struct ufsvfs *ufsvfsp, struct ulockfs *ulp, ulong_t mask)
sig = cv_wait_sig(&ulp->ul_cv, &ulp->ul_lock);
sigunintr(&smask);
if ((!sig && (ulp->ul_fs_lock & mask)) ||
- ufsvfsp->vfs_dontblock)
+ ufsvfsp->vfs_dontblock)
return (EINTR);
}
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_panic.c b/usr/src/uts/common/fs/ufs/ufs_panic.c
index 944b344d63..5dbb1add54 100644
--- a/usr/src/uts/common/fs/ufs/ufs_panic.c
+++ b/usr/src/uts/common/fs/ufs/ufs_panic.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -468,8 +468,8 @@ ufs_fault_v(vnode_t *vp, char *fmt, va_list adx)
ufsvfsp->vfs_fs->fs_clean = FSBAD;
ASSERT(SEMA_HELD(&ufsvfsp->vfs_bufp->b_sem));
- ufsvfsp->vfs_bufp->b_flags &= ~(B_ASYNC | B_READ |
- B_DONE | B_ERROR | B_DELWRI);
+ ufsvfsp->vfs_bufp->b_flags &=
+ ~(B_ASYNC | B_READ | B_DONE | B_ERROR | B_DELWRI);
(void) bdev_strategy(ufsvfsp->vfs_bufp);
(void) biowait(ufsvfsp->vfs_bufp);
@@ -737,9 +737,8 @@ queue_failure(ufs_failure_t *new)
cv_broadcast(&ufs_fix.uq_cv);
- DCALL(DBGLVL_MAJOR, cmn_err(CE_WARN, new->uf_panic_str?
- new->uf_panic_str:
- "queue_failure: NULL panic str?"));
+ DCALL(DBGLVL_MAJOR, cmn_err(CE_WARN, new->uf_panic_str ?
+ new->uf_panic_str : "queue_failure: NULL panic str?"));
mutex_exit(&ufs_fix.uq_mutex);
MINOR(("] "));
@@ -841,7 +840,7 @@ ufsfx_mount(struct ufsvfs *ufsvfsp, int flags)
ufsvfsp->vfs_fsfx.fx_flags = (flags & UFSMNT_ONERROR_FLGMASK) >> 4;
MINUTE((": %s: fx_flags:%ld,",
- ufsvfsp->vfs_fs->fs_fsmnt, ufsvfsp->vfs_fsfx.fx_flags));
+ ufsvfsp->vfs_fs->fs_fsmnt, ufsvfsp->vfs_fsfx.fx_flags));
/*
* onerror={panic ^ lock only ^ unmount}
*/
@@ -858,7 +857,7 @@ ufsfx_mount(struct ufsvfs *ufsvfsp, int flags)
} else {
ufsvfsp->vfs_fsfx.fx_flags = UFSFX_DEFAULT;
ASSERT(ufsvfsp->vfs_fsfx.fx_flags &
- (UFSMNT_ONERROR_FLGMASK >> 4));
+ (UFSMNT_ONERROR_FLGMASK >> 4));
MINUTE((" DEFAULT"));
}
@@ -907,8 +906,8 @@ ufsfx_unmount(struct ufsvfs *ufsvfsp)
/* XXX if rebooting don't print this? */
if (!terminal_state(f->uf_s) && must_unlock_failure) {
cmn_err(CE_WARN,
- "Unmounting %s while error-locked",
- fs_name(f));
+ "Unmounting %s while error-locked",
+ fs_name(f));
}
f->uf_ufsvfsp = NULL;
@@ -970,8 +969,9 @@ ufsfx_unlockfs(struct ufsvfs *ufsvfsp)
if (!informed) {
informed = 1;
cmn_err(CE_NOTE,
- "Unlock of %s succeeded before fs_clean marked FSFIX?",
- fs_name(f));
+ "Unlock of %s succeeded before "
+ "fs_clean marked FSFIX?",
+ fs_name(f));
}
/*
@@ -1026,8 +1026,9 @@ ufsfx_lockfs(struct ufsvfs *ufsvfsp)
default:
cmn_err(CE_WARN,
- "fs %s not in state UF_TRYLCK, UF_LOCKED or UF_FIXING",
- fs_name(f));
+ "fs %s not in state "
+ "UF_TRYLCK, UF_LOCKED or UF_FIXING",
+ fs_name(f));
break;
case UF_TRYLCK:
@@ -1089,8 +1090,7 @@ ufsfx_thread_fix_failures(void *ignored)
mutex_enter(&ufs_fix.uq_mutex);
CALLB_CPR_SAFE_BEGIN(&cprinfo);
(void) cv_timedwait(&ufs_fix.uq_cv,
- &ufs_fix.uq_mutex,
- lbolt + (hz * retry));
+ &ufs_fix.uq_mutex, lbolt + (hz * retry));
CALLB_CPR_SAFE_END(&cprinfo,
&ufs_fix.uq_mutex);
mutex_exit(&ufs_fix.uq_mutex);
@@ -1147,8 +1147,8 @@ rescan_q:
s = get_state_desc(f->uf_s);
MINOR((": found%s: %s, \"%s: %s\"\n",
- s->ud_attr.terminal? " old": "",
- fs_name(f), state_name(f->uf_s), f->uf_panic_str));
+ s->ud_attr.terminal ? " old" : "",
+ fs_name(f), state_name(f->uf_s), f->uf_panic_str));
if (s->ud_attr.terminal) {
mutex_exit(&f->uf_mutex);
@@ -1193,10 +1193,8 @@ pester_msg(ufs_failure_t *f, int seriousness)
* XXX if seems too long for this fs, poke administrator
* XXX to run fsck manually (and change retry time?)
*/
- cmn_err(seriousness,
- "Waiting for repair of %s to %s",
- fs_name(f),
- f->uf_s & UF_LOCKED? "start": "finish");
+ cmn_err(seriousness, "Waiting for repair of %s to %s",
+ fs_name(f), f->uf_s & UF_LOCKED ? "start" : "finish");
MINUTE(("]"));
}
@@ -1271,7 +1269,7 @@ set_state(ufs_failure_t *f, ufs_failure_states_t new_state)
if (!(f->uf_s & UF_PANIC) && !(new_state & UF_PANIC))
(void) set_state(f, UF_PANIC);
MINOR((": state reset: transition failure (\"%s\"->\"%s\")] ",
- state_name(f->uf_s), state_name(new_state)));
+ state_name(f->uf_s), state_name(new_state)));
return (sfrc);
}
@@ -1284,7 +1282,7 @@ set_state(ufs_failure_t *f, ufs_failure_states_t new_state)
if (s->ud_attr.at_fail && ufs_fix.uq_threadp &&
curthread == ufs_fix.uq_threadp) {
cmn_err(CE_WARN, "set_state: probable recursive panic of %s",
- fs_name(f));
+ fs_name(f));
}
if (need_unlock)
mutex_exit(&ufs_fix.uq_mutex);
@@ -1326,7 +1324,7 @@ sf_undef(ufs_failure_t *f, ufsa_t a, ufs_failure_states_t s)
sfrc_t rc;
TRIVIA(("[sf_undef, action is %s, state is %s\n",
- act_name(a), state_name(s)));
+ act_name(a), state_name(s)));
ASSERT(s == UF_UNDEF);
/* shouldn't find null failure records or ever set one */
@@ -1487,8 +1485,8 @@ sf_found_queue(ufs_failure_t *f)
}
replica = f->uf_vfs_ufsfxp && f->uf_vfs_ufsfxp->fx_current != NULL &&
- f->uf_vfs_ufsfxp->fx_current != f &&
- !terminal_state(f->uf_vfs_ufsfxp->fx_current->uf_s);
+ f->uf_vfs_ufsfxp->fx_current != f &&
+ !terminal_state(f->uf_vfs_ufsfxp->fx_current->uf_s);
/*
* copy general flags to this ufs_failure so we don't
@@ -1676,11 +1674,11 @@ sf_set_locked(ufs_failure_t *f)
if (f->uf_s & UF_TRYLCK) {
cmn_err(CE_WARN, "Error-locked %s: \"%s\"",
- fs_name(f), f->uf_panic_str);
+ fs_name(f), f->uf_panic_str);
if (f->uf_flags & UFSFX_LCKONLY)
cmn_err(CE_WARN, "Manual repair of %s required",
- fs_name(f));
+ fs_name(f));
}
/*
@@ -1710,8 +1708,8 @@ sf_found_lock_fix_cmn(ufs_failure_t *f, ufs_failure_states_t s)
if (s & UF_LOCKED) {
ASSERT(MUTEX_HELD(&f->uf_mutex));
- toolong = time > (ufsfx_tune.uft_too_long +
- f->uf_entered_tm);
+ toolong =
+ time > (ufsfx_tune.uft_too_long + f->uf_entered_tm);
TRIVIA(("%stoolong", !toolong? "not": ""));
HIDEOUS((": time:%ld, too long:%ld, entered_tm:%ld ",
time, ufsfx_tune.uft_too_long, f->uf_entered_tm));
@@ -1731,16 +1729,15 @@ sf_found_lock_fix_cmn(ufs_failure_t *f, ufs_failure_states_t s)
} else {
if (!(f->uf_flags & UFSFX_REPAIR_START)) {
cmn_err(CE_WARN, "%s repair of %s not started.",
- (f->uf_flags & UFSFX_LCKONLY)?
- "Manual": "Automatic",
- fs_name(f));
+ (f->uf_flags & UFSFX_LCKONLY) ?
+ "Manual" : "Automatic", fs_name(f));
f->uf_retry = ufsfx_tune.uft_long_err_period;
} else {
f->uf_retry = ufsfx_tune.uft_long_err_period;
- cmn_err(CE_WARN,
- "Repair of %s is not timely; operator attention is required.",
- fs_name(f));
+ cmn_err(CE_WARN, "Repair of %s is not timely; "
+ "operator attention is required.",
+ fs_name(f));
}
TRIVIA(("] "));
return (rc);
@@ -1797,8 +1794,8 @@ sf_found_lock_fix_cmn(ufs_failure_t *f, ufs_failure_states_t s)
if (time > f->uf_entered_tm + toolong) {
cmn_err(CE_WARN,
-"Repair completion timeout exceeded on %s; manual fsck may be required",
- fs_name(f));
+ "Repair completion timeout exceeded on %s; "
+ "manual fsck may be required", fs_name(f));
f->uf_retry = ufsfx_tune.uft_long_err_period;
}
}
@@ -1881,7 +1878,7 @@ sf_term_cmn(ufs_failure_t *f, ufsa_t a, ufs_failure_states_t s)
sfrc_t rc = SFRC_FAIL;
TRIVIA(("[sf_term_cmn, action is %s, state is %s",
- act_name(a), state_name(s)));
+ act_name(a), state_name(s)));
ASSERT(s & (UF_FIXED | UF_NOTFIX | UF_REPLICA));
ASSERT(terminal_state(s));
@@ -1895,7 +1892,8 @@ sf_term_cmn(ufs_failure_t *f, ufsa_t a, ufs_failure_states_t s)
switch (s) {
case UF_NOTFIX:
case UF_FIXED:
- { int need_lock_vfs;
+ {
+ int need_lock_vfs;
if (f->uf_ufsvfsp && f->uf_vfs_lockp)
need_lock_vfs = !MUTEX_HELD(f->uf_vfs_lockp);
@@ -1919,7 +1917,7 @@ sf_term_cmn(ufs_failure_t *f, ufsa_t a, ufs_failure_states_t s)
mutex_exit(f->uf_vfs_lockp);
cmn_err(CE_NOTE, (s & UF_NOTFIX)? "Could not fix %s":
- "%s is now accessible", fs_name(f));
+ "%s is now accessible", fs_name(f));
if (s & UF_FIXED) {
mutex_enter(&uf_stats.ufst_mutex);
@@ -1939,7 +1937,8 @@ sf_term_cmn(ufs_failure_t *f, ufsa_t a, ufs_failure_states_t s)
/* not actually a replica? */
if (f->uf_vfs_ufsfxp && f->uf_vfs_ufsfxp->fx_current &&
f->uf_vfs_ufsfxp->fx_current != f &&
- !terminal_state(f->uf_vfs_ufsfxp->fx_current->uf_s)) {
+ !terminal_state(
+ f->uf_vfs_ufsfxp->fx_current->uf_s)) {
f->uf_orig = f->uf_vfs_ufsfxp->fx_current;
f->uf_retry = 0;
@@ -1999,7 +1998,7 @@ sf_panic(
sfrc_t rc = SFRC_FAIL;
TRIVIA(("[sf_panic, action is %s, prev. state is %s",
- act_name(a), state_name(f->uf_s)));
+ act_name(a), state_name(f->uf_s)));
ASSERT(s & UF_PANIC);
switch (a) {
@@ -2161,10 +2160,9 @@ set_lockfs(ufs_failure_t *f, struct lockfs *lfp)
if (!LOCKFS_IS_ELOCK(lfp)) {
lfp->lf_lock = f->uf_lf.lf_lock = LOCKFS_ELOCK;
VN_HOLD(f->uf_ufsvfsp->vfs_root);
- f->uf_lf_err = ufs__fiolfs(f->uf_ufsvfsp->vfs_root,
- &f->uf_lf,
- /* from_user */ 0,
- /* from_log */ 0);
+ f->uf_lf_err =
+ ufs__fiolfs(f->uf_ufsvfsp->vfs_root,
+ &f->uf_lf, /* from_user */ 0, /* from_log */ 0);
VN_RELE(f->uf_ufsvfsp->vfs_root);
}
@@ -2201,10 +2199,8 @@ lockfs_failure(ufs_failure_t *f)
/* onto this fs can cause this errno. */
MINOR(("ufs_fiolfs(\"%s\") of %s failed: %s (%d)",
- fs_name(f),
- lock_name(&f->uf_lf),
- err_name(error),
- error));
+ fs_name(f), lock_name(&f->uf_lf),
+ err_name(error), error));
/*
* if can't get lock, then fallback to panic, unless
@@ -2213,8 +2209,8 @@ lockfs_failure(ufs_failure_t *f)
* anyway
*/
- s = ((f->uf_flags & UFSFX_LCKUMOUNT) && error != EDEADLK)?
- UF_UMOUNT: UF_PANIC;
+ s = ((f->uf_flags & UFSFX_LCKUMOUNT) && error != EDEADLK) ?
+ UF_UMOUNT: UF_PANIC;
if (!set_state(f, s)) {
real_panic(f, " ");
@@ -2247,10 +2243,8 @@ lockfs_failure(ufs_failure_t *f)
default: /* some other non-fatal error */
MINOR(("lockfs(\"%s\") of %s returned %s (%d)",
- lock_name(&f->uf_lf),
- fs_name(f),
- err_name(f->uf_lf_err),
- f->uf_lf_err));
+ lock_name(&f->uf_lf), fs_name(f),
+ err_name(f->uf_lf_err), f->uf_lf_err));
f->uf_retry = ufsfx_tune.uft_short_err_period;
break;
@@ -2474,7 +2468,7 @@ dump_uf_list(char *msg)
printf("\n%s", msg);
}
printf("\ndump_uf_list:\n\tuq_lowat: %d, uq_ne: %d\n",
- ufs_fix.uq_lowat, ufs_fix.uq_ne);
+ ufs_fix.uq_lowat, ufs_fix.uq_ne);
mutex_enter(&uf_stats.ufst_mutex);
printf("\tuf_stats.current_races: %ld\n", uf_stats.ufst_current_races);
@@ -2482,7 +2476,7 @@ dump_uf_list(char *msg)
printf("\tuf_stats.num_fixed: %ld\n", uf_stats.ufst_num_fixed);
printf("\tuf_stats.cpu_waste: %ld\n", uf_stats.ufst_cpu_waste);
printf("\tuf_stats.lock_violations: %ld, unmount_failures: %ld\n",
- uf_stats.ufst_lock_violations, uf_stats.ufst_unmount_failures);
+ uf_stats.ufst_lock_violations, uf_stats.ufst_unmount_failures);
mutex_exit(&uf_stats.ufst_mutex);
for (f = ufs_fix.uq_ufhead, i = 1; f; f = f->uf_next, i++) {
@@ -2512,17 +2506,17 @@ dump_uf(ufs_failure_t *f, int i)
}
printf("%d.\t\"%s\" is %s.\n",
- i, fs_name(f), state_name(f->uf_s));
+ i, fs_name(f), state_name(f->uf_s));
printf("\t\"%s\"\tAddr: 0x%p\n", f->uf_panic_str, (void *)f);
printf("\tNext: 0x%p\t\tPrev: 0x%p\n",
- (void *)f->uf_next, (void *)f->uf_prev);
+ (void *)f->uf_next, (void *)f->uf_prev);
if (f->uf_orig)
printf("\tOriginal failure: 0x%p \"%s\"\n",
(void *)f->uf_orig, f->uf_orig->uf_panic_str);
printf("\tUfsvfs: 0x%p\t\tVfs_lockp: 0x%p\n",
- (void *)f->uf_ufsvfsp, (void *)f->uf_vfs_lockp);
+ (void *)f->uf_ufsvfsp, (void *)f->uf_vfs_lockp);
printf("\tVfs_fsfxp: 0x%p\n", (void *)f->uf_vfs_ufsfxp);
printf("\tVfs_bufp: 0x%p", (void *)f->uf_bp);
@@ -2535,16 +2529,15 @@ dump_uf(ufs_failure_t *f, int i)
f->uf_begin_tm, f->uf_entered_tm, f->uf_end_tm);
printf("\tFlags: (%d) %s%s%s%s", f->uf_flags,
- f->uf_flags & UFSFX_LCKONLY? "\"lock only\" " : "",
- f->uf_flags & UFSFX_LCKUMOUNT? "\"lock+unmount\" " : "",
- f->uf_flags & UFSFX_REPAIR_START? "\"started repair\" " : "",
- f->uf_flags == 0? "<none>" : "");
+ f->uf_flags & UFSFX_LCKONLY? "\"lock only\" " : "",
+ f->uf_flags & UFSFX_LCKUMOUNT? "\"lock+unmount\" " : "",
+ f->uf_flags & UFSFX_REPAIR_START? "\"started repair\" " : "",
+ f->uf_flags == 0? "<none>" : "");
printf("\tRetry: %ld seconds\n", f->uf_retry);
printf("\tLockfs:\ttype: %s\terror: %s (%d)\n",
- lock_name(&f->uf_lf),
- err_name(f->uf_lf_err), f->uf_lf_err);
+ lock_name(&f->uf_lf), err_name(f->uf_lf_err), f->uf_lf_err);
}
#endif /* DEBUG */
@@ -2584,7 +2577,7 @@ ufsfx_get_failure_qlen(void)
}
MINUTE((": found: %s, \"%s: %s\"\n",
- fs_name(f), state_name(f->uf_s), f->uf_panic_str));
+ fs_name(f), state_name(f->uf_s), f->uf_panic_str));
qlen++;
mutex_exit(&f->uf_mutex);
diff --git a/usr/src/uts/common/fs/ufs/ufs_subr.c b/usr/src/uts/common/fs/ufs/ufs_subr.c
index 760b7164cd..f6daee5dc1 100644
--- a/usr/src/uts/common/fs/ufs/ufs_subr.c
+++ b/usr/src/uts/common/fs/ufs/ufs_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.
*/
@@ -66,7 +65,6 @@
#include <sys/fs/ufs_bio.h>
#include <sys/fs/ufs_log.h>
#include <sys/kmem.h>
-#include <sys/vtrace.h>
#include <sys/policy.h>
#include <vm/hat.h>
#include <vm/as.h>
@@ -316,8 +314,7 @@ ufs_update(int flag)
mutex_exit(&ufsp->vfs_lock);
vfs_unlock(vfsp);
(void) ufs_fault(ufsp->vfs_root,
- "fs = %s update: ro fs mod\n",
- fs->fs_fsmnt);
+ "fs = %s update: ro fs mod\n", fs->fs_fsmnt);
/*
* XXX: Why is this a return instead of a continue?
* This may be an attempt to replace a panic with
@@ -378,7 +375,7 @@ ufs_update(int flag)
error);
if (!error) {
TRANS_END_SYNC(ufsp, error, TOP_COMMIT_UPDATE,
- TOP_COMMIT_SIZE);
+ TOP_COMMIT_SIZE);
}
curthread->t_flag &= ~T_DONTBLOCK;
@@ -468,10 +465,6 @@ ufs_syncip(struct inode *ip, int flags, int waitfor, top_t topid)
struct ufsvfs *ufsvfsp = ip->i_ufsvfs;
int dotrans = 0;
- TRACE_3(TR_FAC_UFS, TR_UFS_SYNCIP_START,
- "ufs_syncip_start:vp %p flags %x waitfor %x",
- vp, flags, waitfor);
-
/*
* Return if file system has been forcibly umounted.
*/
@@ -490,7 +483,7 @@ ufs_syncip(struct inode *ip, int flags, int waitfor, top_t topid)
* could include meta data changes.
*/
if ((ip->i_mode & IFMT) == IFSHAD ||
- ufsvfsp->vfs_qinod == ip) {
+ ufsvfsp->vfs_qinod == ip) {
dotrans = 1;
curthread->t_flag |= T_DONTBLOCK;
TRANS_BEGIN_ASYNC(ufsvfsp, TOP_PUTPAGE,
@@ -569,10 +562,6 @@ ufs_syncip(struct inode *ip, int flags, int waitfor, top_t topid)
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_SYNCIP_END,
- "ufs_syncip_end:vp %p error %d",
- vp, error);
-
return (error);
}
/*
@@ -660,7 +649,7 @@ ufs_sync_indir(struct inode *ip)
continue;
blkflush(ip->i_dev, (daddr_t)fsbtodb(fs, indirect_blkno));
indirect_bp = UFS_BREAD(ufsvfsp, ip->i_dev,
- (daddr_t)fsbtodb(fs, indirect_blkno), bsize);
+ (daddr_t)fsbtodb(fs, indirect_blkno), bsize);
if (indirect_bp->b_flags & B_ERROR) {
brelse(indirect_bp);
brelse(bp);
@@ -744,7 +733,7 @@ ufs_indirblk_sync(struct inode *ip, offset_t off)
for (; j < NIADDR; j++) {
ob = nb;
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, fsbtodb(fs, ob), fs->fs_bsize);
+ ip->i_dev, fsbtodb(fs, ob), fs->fs_bsize);
if (bp->b_flags & B_ERROR) {
brelse(bp);
return (EIO);
@@ -933,9 +922,9 @@ ufs_checkclean(struct vfs *vfsp)
* isreclaim == TRUE means can't change the state of fs_reclaim
*/
isreclaim =
- ((fs->fs_clean == FSLOG) &&
- (((fs->fs_reclaim & FS_RECLAIM) == 0) ||
- (fs->fs_reclaim & FS_RECLAIMING)));
+ ((fs->fs_clean == FSLOG) &&
+ (((fs->fs_reclaim & FS_RECLAIM) == 0) ||
+ (fs->fs_reclaim & FS_RECLAIMING)));
/*
* if fs is busy or can't change the state of fs_reclaim; do nothing
@@ -1094,13 +1083,13 @@ ufs_fbiwrite(struct fbuf *fbp, struct inode *ip, daddr_t bn, long bsize)
if (ifmt == IFDIR || ifmt == IFSHAD || ifmt == IFATTRDIR ||
(ip->i_ufsvfs->vfs_qinod == ip)) {
TRANS_DELTA(ufsvfsp, ldbtob(bn * (offset_t)(btod(bsize))),
- fbp->fb_count, DT_FBI, 0, 0);
+ fbp->fb_count, DT_FBI, 0, 0);
}
/*
* Inlined version of fbiwrite()
*/
bp = pageio_setup((struct page *)NULL, fbp->fb_count,
- ip->i_devvp, B_WRITE);
+ ip->i_devvp, B_WRITE);
bp->b_flags &= ~B_PAGEIO;
bp->b_un.b_addr = fbp->fb_addr;
@@ -1156,8 +1145,8 @@ ufs_sbwrite(struct ufsvfs *ufsvfsp)
* checksum to force repair
*/
fs->fs_time = gethrestime_sec();
- fs->fs_state = fs->fs_clean != FSBAD? FSOKAY - fs->fs_time:
- -(FSOKAY - fs->fs_time);
+ fs->fs_state = (fs->fs_clean != FSBAD) ?
+ FSOKAY - fs->fs_time : -(FSOKAY - fs->fs_time);
switch (fs->fs_clean) {
case FSCLEAN:
case FSSTABLE:
@@ -1181,7 +1170,7 @@ ufs_sbwrite(struct ufsvfs *ufsvfsp)
* delta the whole superblock
*/
TRANS_DELTA(ufsvfsp, ldbtob(SBLOCK), sizeof (struct fs),
- DT_SB, NULL, 0);
+ DT_SB, NULL, 0);
/*
* retain the incore state of fs_fmod; set the ondisk state to 0
*/
@@ -1522,7 +1511,7 @@ isblock(struct fs *fs, uchar_t *cp, daddr_t h)
uchar_t mask;
ASSERT(fs->fs_frag == 8 || fs->fs_frag == 4 || fs->fs_frag == 2 || \
- fs->fs_frag == 1);
+ fs->fs_frag == 1);
/*
* ufsvfsp->vfs_lock is held when calling this.
*/
@@ -1541,7 +1530,7 @@ isblock(struct fs *fs, uchar_t *cp, daddr_t h)
default:
#ifndef _KERNEL
cmn_err(CE_PANIC, "isblock: illegal fs->fs_frag value (%d)",
- fs->fs_frag);
+ fs->fs_frag);
#endif /* _KERNEL */
return (0);
}
@@ -1554,7 +1543,7 @@ void
clrblock(struct fs *fs, uchar_t *cp, daddr_t h)
{
ASSERT(fs->fs_frag == 8 || fs->fs_frag == 4 || fs->fs_frag == 2 || \
- fs->fs_frag == 1);
+ fs->fs_frag == 1);
/*
* ufsvfsp->vfs_lock is held when calling this.
*/
@@ -1574,7 +1563,7 @@ clrblock(struct fs *fs, uchar_t *cp, daddr_t h)
default:
#ifndef _KERNEL
cmn_err(CE_PANIC, "clrblock: illegal fs->fs_frag value (%d)",
- fs->fs_frag);
+ fs->fs_frag);
#endif /* _KERNEL */
return;
}
@@ -1608,7 +1597,7 @@ isclrblock(struct fs *fs, uchar_t *cp, daddr_t h)
default:
#ifndef _KERNEL
cmn_err(CE_PANIC, "isclrblock: illegal fs->fs_frag value (%d)",
- fs->fs_frag);
+ fs->fs_frag);
#endif /* _KERNEL */
break;
}
@@ -1622,7 +1611,7 @@ void
setblock(struct fs *fs, uchar_t *cp, daddr_t h)
{
ASSERT(fs->fs_frag == 8 || fs->fs_frag == 4 || fs->fs_frag == 2 || \
- fs->fs_frag == 1);
+ fs->fs_frag == 1);
/*
* ufsvfsp->vfs_lock is held when calling this.
*/
@@ -1642,7 +1631,7 @@ setblock(struct fs *fs, uchar_t *cp, daddr_t h)
default:
#ifndef _KERNEL
cmn_err(CE_PANIC, "setblock: illegal fs->fs_frag value (%d)",
- fs->fs_frag);
+ fs->fs_frag);
#endif /* _KERNEL */
return;
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_thread.c b/usr/src/uts/common/fs/ufs/ufs_thread.c
index 36256db6ac..ab5bd32bee 100644
--- a/usr/src/uts/common/fs/ufs/ufs_thread.c
+++ b/usr/src/uts/common/fs/ufs/ufs_thread.c
@@ -262,7 +262,7 @@ ufs_delete(struct ufsvfs *ufsvfsp, struct inode *ip, int dolockfs)
* not on a trans device or not part of a transaction
*/
ASSERT(!TRANS_ISTRANS(ufsvfsp) ||
- ((curthread->t_flag & T_DONTBLOCK) == 0));
+ ((curthread->t_flag & T_DONTBLOCK) == 0));
/*
* Ignore if deletes are not allowed (wlock/hlock)
@@ -402,8 +402,8 @@ ufs_delete(struct ufsvfs *ufsvfsp, struct inode *ip, int dolockfs)
* release quota resources; can't fail
*/
(void) chkiq((struct ufsvfs *)vp->v_vfsp->vfs_data,
- /* change */ -1, ip, (uid_t)ip->i_uid, 0, CRED(),
- (char **)NULL, (size_t *)NULL);
+ /* change */ -1, ip, (uid_t)ip->i_uid, 0, CRED(),
+ (char **)NULL, (size_t *)NULL);
dqrele(ip->i_dquot);
ip->i_dquot = NULL;
ip->i_flag &= ~(IDEL | IDIRECTIO);
@@ -626,7 +626,7 @@ ufs_delete_drain_wait(struct ufsvfs *ufsvfsp, int dolockfs)
TRANS_BEGIN_SYNC(ufsvfsp, TOP_COMMIT_UPDATE, TOP_COMMIT_SIZE, error);
if (!error) {
TRANS_END_SYNC(ufsvfsp, error, TOP_COMMIT_UPDATE,
- TOP_COMMIT_SIZE);
+ TOP_COMMIT_SIZE);
}
curthread->t_flag &= ~T_DONTBLOCK;
}
@@ -706,9 +706,8 @@ ufs_idle_free(struct inode *ip)
if ((ip->i_flag & ISTALE) == 0) {
(void) TRANS_SYNCIP(ip, B_ASYNC, I_ASYNC, TOP_SYNCIP_FREE);
(void) TRANS_SYNCIP(ip,
- (TRANS_ISERROR(ufsvfsp)) ?
- B_INVAL | B_FORCE : B_INVAL,
- I_ASYNC, TOP_SYNCIP_FREE);
+ (TRANS_ISERROR(ufsvfsp)) ? B_INVAL | B_FORCE : B_INVAL,
+ I_ASYNC, TOP_SYNCIP_FREE);
}
/*
@@ -730,20 +729,20 @@ ufs_idle_free(struct inode *ip)
if (vp->v_count < 2)
cmn_err(CE_PANIC,
- "ufs_idle_free: vnode ref count is less than 2");
+ "ufs_idle_free: vnode ref count is less than 2");
vp->v_count--;
if ((vp->v_type != VCHR && vn_has_cached_data(vp)) ||
- vp->v_count != 1 ||
- ip->i_flag & (IMOD|IMODACC|IACC|ICHG|IUPD|IATTCHG)) {
- /*
- * Another thread has referenced this inode while
- * we are trying to free it. Call VN_RELE() to
- * release our reference.
- */
- mutex_exit(&vp->v_lock);
- mutex_exit(ihm);
- VN_RELE(vp);
+ vp->v_count != 1 ||
+ ip->i_flag & (IMOD|IMODACC|IACC|ICHG|IUPD|IATTCHG)) {
+ /*
+ * Another thread has referenced this inode while
+ * we are trying to free it. Call VN_RELE() to
+ * release our reference.
+ */
+ mutex_exit(&vp->v_lock);
+ mutex_exit(ihm);
+ VN_RELE(vp);
} else {
/*
* The inode is currently unreferenced and can not
@@ -1093,7 +1092,7 @@ again:
if (bp)
brelse(bp);
bp = UFS_BREAD(ufsvfsp,
- ufsvfsp->vfs_dev, bno, fs->fs_bsize);
+ ufsvfsp->vfs_dev, bno, fs->fs_bsize);
bp->b_flags |= B_AGE;
}
if (bp->b_flags & B_ERROR) {
@@ -1179,8 +1178,7 @@ ufs_thread_hlock(void *ignore)
mutex_enter(&ufs_hlock.uq_mutex);
CALLB_CPR_SAFE_BEGIN(&cprinfo);
(void) cv_timedwait(&ufs_hlock.uq_cv,
- &ufs_hlock.uq_mutex,
- lbolt + hz);
+ &ufs_hlock.uq_mutex, lbolt + hz);
CALLB_CPR_SAFE_END(&cprinfo,
&ufs_hlock.uq_mutex);
mutex_exit(&ufs_hlock.uq_mutex);
diff --git a/usr/src/uts/common/fs/ufs/ufs_trans.c b/usr/src/uts/common/fs/ufs/ufs_trans.c
index 9724665e79..1d92899c71 100644
--- a/usr/src/uts/common/fs/ufs/ufs_trans.c
+++ b/usr/src/uts/common/fs/ufs/ufs_trans.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.
*/
@@ -223,8 +222,8 @@ ufs_trans_push_si(ufsvfs_t *ufsvfsp, delta_t dtyp, int ignore)
fs = ufsvfsp->vfs_fs;
mutex_enter(&ufsvfsp->vfs_lock);
TRANS_LOG(ufsvfsp, (char *)fs->fs_u.fs_csp,
- ldbtob(fsbtodb(fs, fs->fs_csaddr)), fs->fs_cssize,
- (caddr_t)fs->fs_u.fs_csp, fs->fs_cssize);
+ ldbtob(fsbtodb(fs, fs->fs_csaddr)), fs->fs_cssize,
+ (caddr_t)fs->fs_u.fs_csp, fs->fs_cssize);
mutex_exit(&ufsvfsp->vfs_lock);
return (0);
}
@@ -363,7 +362,7 @@ void
ufs_trans_mata_si(struct ufsvfs *ufsvfsp, struct fs *fs)
{
TRANS_MATAADD(ufsvfsp, ldbtob(fsbtodb(fs, fs->fs_csaddr)),
- fs->fs_cssize);
+ fs->fs_cssize);
}
/*
@@ -772,7 +771,7 @@ ufs_trans_trunc_resv(
resid = size;
nchunks = 1;
for (; (resv = ufs_log_amt(ip, offset, resid, 1)) > ufs_trans_max_resv;
- offset = length + (nchunks - 1) * resid) {
+ offset = length + (nchunks - 1) * resid) {
nchunks++;
resid = size / nchunks;
}
@@ -954,7 +953,7 @@ ufs_trans_write_resv(
resid = uio->uio_resid;
nchunks = 1;
for (; (resv = ufs_log_amt(ip, offset, resid, 0)) > ufs_trans_max_resv;
- offset = uio->uio_offset + (nchunks - 1) * resid) {
+ offset = uio->uio_offset + (nchunks - 1) * resid) {
nchunks++;
resid = uio->uio_resid / nchunks;
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_vfsops.c b/usr/src/uts/common/fs/ufs/ufs_vfsops.c
index 35c4e309f0..23c2d1798a 100644
--- a/usr/src/uts/common/fs/ufs/ufs_vfsops.c
+++ b/usr/src/uts/common/fs/ufs/ufs_vfsops.c
@@ -484,7 +484,7 @@ ufs_mountroot(struct vfs *vfsp, enum whymountroot why)
vp = ((struct ufsvfs *)vfsp->vfs_data)->vfs_devvp;
(void) VOP_CLOSE(vp, FREAD|FWRITE, 1,
- (offset_t)0, CRED());
+ (offset_t)0, CRED());
return (0);
}
error = vfs_lock(vfsp);
@@ -499,7 +499,7 @@ ufs_mountroot(struct vfs *vfsp, enum whymountroot why)
error = VOP_OPEN(&devvp, FREAD|FWRITE, CRED());
if (error == 0) {
(void) VOP_CLOSE(devvp, FREAD|FWRITE, 1,
- (offset_t)0, CRED());
+ (offset_t)0, CRED());
} else {
doclkset = 0;
}
@@ -610,7 +610,7 @@ remountfs(struct vfs *vfsp, dev_t dev, void *raw_argsp, int args_len)
#define BOOT_TIME_LIMIT (180*hz)
if (!(flags & UFSMNT_ONERROR_FLGMASK) && lbolt < BOOT_TIME_LIMIT) {
cmn_err(CE_WARN, "%s is required to be mounted onerror=%s",
- ufsvfsp->vfs_fs->fs_fsmnt, UFSMNT_ONERROR_PANIC_STR);
+ ufsvfsp->vfs_fs->fs_fsmnt, UFSMNT_ONERROR_PANIC_STR);
flags |= UFSMNT_ONERROR_PANIC;
}
@@ -633,11 +633,11 @@ remountfs(struct vfs *vfsp, dev_t dev, void *raw_argsp, int args_len)
if (((fspt->fs_magic != FS_MAGIC) &&
(fspt->fs_magic != MTB_UFS_MAGIC)) ||
(fspt->fs_magic == FS_MAGIC &&
- (fspt->fs_version != UFS_EFISTYLE4NONEFI_VERSION_2 &&
- fspt->fs_version != UFS_VERSION_MIN)) ||
+ (fspt->fs_version != UFS_EFISTYLE4NONEFI_VERSION_2 &&
+ fspt->fs_version != UFS_VERSION_MIN)) ||
(fspt->fs_magic == MTB_UFS_MAGIC &&
- (fspt->fs_version > MTB_UFS_VERSION_1 ||
- fspt->fs_version < MTB_UFS_VERSION_MIN)) ||
+ (fspt->fs_version > MTB_UFS_VERSION_1 ||
+ fspt->fs_version < MTB_UFS_VERSION_MIN)) ||
fspt->fs_bsize > MAXBSIZE || fspt->fs_frag > MAXFRAG ||
fspt->fs_bsize < sizeof (struct fs) || fspt->fs_bsize < PAGESIZE) {
tpt->b_flags |= B_STALE | B_AGE;
@@ -725,7 +725,7 @@ remountfs(struct vfs *vfsp, dev_t dev, void *raw_argsp, int args_len)
fsp->fs_reclaim &= ~FS_RECLAIM;
fsp->fs_reclaim |= FS_RECLAIMING;
ufs_thread_start(&ufsvfsp->vfs_reclaim,
- ufs_thread_reclaim, vfsp);
+ ufs_thread_reclaim, vfsp);
}
}
@@ -913,8 +913,8 @@ mountfs(struct vfs *vfsp, enum whymountroot why, struct vnode *devvp,
ufsvfsp->vfs_bufp = tp;
ufsvfsp->vfs_dirsize = INODESIZE + (4 * ALLOCSIZE) + fsp->fs_fsize;
- ufsvfsp->vfs_minfrags = (int)((int64_t)fsp->fs_dsize *
- fsp->fs_minfree / 100);
+ ufsvfsp->vfs_minfrags =
+ (int)((int64_t)fsp->fs_dsize * fsp->fs_minfree / 100);
/*
* if mount allows largefiles, indicate so in ufsvfs
*/
@@ -942,8 +942,7 @@ mountfs(struct vfs *vfsp, enum whymountroot why, struct vnode *devvp,
*/
if (!(vfsp->vfs_flag & VFS_RDONLY)) {
cmn_err(CE_WARN, "Error accessing ufs "
- "log for %s; Please run fsck(1M)",
- path);
+ "log for %s; Please run fsck(1M)", path);
goto out;
}
}
@@ -1021,7 +1020,7 @@ mountfs(struct vfs *vfsp, enum whymountroot why, struct vnode *devvp,
if ((TRANS_ISERROR(ufsvfsp)) ||
(((fsp->fs_state + fsp->fs_time) == FSOKAY) &&
- fsp->fs_clean == FSLOG && !TRANS_ISTRANS(ufsvfsp))) {
+ fsp->fs_clean == FSLOG && !TRANS_ISTRANS(ufsvfsp))) {
ufsvfsp->vfs_log = NULL;
ufsvfsp->vfs_domatamap = 0;
error = ENOSPC;
@@ -1030,8 +1029,8 @@ mountfs(struct vfs *vfsp, enum whymountroot why, struct vnode *devvp,
if (((fsp->fs_state + fsp->fs_time) == FSOKAY) &&
(fsp->fs_clean == FSCLEAN ||
- fsp->fs_clean == FSSTABLE ||
- fsp->fs_clean == FSLOG))
+ fsp->fs_clean == FSSTABLE ||
+ fsp->fs_clean == FSLOG))
fsp->fs_clean = FSSTABLE;
else {
if (isroot) {
@@ -1185,7 +1184,7 @@ mountfs(struct vfs *vfsp, enum whymountroot why, struct vnode *devvp,
* read only.
*/
if (!fsp->fs_ronly && (fsp->fs_reclaim &
- (FS_RECLAIM|FS_RECLAIMING))) {
+ (FS_RECLAIM|FS_RECLAIMING))) {
fsp->fs_reclaim &= ~FS_RECLAIM;
fsp->fs_reclaim |= FS_RECLAIMING;
ufs_thread_start(&ufsvfsp->vfs_reclaim,
@@ -1282,8 +1281,8 @@ out:
rip->i_flag |= ISTALE;
mutex_exit(&rip->i_tlock);
cmn_err(CE_WARN,
- "Timed out while cleaning up after failed mount of %s",
- path);
+ "Timed out while cleaning up after "
+ "failed mount of %s", path);
} else {
/*
@@ -1473,8 +1472,8 @@ ufs_unmount(struct vfs *vfsp, int fflag, struct cred *cr)
for (i = 0, ih = ihead; i < inohsz; i++, ih++) {
mutex_enter(&ih_lock[i]);
for (ip = ih->ih_chain[0];
- ip != (struct inode *)ih;
- ip = ip->i_forw) {
+ ip != (struct inode *)ih;
+ ip = ip->i_forw) {
if (ip->i_ufsvfs != ufsvfsp)
continue;
if (ip == ufsvfsp->vfs_qinod)
@@ -1524,8 +1523,8 @@ ufs_unmount(struct vfs *vfsp, int fflag, struct cred *cr)
for (i = 0, ih = ihead; i < inohsz; i++, ih++) {
mutex_enter(&ih_lock[i]);
for (inext = 0, ip = ih->ih_chain[0];
- ip != (struct inode *)ih;
- ip = inext) {
+ ip != (struct inode *)ih;
+ ip = inext) {
inext = ip->i_forw;
if (ip->i_ufsvfs != ufsvfsp)
continue;
@@ -1690,7 +1689,7 @@ out:
ufs_thread_continue(&ufsvfsp->vfs_delete);
/* restart the reclaim thread */
ufs_thread_start(&ufsvfsp->vfs_reclaim, ufs_thread_reclaim,
- vfsp);
+ vfsp);
/* coordinate with global hlock thread */
ufsvfsp->vfs_validfs = UT_MOUNTED;
/* check for trans errors during umount */
@@ -1878,8 +1877,7 @@ ufs_sync(struct vfs *vfsp, short flag, struct cred *cr)
mutex_exit(&ufsvfsp->vfs_lock);
vfs_unlock(vfsp);
return (ufs_fault(ufsvfsp->vfs_root,
- "fs = %s update: ro fs mod\n",
- fs->fs_fsmnt));
+ "fs = %s update: ro fs mod\n", fs->fs_fsmnt));
}
fs->fs_fmod = 0;
mutex_exit(&ufsvfsp->vfs_lock);
@@ -1952,8 +1950,8 @@ sbupdate(struct vfs *vfsp)
if (i + fs->fs_frag > blks)
size = (blks - i) * fs->fs_fsize;
bp = UFS_GETBLK(ufsvfsp, ufsvfsp->vfs_dev,
- (daddr_t)(fsbtodb(fs, fs->fs_csaddr + i)),
- fs->fs_bsize);
+ (daddr_t)(fsbtodb(fs, fs->fs_csaddr + i)),
+ fs->fs_bsize);
bcopy(space, bp->b_un.b_addr, size);
space += size;
bp->b_bcount = size;
@@ -2148,8 +2146,8 @@ ufs_remountroot(struct vfs *vfsp)
for (i = 0, ih = ihead; i < inohsz; i++, ih++) {
mutex_enter(&ih_lock[i]);
for (ip = ih->ih_chain[0];
- ip != (struct inode *)ih;
- ip = ip->i_forw) {
+ ip != (struct inode *)ih;
+ ip = ip->i_forw) {
if (ip->i_ufsvfs != ufsvfsp)
continue;
if (ip == ufsvfsp->vfs_qinod)
@@ -2219,20 +2217,20 @@ ufs_remountroot(struct vfs *vfsp)
* Start the reclaim thread if needed.
*/
if (!fsp->fs_ronly && (fsp->fs_reclaim &
- (FS_RECLAIM|FS_RECLAIMING))) {
+ (FS_RECLAIM|FS_RECLAIMING))) {
fsp->fs_reclaim &= ~FS_RECLAIM;
fsp->fs_reclaim |= FS_RECLAIMING;
ufs_thread_start(&ufsvfsp->vfs_reclaim,
- ufs_thread_reclaim, vfsp);
+ ufs_thread_reclaim, vfsp);
TRANS_SBWRITE(ufsvfsp, TOP_SBUPDATE_UPDATE);
if (sberror = geterror(ufsvfsp->vfs_bufp)) {
refstr_t *mntpt;
mntpt = vfs_getmntpoint(vfsp);
cmn_err(CE_WARN,
- "Remountroot failed to update Reclaim"
- "state for filesystem %s "
- "Error writing SuperBlock %d",
- refstr_value(mntpt), error);
+ "Remountroot failed to update Reclaim"
+ "state for filesystem %s "
+ "Error writing SuperBlock %d",
+ refstr_value(mntpt), error);
refstr_rele(mntpt);
}
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_vnops.c b/usr/src/uts/common/fs/ufs/ufs_vnops.c
index d8f3f9aa1a..fe903b11e9 100644
--- a/usr/src/uts/common/fs/ufs/ufs_vnops.c
+++ b/usr/src/uts/common/fs/ufs/ufs_vnops.c
@@ -63,7 +63,6 @@
#include <sys/debug.h>
#include <sys/vmsystm.h>
#include <sys/cmn_err.h>
-#include <sys/vtrace.h>
#include <sys/filio.h>
#include <sys/policy.h>
@@ -249,7 +248,6 @@ static struct dump *dump_info = NULL;
static int
ufs_open(struct vnode **vpp, int flag, struct cred *cr)
{
- TRACE_1(TR_FAC_UFS, TR_UFS_OPEN, "ufs_open:vpp %p", vpp);
return (0);
}
@@ -258,8 +256,6 @@ static int
ufs_close(struct vnode *vp, int flag, int count, offset_t offset,
struct cred *cr)
{
- TRACE_1(TR_FAC_UFS, TR_UFS_CLOSE, "ufs_close:vp %p", vp);
-
cleanlocks(vp, ttoproc(curthread)->p_pid, 0);
cleanshares(vp, ttoproc(curthread)->p_pid);
@@ -274,7 +270,7 @@ ufs_close(struct vnode *vp, int flag, int count, offset_t offset,
if (ip->i_delaylen) {
ins.in_poc.value.ul++;
(void) ufs_putpages(vp, ip->i_delayoff, ip->i_delaylen,
- B_ASYNC | B_FREE, cr);
+ B_ASYNC | B_FREE, cr);
ip->i_delaylen = 0;
}
}
@@ -294,9 +290,6 @@ ufs_read(struct vnode *vp, struct uio *uiop, int ioflag, struct cred *cr,
int intrans = 0;
ASSERT(RW_READ_HELD(&ip->i_rwlock));
- TRACE_3(TR_FAC_UFS, TR_UFS_READ_START,
- "ufs_read_start:vp %p uiop %p ioflag %x",
- vp, uiop, ioflag);
/*
* Mandatory locking needs to be done before ufs_lockfs_begin()
@@ -307,7 +300,7 @@ ufs_read(struct vnode *vp, struct uio *uiop, int ioflag, struct cred *cr,
* ufs_getattr ends up being called by chklock
*/
error = chklock(vp, FREAD, uiop->uio_loffset,
- uiop->uio_resid, uiop->uio_fmode, ct);
+ uiop->uio_resid, uiop->uio_fmode, ct);
if (error)
goto out;
}
@@ -379,8 +372,6 @@ ufs_read(struct vnode *vp, struct uio *uiop, int ioflag, struct cred *cr,
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_READ_END,
- "ufs_read_end:vp %p error %d", vp, error);
return (error);
}
@@ -410,11 +401,11 @@ ufs_check_rewrite(struct inode *ip, struct uio *uiop, int ioflag)
* checked for sanity, so assume nothing.
*/
return (((ip->i_mode & IFMT) == IFREG) && !(ioflag & FAPPEND) &&
- (uiop->uio_loffset >= (offset_t)0) &&
- (uiop->uio_loffset < ip->i_size) && (uiop->uio_resid > 0) &&
- ((ip->i_size - uiop->uio_loffset) >= uiop->uio_resid) &&
- !(ioflag & FSYNC) && !bmap_has_holes(ip) &&
- shared_write);
+ (uiop->uio_loffset >= (offset_t)0) &&
+ (uiop->uio_loffset < ip->i_size) && (uiop->uio_resid > 0) &&
+ ((ip->i_size - uiop->uio_loffset) >= uiop->uio_resid) &&
+ !(ioflag & FSYNC) && !bmap_has_holes(ip) &&
+ shared_write);
}
/*ARGSUSED*/
@@ -432,10 +423,6 @@ ufs_write(struct vnode *vp, struct uio *uiop, int ioflag, cred_t *cr,
int rewriteflg;
long start_resid = uiop->uio_resid;
- TRACE_3(TR_FAC_UFS, TR_UFS_WRITE_START,
- "ufs_write_start:vp %p uiop %p ioflag %x",
- vp, uiop, ioflag);
-
ASSERT(RW_LOCK_HELD(&ip->i_rwlock));
retry_mandlock:
@@ -456,7 +443,7 @@ retry_mandlock:
* ufs_getattr ends up being called by chklock
*/
error = chklock(vp, FWRITE, uiop->uio_loffset,
- uiop->uio_resid, uiop->uio_fmode, ct);
+ uiop->uio_resid, uiop->uio_fmode, ct);
if (error)
goto out;
}
@@ -477,7 +464,7 @@ retry_mandlock:
rw_enter(&ip->i_contents, RW_READER);
error = ufs_directio_write(ip, uiop, ioflag, 1, cr,
- &directio_status);
+ &directio_status);
if (directio_status == DIRECTIO_SUCCESS) {
uint_t i_flag_save;
@@ -619,7 +606,7 @@ retry_mandlock:
int terr = 0;
TRANS_END_SYNC(ufsvfsp, terr, TOP_WRITE_SYNC,
- resv);
+ resv);
if (error == 0)
error = terr;
}
@@ -641,8 +628,6 @@ out:
if (error == ENOSPC && (start_resid != uiop->uio_resid))
error = 0;
- TRACE_2(TR_FAC_UFS, TR_UFS_WRITE_END,
- "ufs_write_end:vp %p error %d", vp, error);
return (error);
}
@@ -768,9 +753,6 @@ wrip(struct inode *ip, struct uio *uio, int ioflag, struct cred *cr)
fs = ip->i_fs;
- TRACE_1(TR_FAC_UFS, TR_UFS_RWIP_START,
- "ufs_wrip_start:vp %p", vp);
-
ASSERT(RW_WRITE_HELD(&ip->i_contents));
/* check for valid filetype */
@@ -790,9 +772,6 @@ wrip(struct inode *ip, struct uio *uio, int ioflag, struct cred *cr)
if (uio->uio_loffset >= limit) {
proc_t *p = ttoproc(curthread);
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_wrip_end:vp %p error %d", vp, EINVAL);
-
mutex_enter(&p->p_lock);
(void) rctl_action(rctlproc_legacy[RLIMIT_FSIZE], p->p_rctls,
p, RCA_UNSAFE_SIGINFO);
@@ -810,13 +789,9 @@ wrip(struct inode *ip, struct uio *uio, int ioflag, struct cred *cr)
limit = MIN(MAXOFF32_T, limit);
if (uio->uio_loffset < (offset_t)0) {
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_wrip_end:vp %p error %d", vp, EINVAL);
return (EINVAL);
}
if (uio->uio_resid == 0) {
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_wrip_end:vp %p error %d", vp, 0);
return (0);
}
@@ -835,13 +810,13 @@ wrip(struct inode *ip, struct uio *uio, int ioflag, struct cred *cr)
if (ip->i_flag & IDIRECTIO || ufsvfsp->vfs_forcedirectio) {
uio->uio_llimit = limit;
error = ufs_directio_write(ip, uio, ioflag, 0, cr,
- &directio_status);
+ &directio_status);
/*
* If ufs_directio wrote to the file or set the flags,
* we need to update i_seq, but it may be deferred.
*/
if (start_resid != uio->uio_resid ||
- (ip->i_flag & (ICHG|IUPD))) {
+ (ip->i_flag & (ICHG|IUPD))) {
i_seq_needed = 1;
ip->i_flag |= ISEQ;
}
@@ -868,7 +843,7 @@ wrip(struct inode *ip, struct uio *uio, int ioflag, struct cred *cr)
* and we possibly loop below, so save a few cycles.
*/
if ((type == IFSHAD) ||
- (rw_owner(&ufsvfsp->vfs_dqrwlock) == curthread)) {
+ (rw_owner(&ufsvfsp->vfs_dqrwlock) == curthread)) {
do_dqrwlock = 0;
} else {
do_dqrwlock = 1;
@@ -1012,11 +987,11 @@ wrip(struct inode *ip, struct uio *uio, int ioflag, struct cred *cr)
* with zeros.
*/
error = vpm_data_copy(vp, (off + mapon), (uint_t)n,
- uio, !pagecreate, &newpage, 0, S_WRITE);
+ uio, !pagecreate, &newpage, 0, S_WRITE);
} else {
base = segmap_getmapflt(segkmap, vp, (off + mapon),
- (uint_t)n, !pagecreate, S_WRITE);
+ (uint_t)n, !pagecreate, S_WRITE);
/*
* segmap_pagecreate() returns 1 if it calls
@@ -1311,7 +1286,7 @@ out:
* we have eliminated nosync
*/
if ((ip->i_flag & (IATTCHG|IBDWRITE)) ||
- ((ioflag & FSYNC) && iupdat_flag)) {
+ ((ioflag & FSYNC) && iupdat_flag)) {
ufs_iupdat(ip, 1);
}
}
@@ -1327,8 +1302,6 @@ out:
ip->i_flag &= ~(INOACC | ISYNC);
ITIMES_NOLOCK(ip);
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_wrip_end:vp %p error %d", vp, error);
return (error);
}
@@ -1354,9 +1327,6 @@ rdip(struct inode *ip, struct uio *uio, int ioflag, cred_t *cr)
vp = ITOV(ip);
- TRACE_1(TR_FAC_UFS, TR_UFS_RWIP_START,
- "ufs_rdip_start:vp %p", vp);
-
ASSERT(RW_LOCK_HELD(&ip->i_contents));
ufsvfsp = ip->i_ufsvfs;
@@ -1374,24 +1344,18 @@ rdip(struct inode *ip, struct uio *uio, int ioflag, cred_t *cr)
}
if (uio->uio_loffset > UFS_MAXOFFSET_T) {
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_rdip_end:vp %p error %d", vp, EINVAL);
error = 0;
goto out;
}
if (uio->uio_loffset < (offset_t)0) {
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_rdip_end:vp %p error %d", vp, EINVAL);
return (EINVAL);
}
if (uio->uio_resid == 0) {
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_rdip_end:vp %p error %d", vp, 0);
return (0);
}
if (!ULOCKFS_IS_NOIACC(ITOUL(ip)) && (fs->fs_ronly == 0) &&
- (!ufsvfsp->vfs_noatime)) {
+ (!ufsvfsp->vfs_noatime)) {
mutex_enter(&ip->i_tlock);
ip->i_flag |= IACC;
mutex_exit(&ip->i_tlock);
@@ -1414,7 +1378,7 @@ rdip(struct inode *ip, struct uio *uio, int ioflag, cred_t *cr)
mapon = (u_offset_t)(uoff & (offset_t)MAXBOFFSET);
on = (u_offset_t)blkoff(fs, uoff);
n = MIN((u_offset_t)fs->fs_bsize - on,
- (u_offset_t)uio->uio_resid);
+ (u_offset_t)uio->uio_resid);
diff = ip->i_size - uoff;
@@ -1465,10 +1429,10 @@ rdip(struct inode *ip, struct uio *uio, int ioflag, cred_t *cr)
* Copy data.
*/
error = vpm_data_copy(vp, (off + mapon), (uint_t)n,
- uio, 1, NULL, 0, S_READ);
+ uio, 1, NULL, 0, S_READ);
} else {
base = segmap_getmapflt(segkmap, vp, (off + mapon),
- (uint_t)n, 1, S_READ);
+ (uint_t)n, 1, S_READ);
error = uiomove(base + mapon, (long)n, UIO_READ, uio);
}
@@ -1484,7 +1448,7 @@ rdip(struct inode *ip, struct uio *uio, int ioflag, cred_t *cr)
if (dofree) {
flags = SM_FREE | SM_ASYNC;
if ((cache_read_ahead == 0) &&
- (off > smallfile2))
+ (off > smallfile2))
flags |= SM_DONTNEED;
}
/*
@@ -1546,8 +1510,6 @@ out:
error = 0;
ITIMES(ip);
- TRACE_2(TR_FAC_UFS, TR_UFS_RWIP_END,
- "ufs_rdip_end:vp %p error %d", vp, error);
return (error);
}
@@ -1589,14 +1551,14 @@ ufs_ioctl(
if (ulp) {
TRANS_BEGIN_ASYNC(ufsvfsp, TOP_QUOTA,
- TOP_SETQUOTA_SIZE(fs));
+ TOP_SETQUOTA_SIZE(fs));
}
error = quotactl(vp, arg, flag, cr);
if (ulp) {
TRANS_END_ASYNC(ufsvfsp, TOP_QUOTA,
- TOP_SETQUOTA_SIZE(fs));
+ TOP_SETQUOTA_SIZE(fs));
ufs_lockfs_end(ulp);
}
return (error);
@@ -1612,7 +1574,7 @@ ufs_ioctl(
if ((flag & DATAMODEL_MASK) == DATAMODEL_NATIVE) {
if (copyin((caddr_t)arg, &lockfs,
- sizeof (struct lockfs)))
+ sizeof (struct lockfs)))
return (EFAULT);
}
#ifdef _SYSCALL32_IMPL
@@ -1627,17 +1589,17 @@ ufs_ioctl(
lockfs.lf_key = (ulong_t)lockfs32.lf_key;
lockfs.lf_comlen = (ulong_t)lockfs32.lf_comlen;
lockfs.lf_comment =
- (caddr_t)(uintptr_t)lockfs32.lf_comment;
+ (caddr_t)(uintptr_t)lockfs32.lf_comment;
}
#endif /* _SYSCALL32_IMPL */
if (lockfs.lf_comlen) {
if (lockfs.lf_comlen > LOCKFS_MAXCOMMENTLEN)
return (ENAMETOOLONG);
- comment = kmem_alloc(lockfs.lf_comlen,
- KM_SLEEP);
+ comment =
+ kmem_alloc(lockfs.lf_comlen, KM_SLEEP);
if (copyin(lockfs.lf_comment, comment,
- lockfs.lf_comlen)) {
+ lockfs.lf_comlen)) {
kmem_free(comment, lockfs.lf_comlen);
return (EFAULT);
}
@@ -1665,7 +1627,8 @@ ufs_ioctl(
lockfs32.lf_comlen =
(uint32_t)lockfs.lf_comlen;
lockfs32.lf_comment =
- (uint32_t)(uintptr_t)lockfs.lf_comment;
+ (uint32_t)(uintptr_t)
+ lockfs.lf_comment;
(void) copyout(&lockfs32, (caddr_t)arg,
sizeof (struct lockfs32));
}
@@ -1684,7 +1647,7 @@ ufs_ioctl(
if ((flag & DATAMODEL_MASK) == DATAMODEL_NATIVE) {
if (copyin((caddr_t)arg, &lockfs,
- sizeof (struct lockfs)))
+ sizeof (struct lockfs)))
return (EFAULT);
}
#ifdef _SYSCALL32_IMPL
@@ -1692,14 +1655,14 @@ ufs_ioctl(
struct lockfs32 lockfs32;
/* Translate ILP32 lockfs to LP64 lockfs */
if (copyin((caddr_t)arg, &lockfs32,
- sizeof (struct lockfs32)))
+ sizeof (struct lockfs32)))
return (EFAULT);
lockfs.lf_lock = (ulong_t)lockfs32.lf_lock;
lockfs.lf_flags = (ulong_t)lockfs32.lf_flags;
lockfs.lf_key = (ulong_t)lockfs32.lf_key;
lockfs.lf_comlen = (ulong_t)lockfs32.lf_comlen;
lockfs.lf_comment =
- (caddr_t)(uintptr_t)lockfs32.lf_comment;
+ (caddr_t)(uintptr_t)lockfs32.lf_comment;
}
#endif /* _SYSCALL32_IMPL */
@@ -1709,11 +1672,11 @@ ufs_ioctl(
lockfs.lf_key = lockfs_out.lf_key;
lockfs.lf_flags = lockfs_out.lf_flags;
lockfs.lf_comlen = MIN(lockfs.lf_comlen,
- lockfs_out.lf_comlen);
+ lockfs_out.lf_comlen);
if ((flag & DATAMODEL_MASK) == DATAMODEL_NATIVE) {
if (copyout(&lockfs, (caddr_t)arg,
- sizeof (struct lockfs)))
+ sizeof (struct lockfs)))
return (EFAULT);
}
#ifdef _SYSCALL32_IMPL
@@ -1725,9 +1688,9 @@ ufs_ioctl(
lockfs32.lf_key = (uint32_t)lockfs.lf_key;
lockfs32.lf_comlen = (uint32_t)lockfs.lf_comlen;
lockfs32.lf_comment =
- (uint32_t)(uintptr_t)lockfs.lf_comment;
+ (uint32_t)(uintptr_t)lockfs.lf_comment;
if (copyout(&lockfs32, (caddr_t)arg,
- sizeof (struct lockfs32)))
+ sizeof (struct lockfs32)))
return (EFAULT);
}
#endif /* _SYSCALL32_IMPL */
@@ -1735,8 +1698,7 @@ ufs_ioctl(
if (lockfs.lf_comlen &&
lockfs.lf_comment && lockfs_out.lf_comment)
if (copyout(lockfs_out.lf_comment,
- lockfs.lf_comment,
- lockfs.lf_comlen))
+ lockfs.lf_comment, lockfs.lf_comlen))
return (EFAULT);
return (0);
@@ -1755,22 +1717,22 @@ ufs_ioctl(
return (0);
error = ufs_lockfs_begin(ufsvfsp, &ulp,
- ULOCKFS_SETATTR_MASK);
+ ULOCKFS_SETATTR_MASK);
if (error)
return (error);
if (ulp) {
trans_size = (int)TOP_SETATTR_SIZE(VTOI(vp));
TRANS_BEGIN_CSYNC(ufsvfsp, issync,
- TOP_SETATTR, trans_size);
+ TOP_SETATTR, trans_size);
}
error = ufs_fiosatime(vp, (struct timeval *)arg,
- flag, cr);
+ flag, cr);
if (ulp) {
TRANS_END_CSYNC(ufsvfsp, error, issync,
- TOP_SETATTR, trans_size);
+ TOP_SETATTR, trans_size);
ufs_lockfs_end(ulp);
}
return (error);
@@ -1792,7 +1754,7 @@ ufs_ioctl(
* inode open
*/
error = ufs_lockfs_begin(ufsvfsp, &ulp,
- ULOCKFS_VGET_MASK);
+ ULOCKFS_VGET_MASK);
if (error)
return (error);
@@ -1831,7 +1793,7 @@ ufs_ioctl(
* Tune the file system (aka setting fs attributes)
*/
error = ufs_lockfs_begin(ufsvfsp, &ulp,
- ULOCKFS_SETATTR_MASK);
+ ULOCKFS_SETATTR_MASK);
if (error)
return (error);
@@ -1960,17 +1922,12 @@ ufs_getattr(struct vnode *vp, struct vattr *vap, int flags,
struct ufsvfs *ufsvfsp;
int err;
- TRACE_2(TR_FAC_UFS, TR_UFS_GETATTR_START,
- "ufs_getattr_start:vp %p flags %x", vp, flags);
-
if (vap->va_mask == AT_SIZE) {
/*
* for performance, if only the size is requested don't bother
* with anything else.
*/
UFS_GET_ISIZE(&vap->va_size, ip);
- TRACE_1(TR_FAC_UFS, TR_UFS_GETATTR_END,
- "ufs_getattr_end:vp %p", vp);
return (0);
}
@@ -2049,8 +2006,6 @@ ufs_getattr(struct vnode *vp, struct vattr *vap, int flags,
err = 0;
out:
- TRACE_1(TR_FAC_UFS, TR_UFS_GETATTR_END, "ufs_getattr_end:vp %p", vp);
-
return (err);
}
@@ -2084,9 +2039,6 @@ ufs_setattr(
int retry = 1;
int indeadlock;
- TRACE_2(TR_FAC_UFS, TR_UFS_SETATTR_START,
- "ufs_setattr_start:vp %p flags %x", vp, flags);
-
/*
* Cannot set these attributes.
*/
@@ -2168,7 +2120,7 @@ again:
*/
if (vp->v_type == VDIR) {
ufs_tryirwlock_trans(&ip->i_rwlock, RW_WRITER, TOP_SETATTR,
- retry_dir);
+ retry_dir);
if (indeadlock)
goto again;
dorwlock = 1;
@@ -2193,7 +2145,7 @@ again:
* map the defines.
*/
error = secpolicy_vnode_setattr(cr, vp, vap, &oldva, flags,
- ufs_iaccess, ip);
+ ufs_iaccess, ip);
if (error)
goto update_inode;
@@ -2242,11 +2194,10 @@ again:
owner_change = 1;
(void) chkdq(ip, -blocks, /* force */ 1, cr,
- (char **)NULL, (size_t *)NULL);
+ (char **)NULL, (size_t *)NULL);
(void) chkiq(ufsvfsp, /* change */ -1, ip,
- (uid_t)ip->i_uid,
- /* force */ 1, cr,
- (char **)NULL, (size_t *)NULL);
+ (uid_t)ip->i_uid, /* force */ 1, cr,
+ (char **)NULL, (size_t *)NULL);
dqrele(ip->i_dquot);
}
@@ -2262,12 +2213,10 @@ again:
*/
ip->i_dquot = getinoquota(ip);
(void) chkdq(ip, blocks, /* force */ 1, cr,
- &errmsg1, &len1);
+ &errmsg1, &len1);
(void) chkiq(ufsvfsp, /* change */ 1,
- (struct inode *)NULL,
- (uid_t)ip->i_uid,
- /* force */ 1, cr,
- &errmsg2, &len2);
+ (struct inode *)NULL, (uid_t)ip->i_uid,
+ /* force */ 1, cr, &errmsg2, &len2);
}
}
if (mask & AT_GID) {
@@ -2387,8 +2336,6 @@ out:
kmem_free(errmsg2, len2);
goto again;
}
- TRACE_2(TR_FAC_UFS, TR_UFS_SETATTR_END,
- "ufs_setattr_end:vp %p error %d", vp, error);
if (errmsg1 != NULL) {
uprintf(errmsg1);
kmem_free(errmsg1, len1);
@@ -2407,9 +2354,6 @@ ufs_access(struct vnode *vp, int mode, int flags, struct cred *cr)
struct inode *ip = VTOI(vp);
int error;
- TRACE_3(TR_FAC_UFS, TR_UFS_ACCESS_START,
- "ufs_access_start:vp %p mode %x flags %x", vp, mode, flags);
-
if (ip->i_ufsvfs == NULL)
return (EIO);
@@ -2430,8 +2374,6 @@ ufs_access(struct vnode *vp, int mode, int flags, struct cred *cr)
rw_exit(&ip->i_contents);
- TRACE_2(TR_FAC_UFS, TR_UFS_ACCESS_END,
- "ufs_access_end:vp %p error %d", vp, error);
return (error);
}
@@ -2445,9 +2387,6 @@ ufs_readlink(struct vnode *vp, struct uio *uiop, struct cred *cr)
int error;
int fastsymlink;
- TRACE_2(TR_FAC_UFS, TR_UFS_READLINK_START,
- "ufs_readlink_start:vp %p uiop %p", uiop, vp);
-
if (vp->v_type != VLNK) {
error = EINVAL;
goto nolockout;
@@ -2483,8 +2422,8 @@ again:
mutex_exit(&ip->i_tlock);
}
error = uiomove((caddr_t)&ip->i_db[1],
- MIN(ip->i_size, uiop->uio_resid),
- UIO_READ, uiop);
+ MIN(ip->i_size, uiop->uio_resid),
+ UIO_READ, uiop);
ITIMES(ip);
++fastsymlink;
}
@@ -2579,8 +2518,8 @@ again:
if (tflag == 1) {
/* now, copy it into the user buffer */
error = uiomove((caddr_t)kbuf,
- MIN(size, uiop->uio_resid),
- UIO_READ, uiop);
+ MIN(size, uiop->uio_resid),
+ UIO_READ, uiop);
}
rw_exit(&ip->i_contents);
rw_exit(&ip->i_rwlock);
@@ -2590,9 +2529,6 @@ out:
ufs_lockfs_end(ulp);
}
nolockout:
- TRACE_2(TR_FAC_UFS, TR_UFS_READLINK_END,
- "ufs_readlink_end:vp %p error %d", vp, error);
-
return (error);
}
@@ -2605,9 +2541,6 @@ ufs_fsync(struct vnode *vp, int syncflag, struct cred *cr)
struct ulockfs *ulp;
int error;
- TRACE_1(TR_FAC_UFS, TR_UFS_FSYNC_START,
- "ufs_fsync_start:vp %p", vp);
-
error = ufs_lockfs_begin(ufsvfsp, &ulp, ULOCKFS_FSYNC_MASK);
if (error)
return (error);
@@ -2689,8 +2622,6 @@ out:
if (ulp) {
ufs_lockfs_end(ulp);
}
- TRACE_2(TR_FAC_UFS, TR_UFS_FSYNC_END,
- "ufs_fsync_end:vp %p error %d", vp, error);
return (error);
}
@@ -2718,10 +2649,6 @@ ufs_lookup(struct vnode *dvp, char *nm, struct vnode **vpp,
struct vnode *vp;
int error;
- TRACE_2(TR_FAC_UFS, TR_UFS_LOOKUP_START,
- "ufs_lookup_start:dvp %p name %s", dvp, nm);
-
-
/*
* Check flags for type of lookup (regular file or attribute file)
*/
@@ -2866,8 +2793,6 @@ fastpath:
goto retry_lookup;
out:
- TRACE_3(TR_FAC_UFS, TR_UFS_LOOKUP_END,
- "ufs_lookup_end:dvp %p name %s error %d", vpp, nm, error);
return (error);
}
@@ -2890,9 +2815,6 @@ ufs_create(struct vnode *dvp, char *name, struct vattr *vap, enum vcexcl excl,
int retry = 1;
int indeadlock;
- TRACE_1(TR_FAC_UFS, TR_UFS_CREATE_START,
- "ufs_create_start:dvp %p", dvp);
-
again:
ip = VTOI(dvp);
ufsvfsp = ip->i_ufsvfs;
@@ -2931,7 +2853,7 @@ again:
* possible, retries the operation.
*/
ufs_tryirwlock_trans(&ip->i_rwlock, RW_WRITER, TOP_CREATE,
- retry_dir);
+ retry_dir);
if (indeadlock)
goto again;
@@ -2954,12 +2876,11 @@ again:
* Suppress file system full message if we will retry
*/
error = ufs_direnter_cm(ip, name, DE_CREATE,
- vap, &xip, cr,
- (noentry | (retry ? IQUIET : 0)));
+ vap, &xip, cr, (noentry | (retry ? IQUIET : 0)));
if (error == EAGAIN) {
if (ulp) {
TRANS_END_CSYNC(ufsvfsp, error, issync,
- TOP_CREATE, trans_size);
+ TOP_CREATE, trans_size);
ufs_lockfs_end(ulp);
}
goto again;
@@ -3051,17 +2972,17 @@ again:
rw_exit(&ip->i_contents);
rw_exit(&ufsvfsp->vfs_dqrwlock);
ufs_tryirwlock_trans(&ip->i_rwlock,
- RW_WRITER, TOP_CREATE,
- retry_file);
+ RW_WRITER, TOP_CREATE,
+ retry_file);
if (indeadlock) {
VN_RELE(ITOV(ip));
goto again;
}
rw_enter(&ufsvfsp->vfs_dqrwlock,
- RW_READER);
+ RW_READER);
rw_enter(&ip->i_contents, RW_WRITER);
(void) ufs_itrunc(ip, (u_offset_t)0, 0,
- cr);
+ cr);
rw_exit(&ip->i_rwlock);
}
}
@@ -3151,8 +3072,6 @@ unlock:
}
out:
- TRACE_3(TR_FAC_UFS, TR_UFS_CREATE_END,
- "ufs_create_end:dvp %p name %s error %d", vpp, name, error);
return (error);
}
@@ -3170,9 +3089,6 @@ ufs_remove(struct vnode *vp, char *nm, struct cred *cr)
int issync;
int trans_size;
- TRACE_1(TR_FAC_UFS, TR_UFS_REMOVE_START,
- "ufs_remove_start:vp %p", vp);
-
/*
* don't let the delete queue get too long
*/
@@ -3219,8 +3135,6 @@ retry_remove:
VN_RELE(rmvp);
}
out:
- TRACE_3(TR_FAC_UFS, TR_UFS_REMOVE_END,
- "ufs_remove_end:vp %p name %s error %d", vp, nm, error);
return (error);
}
@@ -3242,9 +3156,6 @@ ufs_link(struct vnode *tdvp, struct vnode *svp, char *tnm, struct cred *cr)
int isdev;
int indeadlock;
- TRACE_1(TR_FAC_UFS, TR_UFS_LINK_START,
- "ufs_link_start:tdvp %p", tdvp);
-
retry_link:
error = ufs_lockfs_begin(ufsvfsp, &ulp, ULOCKFS_LINK_MASK);
if (error)
@@ -3300,8 +3211,6 @@ unlock:
ufs_lockfs_end(ulp);
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_LINK_END,
- "ufs_link_end:tdvp %p error %d", tdvp, error);
return (error);
}
@@ -3349,10 +3258,6 @@ ufs_rename(
krwlock_t *second_lock;
krwlock_t *reverse_lock;
- TRACE_1(TR_FAC_UFS, TR_UFS_RENAME_START,
- "ufs_rename_start:sdvp %p", sdvp);
-
-
sdp = VTOI(sdvp);
slot.fbp = NULL;
ufsvfsp = sdp->i_ufsvfs;
@@ -3387,7 +3292,7 @@ retry_rename:
if (error == EAGAIN) {
if (ulp) {
TRANS_END_CSYNC(ufsvfsp, error, issync,
- TOP_RENAME, trans_size);
+ TOP_RENAME, trans_size);
ufs_lockfs_end(ulp);
}
goto retry_rename;
@@ -3436,7 +3341,7 @@ retry_firstlock:
if (ulp && ULOCKFS_IS_SLOCK(ulp)) {
TRANS_END_CSYNC(ufsvfsp, error, issync, TOP_RENAME,
- trans_size);
+ trans_size);
ufs_lockfs_end(ulp);
goto retry_rename;
@@ -3462,7 +3367,7 @@ retry_firstlock:
rw_exit(first_lock);
if (ulp && ULOCKFS_IS_SLOCK(ulp)) {
TRANS_END_CSYNC(ufsvfsp, error, issync, TOP_RENAME,
- trans_size);
+ trans_size);
ufs_lockfs_end(ulp);
goto retry_rename;
@@ -3702,9 +3607,6 @@ unlock:
VN_RELE(ITOV(sip));
out:
- TRACE_5(TR_FAC_UFS, TR_UFS_RENAME_END,
- "ufs_rename_end:sdvp %p snm %s tdvp %p tnm %s error %d",
- sdvp, snm, tdvp, tnm, error);
return (error);
}
@@ -3725,9 +3627,6 @@ ufs_mkdir(struct vnode *dvp, char *dirname, struct vattr *vap,
ASSERT((vap->va_mask & (AT_TYPE|AT_MODE)) == (AT_TYPE|AT_MODE));
- TRACE_1(TR_FAC_UFS, TR_UFS_MKDIR_START,
- "ufs_mkdir_start:dvp %p", dvp);
-
/*
* Can't make directory in attr hidden dir
*/
@@ -3754,11 +3653,11 @@ again:
goto again;
error = ufs_direnter_cm(ip, dirname, DE_MKDIR, vap, &xip, cr,
- (retry ? IQUIET : 0));
+ (retry ? IQUIET : 0));
if (error == EAGAIN) {
if (ulp) {
TRANS_END_CSYNC(ufsvfsp, error, issync, TOP_MKDIR,
- trans_size);
+ trans_size);
ufs_lockfs_end(ulp);
}
goto again;
@@ -3785,8 +3684,6 @@ out:
goto again;
}
- TRACE_2(TR_FAC_UFS, TR_UFS_MKDIR_END,
- "ufs_mkdir_end:dvp %p error %d", dvp, error);
return (error);
}
@@ -3803,9 +3700,6 @@ ufs_rmdir(struct vnode *vp, char *nm, struct vnode *cdir, struct cred *cr)
int trans_size;
int indeadlock;
- TRACE_1(TR_FAC_UFS, TR_UFS_RMDIR_START,
- "ufs_rmdir_start:vp %p", vp);
-
/*
* don't let the delete queue get too long
*/
@@ -3823,7 +3717,7 @@ retry_rmdir:
if (ulp)
TRANS_BEGIN_CSYNC(ufsvfsp, issync, TOP_RMDIR,
- trans_size = TOP_RMDIR_SIZE);
+ trans_size = TOP_RMDIR_SIZE);
/*
* ufs_tryirwlock_trans uses rw_tryenter and checks for SLOCK
@@ -3834,12 +3728,12 @@ retry_rmdir:
if (indeadlock)
goto retry_rmdir;
error = ufs_dirremove(ip, nm, (struct inode *)0, cdir, DR_RMDIR, cr,
- &rmvp);
+ &rmvp);
rw_exit(&ip->i_rwlock);
if (ulp) {
TRANS_END_CSYNC(ufsvfsp, error, issync, TOP_RMDIR,
- trans_size);
+ trans_size);
ufs_lockfs_end(ulp);
}
@@ -3853,9 +3747,6 @@ retry_rmdir:
VN_RELE(rmvp);
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_RMDIR_END,
- "ufs_rmdir_end:vp %p error %d", vp, error);
-
return (error);
}
@@ -3885,9 +3776,6 @@ ufs_readdir(
ip = VTOI(vp);
ASSERT(RW_READ_HELD(&ip->i_rwlock));
- TRACE_2(TR_FAC_UFS, TR_UFS_READDIR_START,
- "ufs_readdir_start:vp %p uiop %p", vp, uiop);
-
if (uiop->uio_loffset >= MAXOFF32_T) {
if (eofp)
*eofp = 1;
@@ -3971,11 +3859,10 @@ nextblk:
}
incount = 0;
idp = (struct direct *)fbp->fb_addr;
- if (idp->d_ino == 0 && idp->d_reclen == 0 &&
- idp->d_namlen == 0) {
+ if (idp->d_ino == 0 && idp->d_reclen == 0 && idp->d_namlen == 0) {
cmn_err(CE_WARN, "ufs_readdir: bad dir, inumber = %llu, "
- "fs = %s\n",
- (u_longlong_t)ip->i_number, ufsvfsp->vfs_fs->fs_fsmnt);
+ "fs = %s\n",
+ (u_longlong_t)ip->i_number, ufsvfsp->vfs_fs->fs_fsmnt);
fbrelse(fbp, S_OTHER);
error = ENXIO;
goto update_inode;
@@ -4019,8 +3906,8 @@ nextblk:
(void) strncpy(odp->d_name, idp->d_name,
DIRENT64_NAMELEN(this_reclen));
outcount += odp->d_reclen;
- odp = (struct dirent64 *)((intptr_t)odp +
- odp->d_reclen);
+ odp = (struct dirent64 *)
+ ((intptr_t)odp + odp->d_reclen);
ASSERT(outcount <= bufsize);
}
if (idp->d_reclen) {
@@ -4053,7 +3940,7 @@ nextblk:
uiop->uio_resid -= outcount;
uiop->uio_offset = offset;
} else if ((error = uiomove(outbuf, (long)outcount, UIO_READ,
- uiop)) == 0)
+ uiop)) == 0)
uiop->uio_offset = offset;
update_inode:
ITIMES(ip);
@@ -4067,8 +3954,6 @@ unlock:
ufs_lockfs_end(ulp);
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_READDIR_END,
- "ufs_readdir_end:vp %p error %d", vp, error);
return (error);
}
@@ -4091,9 +3976,6 @@ ufs_symlink(
int ioflag;
int retry = 1;
- TRACE_1(TR_FAC_UFS, TR_UFS_SYMLINK_START,
- "ufs_symlink_start:dvp %p", dvp);
-
/*
* No symlinks in attrdirs at this time
*/
@@ -4239,7 +4121,7 @@ unlock:
int terr = 0;
TRANS_END_CSYNC(ufsvfsp, terr, issync, TOP_SYMLINK,
- trans_size);
+ trans_size);
ufs_lockfs_end(ulp);
if (error == 0)
error = terr;
@@ -4257,8 +4139,6 @@ unlock:
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_SYMLINK_END,
- "ufs_symlink_end:dvp %p error %d", dvp, error);
return (error);
}
@@ -4511,9 +4391,6 @@ ufs_getpage(struct vnode *vp, offset_t off, size_t len, uint_t *protp,
int do_qlock;
int trans_size;
- TRACE_1(TR_FAC_UFS, TR_UFS_GETPAGE_START,
- "ufs_getpage_start:vp %p", vp);
-
ASSERT((uoff & PAGEOFFSET) == 0);
if (protp)
@@ -4523,7 +4400,7 @@ ufs_getpage(struct vnode *vp, offset_t off, size_t len, uint_t *protp,
* Obey the lockfs protocol
*/
err = ufs_lockfs_begin_getpage(ufsvfsp, &ulp, seg,
- rw == S_READ || rw == S_EXEC, protp);
+ rw == S_READ || rw == S_EXEC, protp);
if (err)
goto out;
@@ -4539,7 +4416,7 @@ ufs_getpage(struct vnode *vp, offset_t off, size_t len, uint_t *protp,
trans_size = TOP_GETPAGE_SIZE(ip);
if (seg->s_as != &kas) {
TRANS_TRY_BEGIN_ASYNC(ufsvfsp, TOP_GETPAGE,
- trans_size, err)
+ trans_size, err)
if (err == EWOULDBLOCK) {
/*
* Use EDEADLK here because the VM code
@@ -4630,8 +4507,9 @@ retrylock:
* don't wait here due to lock order:
* vfs_dqrwlock > i_contents.
*/
- if (do_qlock && rw_tryenter(&ufsvfsp->vfs_dqrwlock,
- RW_READER) == 0) {
+ if (do_qlock &&
+ rw_tryenter(&ufsvfsp->vfs_dqrwlock, RW_READER)
+ == 0) {
rw_exit(&ip->i_contents);
goto retrylock;
}
@@ -4777,7 +4655,7 @@ retrylock:
if (plarr && !(has_holes && (rw == S_WRITE || rw == S_CREATE))) {
ASSERT((protp == NULL) ||
- !(has_holes && (*protp & PROT_WRITE)));
+ !(has_holes && (*protp & PROT_WRITE)));
eoff = pgoff + plsz;
while (pgoff < eoff) {
@@ -4842,8 +4720,6 @@ unlock:
ufs_lockfs_end(ulp);
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_GETPAGE_END,
- "ufs_getpage_end:vp %p error %d", vp, err);
return (err);
}
@@ -4893,7 +4769,7 @@ ufs_getpage_miss(struct vnode *vp, u_offset_t off, size_t len, struct seg *seg,
if ((pp = page_create_va(vp, off, PAGESIZE, PG_WAIT, seg,
addr)) == NULL) {
return (ufs_fault(vp,
- "ufs_getpage_miss: page_create == NULL"));
+ "ufs_getpage_miss: page_create == NULL"));
}
if (rw != S_CREATE)
@@ -5083,9 +4959,6 @@ ufs_putpage(struct vnode *vp, offset_t off, size_t len, int flags,
return (ufs_fault(vp, "ufs_putpage: bad v_count == 0"));
}
- TRACE_1(TR_FAC_UFS, TR_UFS_PUTPAGE_START,
- "ufs_putpage_start:vp %p", vp);
-
/*
* XXX - Why should this check be made here?
*/
@@ -5147,8 +5020,6 @@ ufs_putpage(struct vnode *vp, offset_t off, size_t len, int flags,
err = ufs_putpages(vp, off, len, flags, cr);
errout:
- TRACE_2(TR_FAC_UFS, TR_UFS_PUTPAGE_END,
- "ufs_putpage_end:vp %p error %d", vp, err);
return (err);
}
@@ -5244,7 +5115,7 @@ ufs_putpages(
* Search the entire vp list for pages >= off.
*/
err = pvn_vplist_dirty(vp, (u_offset_t)off, ufs_putapage,
- flags, cr);
+ flags, cr);
} else {
/*
* Loop over all offsets in the range looking for
@@ -5264,11 +5135,11 @@ ufs_putpages(
*/
if ((flags & B_INVAL) || ((flags & B_ASYNC) == 0)) {
pp = page_lookup(vp, io_off,
- (flags & (B_INVAL | B_FREE)) ?
- SE_EXCL : SE_SHARED);
+ (flags & (B_INVAL | B_FREE)) ?
+ SE_EXCL : SE_SHARED);
} else {
pp = page_lookup_nowait(vp, io_off,
- (flags & B_FREE) ? SE_EXCL : SE_SHARED);
+ (flags & B_FREE) ? SE_EXCL : SE_SHARED);
}
if (pp == NULL || pvn_getdirty(pp, flags) == 0)
@@ -5357,9 +5228,6 @@ ufs_putapage(
ASSERT(RW_LOCK_HELD(&ip->i_contents));
- TRACE_1(TR_FAC_UFS, TR_UFS_PUTAPAGE_START,
- "ufs_putapage_start:vp %p", vp);
-
if (ufsvfsp == NULL) {
err = EIO;
goto out_trace;
@@ -5468,8 +5336,8 @@ ufs_putapage(
* XXX - just a patch for i-mt3.
*/
if (io_len == 0) {
- ASSERT(pp->p_offset >= (u_offset_t)(roundup(ip->i_size,
- PAGESIZE)));
+ ASSERT(pp->p_offset >=
+ (u_offset_t)(roundup(ip->i_size, PAGESIZE)));
io_len = PAGESIZE;
}
@@ -5538,8 +5406,6 @@ out:
if (lenp)
*lenp = io_len;
out_trace:
- TRACE_2(TR_FAC_UFS, TR_UFS_PUTAPAGE_END,
- "ufs_putapage_end:vp %p error %d", vp, err);
return (err);
}
@@ -5560,9 +5426,6 @@ ufs_map(struct vnode *vp,
struct ulockfs *ulp;
int error;
- TRACE_1(TR_FAC_UFS, TR_UFS_MAP_START,
- "ufs_map_start:vp %p", vp);
-
retry_map:
error = ufs_lockfs_begin(ufsvfsp, &ulp, ULOCKFS_MAP_MASK);
if (error)
@@ -5646,8 +5509,6 @@ unlock:
ufs_lockfs_end(ulp);
}
out:
- TRACE_2(TR_FAC_UFS, TR_UFS_MAP_END,
- "ufs_map_end:vp %p error %d", vp, error);
return (error);
}
@@ -5782,8 +5643,8 @@ ufs_l_pathconf(struct vnode *vp, int cmd, ulong_t *valp, struct cred *cr)
case _PC_XATTR_EXISTS:
if (vp->v_vfsp->vfs_flag & VFS_XATTR) {
- error = ufs_xattr_getattrdir(vp, &sip, LOOKUP_XATTR,
- cr);
+ error =
+ ufs_xattr_getattrdir(vp, &sip, LOOKUP_XATTR, cr);
if (error == 0 && sip != NULL) {
/* Start transaction */
if (ulp) {
@@ -5796,7 +5657,7 @@ ufs_l_pathconf(struct vnode *vp, int cmd, ulong_t *valp, struct cred *cr)
rw_enter(&sip->i_rwlock, RW_WRITER);
rw_enter(&sip->i_contents, RW_WRITER);
if (ufs_xattrdirempty(sip,
- sip->i_number, CRED())) {
+ sip->i_number, CRED())) {
rw_enter(&ip->i_contents, RW_WRITER);
ufs_unhook_shadow(ip, sip);
rw_exit(&ip->i_contents);
@@ -5959,7 +5820,7 @@ ufs_pageio(struct vnode *vp, page_t *pp, u_offset_t io_off, size_t io_len,
ASSERT(cpp);
contig = 0;
if (err = bmap_read(ip, (u_offset_t)(io_off + done_len),
- &bn, &contig))
+ &bn, &contig))
break;
if (bn == UFS_HOLE) { /* No holey swapfiles */
@@ -6181,11 +6042,11 @@ ufs_dumpctl(vnode_t *vp, int action, int *blkp)
* calculate and allocate space needed according to i_size
*/
entries = (int)lblkno(fs, blkroundup(fs, ip->i_size));
- if ((dump_info = (struct dump *)
- kmem_alloc(sizeof (struct dump) +
- (entries - 1) * sizeof (daddr32_t), KM_NOSLEEP)) == NULL) {
- rw_exit(&ip->i_contents);
- return (ENOMEM);
+ dump_info = kmem_alloc(sizeof (struct dump) +
+ (entries - 1) * sizeof (daddr32_t), KM_NOSLEEP);
+ if (dump_info == NULL) {
+ rw_exit(&ip->i_contents);
+ return (ENOMEM);
}
/* Start saving the info */
@@ -6202,8 +6063,7 @@ ufs_dumpctl(vnode_t *vp, int action, int *blkp)
int error = 0;
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, fsbtodb(fs, ip->i_ib[i]),
- fs->fs_bsize);
+ ip->i_dev, fsbtodb(fs, ip->i_ib[i]), fs->fs_bsize);
if (bp->b_flags & B_ERROR)
error = EIO;
else {
@@ -6305,7 +6165,7 @@ save_dblks(struct inode *ip, struct ufsvfs *ufsvfsp, daddr32_t *storeblk,
if (storeblk - dump_info->dblk >= entries)
break;
bp = UFS_BREAD(ufsvfsp,
- ip->i_dev, fsbtodb(fs, dblk[i]), fs->fs_bsize);
+ ip->i_dev, fsbtodb(fs, dblk[i]), fs->fs_bsize);
if (bp->b_flags & B_ERROR) {
brelse(bp);
return (NULL);
@@ -6331,9 +6191,6 @@ ufs_getsecattr(struct vnode *vp, vsecattr_t *vsap, int flag,
ulong_t vsa_mask = vsap->vsa_mask;
int err = EINVAL;
- TRACE_3(TR_FAC_UFS, TR_UFS_GETSECATTR_START,
- "ufs_getsecattr_start:vp %p, vsap %p, flags %x", vp, vsap, flag);
-
vsa_mask &= (VSA_ACL | VSA_ACLCNT | VSA_DFACL | VSA_DFACLCNT);
/*
@@ -6352,8 +6209,6 @@ ufs_getsecattr(struct vnode *vp, vsecattr_t *vsap, int flag,
if (ulp)
ufs_lockfs_end(ulp);
}
- TRACE_1(TR_FAC_UFS, TR_UFS_GETSECATTR_END,
- "ufs_getsecattr_end:vp %p", vp);
return (err);
}
@@ -6371,10 +6226,6 @@ ufs_setsecattr(struct vnode *vp, vsecattr_t *vsap, int flag, struct cred *cr)
int donetrans = 0;
int retry = 1;
-
- TRACE_3(TR_FAC_UFS, TR_UFS_SETSECATTR_START,
- "ufs_setsecattr_start:vp %p, vsap %p, flags %x", vp, vsap, flag);
-
ASSERT(RW_LOCK_HELD(&ip->i_rwlock));
/* Abort now if the request is either empty or invalid. */
@@ -6428,7 +6279,7 @@ again:
if (ulp) {
TRANS_BEGIN_ASYNC(ufsvfsp, TOP_SETSECATTR,
- trans_size = TOP_SETSECATTR_SIZE(VTOI(vp)));
+ trans_size = TOP_SETSECATTR_SIZE(VTOI(vp)));
donetrans = 1;
}
@@ -6492,7 +6343,5 @@ out:
rw_enter(&ip->i_rwlock, RW_READER);
}
- TRACE_1(TR_FAC_UFS, TR_UFS_SETSECATTR_END,
- "ufs_setsecattr_end:vp %p", vp);
return (err);
}
diff --git a/usr/src/uts/common/fs/ufs/ufs_xattr.c b/usr/src/uts/common/fs/ufs/ufs_xattr.c
index e3d6d92ce0..3f3612aa0f 100644
--- a/usr/src/uts/common/fs/ufs/ufs_xattr.c
+++ b/usr/src/uts/common/fs/ufs/ufs_xattr.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.
*/
@@ -84,10 +83,10 @@ ufs_xattr_getattrdir(
*/
if ((sdp->i_mode & IFMT) != IFATTRDIR) {
cmn_err(CE_NOTE, "ufs_getattrdir: inode %d"
- " points to attribute directory %d "
- "which is not an attribute directory;"
- "run fsck on file system",
- (int)ip->i_number, (int)sdp->i_number);
+ " points to attribute directory %d "
+ "which is not an attribute directory;"
+ "run fsck on file system",
+ (int)ip->i_number, (int)sdp->i_number);
VN_RELE(ITOV(sdp));
return (ENOENT);
}