summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-01-24 10:03:17 +0000
committerjeff <jeff@FreeBSD.org>2005-01-24 10:03:17 +0000
commitc49793b453d77f5f0d7a754ff529de1aa425e811 (patch)
tree495bb4818a3384d6de2e284074695fa921529506 /sys/ufs
parent0b0d52218040040b725ec5acb88f7bb63ad89ffa (diff)
downloadFreeBSD-src-c49793b453d77f5f0d7a754ff529de1aa425e811.zip
FreeBSD-src-c49793b453d77f5f0d7a754ff529de1aa425e811.tar.gz
- Mark the struct fs members that require the ufsmount mutex.
- Define some macros for manipulating the fs_active bitmap. Sponsored By: Isilon Systems, Inc.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/fs.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h
index 6f35c8e..f57669f 100644
--- a/sys/ufs/ffs/fs.h
+++ b/sys/ufs/ffs/fs.h
@@ -312,21 +312,21 @@ struct fs {
/* these fields retain the current block allocation info */
int32_t fs_cgrotor; /* last cg searched */
void *fs_ocsp[NOCSPTRS]; /* padding; was list of fs_cs buffers */
- u_int8_t *fs_contigdirs; /* # of contiguously allocated dirs */
- struct csum *fs_csp; /* cg summary info buffer for fs_cs */
- int32_t *fs_maxcluster; /* max cluster in each cyl group */
- u_int *fs_active; /* used by snapshots to track fs */
+ u_int8_t *fs_contigdirs; /* (u) # of contig. allocated dirs */
+ struct csum *fs_csp; /* (u) cg summary info buffer */
+ int32_t *fs_maxcluster; /* (u) max cluster in each cyl group */
+ u_int *fs_active; /* (u) used by snapshots to track fs */
int32_t fs_old_cpc; /* cyl per cycle in postbl */
int32_t fs_maxbsize; /* maximum blocking factor permitted */
int64_t fs_sparecon64[17]; /* old rotation block list head */
int64_t fs_sblockloc; /* byte offset of standard superblock */
- struct csum_total fs_cstotal; /* cylinder summary information */
+ struct csum_total fs_cstotal; /* (u) cylinder summary information */
ufs_time_t fs_time; /* last time written */
int64_t fs_size; /* number of blocks in fs */
int64_t fs_dsize; /* number of data blocks in fs */
ufs2_daddr_t fs_csaddr; /* blk addr of cyl grp summary area */
- int64_t fs_pendingblocks; /* blocks in process of being freed */
- int32_t fs_pendinginodes; /* inodes in process of being freed */
+ int64_t fs_pendingblocks; /* (u) blocks being freed */
+ int32_t fs_pendinginodes; /* (u) inodes being freed */
int32_t fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */
int32_t fs_avgfilesize; /* expected average file size */
int32_t fs_avgfpdir; /* expected # of files per directory */
@@ -408,6 +408,14 @@ CTASSERT(sizeof(struct fs) == 1376);
*/
#define ACTIVECGNUM(fs, cg) ((fs)->fs_active[(cg) / (NBBY * sizeof(int))])
#define ACTIVECGOFF(cg) (1 << ((cg) % (NBBY * sizeof(int))))
+#define ACTIVESET(fs, cg) do { \
+ if ((fs)->fs_active) \
+ ACTIVECGNUM((fs), (cg)) |= ACTIVECGOFF((cg)); \
+} while (0)
+#define ACTIVECLEAR(fs, cg) do { \
+ if ((fs)->fs_active) \
+ ACTIVECGNUM((fs), (cg)) &= ~ACTIVECGOFF((cg)); \
+} while (0)
/*
* The size of a cylinder group is calculated by CGSIZE. The maximum size
OpenPOWER on IntegriCloud