Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Improve comments in struct ulfsmount.
details: https://anonhg.NetBSD.org/src/rev/a4f97a0b82cb
branches: trunk
changeset: 788893:a4f97a0b82cb
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jul 28 00:28:33 2013 +0000
description:
Improve comments in struct ulfsmount.
Also rearrange it to group related items together.
diffstat:
sys/ufs/lfs/ulfsmount.h | 56 ++++++++++++++++++++++++++++--------------------
1 files changed, 33 insertions(+), 23 deletions(-)
diffs (90 lines):
diff -r 8dc337d624c4 -r a4f97a0b82cb sys/ufs/lfs/ulfsmount.h
--- a/sys/ufs/lfs/ulfsmount.h Sun Jul 28 00:28:05 2013 +0000
+++ b/sys/ufs/lfs/ulfsmount.h Sun Jul 28 00:28:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfsmount.h,v 1.8 2013/07/28 00:28:05 dholland Exp $ */
+/* $NetBSD: ulfsmount.h,v 1.9 2013/07/28 00:28:33 dholland Exp $ */
/* from NetBSD: ufsmount.h,v 1.39 2012/10/19 17:09:08 drochner Exp */
/*
@@ -57,27 +57,43 @@
/* This structure describes the ULFS specific mount structure data. */
struct ulfsmount {
- struct mount *um_mountp; /* filesystem vfs structure */
- dev_t um_dev; /* device mounted */
- struct vnode *um_devvp; /* block device mounted vnode */
- u_long um_fstype;
- u_int32_t um_flags; /* ULFS-specific flags - see below */
- struct lfs *um_lfs; /* pointer to superblock */
+ /* Abstract vfs-level filesystem structure. */
+ struct mount *um_mountp;
+
+ /* The block device we're mounted on. */
+ dev_t um_dev;
+ struct vnode *um_devvp;
+
+ /* type of fs; currently always ULFS1, theoretically also ULFS2 */
+ u_long um_fstype;
+
+ /* pointer to the filesystem-specific filesystem structure */
+ struct lfs *um_lfs;
+
+ /* ops table for per-filesystem dispatch */
+ const struct ulfs_ops *um_ops;
+
+ /* ULFS-level information */
+ u_int32_t um_flags; /* ULFS flags (below) */
+ u_long um_nindir; /* indirect ptrs per block */
+ u_long um_lognindir; /* log2 of um_nindir */
+ u_long um_bptrtodb; /* indir ptr to disk block */
+ u_long um_seqinc; /* inc between seq blocks */
+ int um_maxsymlinklen;
+ int um_dirblksiz;
+ u_int64_t um_maxfilesize;
/* Extended attribute information. */
struct ulfs_extattr_per_mount um_extattr;
- struct vnode *um_quotas[ULFS_MAXQUOTAS]; /* pointer to quota files */
- kauth_cred_t um_cred[ULFS_MAXQUOTAS]; /* quota file access cred */
- u_long um_nindir; /* indirect ptrs per block */
- u_long um_lognindir; /* log2 of um_nindir */
- u_long um_bptrtodb; /* indir ptr to disk block */
- u_long um_seqinc; /* inc between seq blocks */
+ /* Quota-related material. */
+ struct vnode *um_quotas[ULFS_MAXQUOTAS]; /* quota files */
+ kauth_cred_t um_cred[ULFS_MAXQUOTAS]; /* quota file access cred */
union {
struct um_q1 {
- time_t q1_btime[ULFS_MAXQUOTAS]; /* block quota time limit */
- time_t q1_itime[ULFS_MAXQUOTAS]; /* inode quota time limit */
- char q1_qflags[ULFS_MAXQUOTAS]; /* quota specific flags */
+ time_t q1_btime[ULFS_MAXQUOTAS]; /* block quota time limit */
+ time_t q1_itime[ULFS_MAXQUOTAS]; /* inode quota time limit */
+ char q1_qflags[ULFS_MAXQUOTAS]; /* quota flags */
} um_q1;
struct um_q2 {
uint64_t q2_bsize; /* block size of quota file */
@@ -89,12 +105,6 @@
#define umq1_qflags um_q.um_q1.q1_qflags
#define umq2_bsize um_q.um_q2.q2_bsize
#define umq2_bmask um_q.um_q2.q2_bmask
-
- int um_maxsymlinklen;
- int um_dirblksiz;
- u_int64_t um_maxfilesize;
-
- const struct ulfs_ops *um_ops;
};
struct ulfs_ops {
@@ -127,7 +137,7 @@
#define ULFS_UNMARK_VNODE(vp) \
(*ULFS_OPS(vp)->uo_unmark_vnode)((vp))
-/* ULFS-specific flags */
+/* ULFS-specific flags for um_flags */
#define ULFS_NEEDSWAP 0x01 /* filesystem metadata need byte-swapping */
/* unused 0x02 */
#define ULFS_QUOTA 0x04 /* filesystem has QUOTA (v1) */
Home |
Main Index |
Thread Index |
Old Index