Commit Graph

113615 Commits

Author SHA1 Message Date
harti
e46b6260f7 ParseModifier(): rename rw_str to value and reindent cleanup section.
ParseRestModifier() and ParseRestEnd(): move advancement of ptr to remove
a confusing calculation.
VarParseLong(): cleanup calculation of consumed.

Patch:		7.114

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-14 17:03:34 +00:00
scottl
7be505a035 Refactor the bus_dma header files so that the interface is described in
sys/bus_dma.h instead of being copied in every single arch.  This slightly
reorders a flag that was specific to AXP and thus changes the ABI there.
The interface still relies on bus_space definitions found in <machine/bus.h>
so it cannot be included on its own yet, but that will be fixed at a later
date.  Add an MD <machine/bus_dma.h> for ever arch for consistency and to
allow for future MD augmentation of the API.  sparc64 makes heavy use of
this right now due to its different bus_dma implemenation.
2005-03-14 16:46:28 +00:00
des
8bd55ce9cb Hook pfs_lookup() up to vfs_cachedlookup_desc instead of vfs_lookup_desc,
as suggested by Matt's comment.  Also fix some style and paranoia issues.

The entire function could benefit from review by a VFS guru.

MFC after:	6 weeks
2005-03-14 16:24:50 +00:00
des
aa287f3e12 Fix two long-standing bugs in pfs_readdir():
Since we used an sbuf of size resid to accumulate dirents, we would end
up returning one byte short when we had enough dirents to fill or exceed
the size of the sbuf (the last byte being lost to bogus NUL termination)
causing the next call to return EINVAL due to an unaligned offset.  This
went undetected for a long time because I did most of my testing in
single-user mode, where there are rarely enough processes to fill the
4096-byte buffer ls(1) uses.  The most common symptom of this bug is that
tab completion of /proc or /compat/linux/proc does not work properly when
many processes are running.

Also, a check near the top would return EINVAL if resid was smaller than
PFS_DELEN, even if it was 0, which is frequently the case and perfectly
allowable.  Change the test so that it returns 0 if resid is 0.

MFC after:	2 weeks
2005-03-14 16:21:32 +00:00
des
892fcdb014 If PSEUDOFS_TRACE is defined, create a sysctl knob to enable / disable
pseudofs call tracing.
2005-03-14 16:06:47 +00:00
des
409a23294c Add PSEUDOFS_TRACE option. 2005-03-14 16:04:27 +00:00
glebius
46ae2c5fbc o Use subr_unit allocator. This simplifies code much:
- Remove get_free_unit().
  - Remove SLIST of nodes.
  - Remove global mutex.

o Increase NGD_MAX to 999.
o Move ngd_mod_event() up to netgraph methods.
2005-03-14 16:02:53 +00:00
des
cae8560557 fbsdidize. 2005-03-14 15:54:11 +00:00
phk
50400e94bb Mangle a manpage. 2005-03-14 15:38:34 +00:00
phk
ddc0cb6817 Do not attach MBR on top of an MBR. This removes some confusing
slice names on disks with extended partitions.

Spotted on:	Mother-in-laws computer.
2005-03-14 15:22:18 +00:00
pjd
2762d2e8a6 Be sure that class name storaed in 'class_name' is lower case.
MFC after:	1 week
2005-03-14 15:00:51 +00:00
phk
7112e51413 Use vfs_hash instead of home-rolled. 2005-03-14 14:41:37 +00:00
pjd
4c29f3b1e1 Define subcommands' usage inside g_command structure.
MFC after:	1 week
2005-03-14 14:25:47 +00:00
pjd
70e7ef2f36 - Add gc_usage field to g_command structure. This will allow to define
usage for a subcommand, so no 'usage' function has to be implemented
  in class library.
- Bump version number as it breaks ABI, but don't provide backward
  compatibility, because there are probably no external consumers of this
  geom(8).
This allows to print more precise usage for standard commands and simplify
class libraries a bit.

MFC after:	1 week
2005-03-14 14:24:46 +00:00
maxim
f89dff07d5 o Improve the example a bit.
Submitted by:	hrs
2005-03-14 14:12:29 +00:00
brueffer
f32edb86b5 - new sentence, new line
- s/freebsd/FreeBSD/
2005-03-14 14:04:02 +00:00
phk
5f1994f321 Forgot cvs rm in last file. 2005-03-14 13:30:45 +00:00
phk
6ead7c4f27 Use vfs_hash() instead of home-rolled 2005-03-14 13:30:06 +00:00
phk
d26364a9a9 Use vfs_hash instead of home-rolled. 2005-03-14 13:22:41 +00:00
pjd
8ef3f502d0 Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after:	1 week
2005-03-14 13:14:04 +00:00
pjd
b1046d1ec5 Document subcommands' arguments.
MFC after:	1 week
2005-03-14 13:06:09 +00:00
pjd
1d8fbec83f Document '-s' option of 'status' subcommand.
MFC after:	1 week
2005-03-14 12:37:55 +00:00
pjd
664873178e Add '-s' option to 'status' subcommand. It produces script-friendly output:
# gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
                       ad2s1a
mirror/data  DEGRADED  da0
                       da1 (76%)
                       da2
# gmirror status -s
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
mirror/root  COMPLETE  ad2s1a
mirror/data  DEGRADED  da0
mirror/data  DEGRADED  da1 (76%)
mirror/data  DEGRADED  da2

MFC after:	1 week
2005-03-14 12:33:19 +00:00
phk
550b89f8bf Use vfs_hash instead of home-rolled.
Correct locking around g_vfs_close()
2005-03-14 12:29:39 +00:00
phk
5c46906245 Use vfs_hash instead of home-rolling. 2005-03-14 12:24:35 +00:00
maxim
b7f5106637 Sort xrefs 2005-03-14 12:24:34 +00:00
maxim
ef5157382e o Replace OpenBSD-specific example by FreeBSD's one.
Noticed by:	Daniel O'Connor
2005-03-14 12:15:43 +00:00
harti
6c1fea3e9f Move the creation of a Src structure into its own function. 2005-03-14 12:04:20 +00:00
harti
65a16da8cc Split off two function from VarParseLong to handle modifiers and the
actual variable lookup. Consistently rename lengthPtr to consumed.
Update a number of comments to match the code.

Patch:		7.111-113

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-14 12:03:30 +00:00
jeff
dfd3ed6e5d - ktrace(1) has nothing to do with schedgraph. Remove that from the
instructions.
2005-03-14 11:52:24 +00:00
phk
81b59515b3 Cleanup accidentally include #if 0 section. 2005-03-14 10:25:09 +00:00
phk
2c122b990e Remove ufs_ihash.c here as well. 2005-03-14 10:23:34 +00:00
phk
503a6885b8 Use vfs_hash instead of home-rolled. 2005-03-14 10:21:16 +00:00
phk
c15976e56b Currently (almost) all filesystems maintain a local inode hash table
to get from (mount + inode) to vnode.  These tables are mostly
copy&pasted from UFS, sized based on desiredvnodes and therefore
quite large (128K-512K).  Several filesystems are buggy enough that
they allocate the hash table even before they know if they will
ever be used or not.

Add "vfs_hash", a system wide hash table, which will replace all
the per-filesystem hash-tables.

The fields we add to struct vnode will more or less be saved in
the respective filesystems inodes.

Having one central implementation will save code and will allow us
to justify the complexity of code to dynamically (re)size the hash
at a later point.
2005-03-14 10:01:29 +00:00
jeff
3fcb9112fb - Increment the holdcnt once for each usecount reference. This allows us
to use only the holdcnt to determine whether a vnode may be recycled,
   simplifying the V* macros as well as vtryrecycle(), etc.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 09:25:19 +00:00
jeff
41fb0028e9 - Don't directly adjust v_usecount, use vref() instead.
Sponsored by:	Isilon Systems, Inc.
2005-03-14 09:03:19 +00:00
pjd
74672647f0 Use int instead of size_t (%*s needs int).
MFC after:	1 week
2005-03-14 08:34:02 +00:00
jeff
2a81e8df21 - We do not have to check the object's ref_count in VSHOULDFREE or
vtryrecycle().  All obj refs also ref the vnode.
 - Consistently use v_incr_usecount() to increment the usecount.  This will
   be more important later.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 08:30:31 +00:00
harti
dffc7fe63f Convert a couple of other uses of Lst_ForEach to LST_FOREACH and
simplify code.
2005-03-14 08:29:58 +00:00
jeff
eaf9deaeb7 - Retire OLOCK and OWANT. All callers hold the vnode lock when creating
a vnode object.  There has been an assert to prove this for some time.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 07:29:40 +00:00
jeff
bb63517e7e - Slightly rearrange vrele() to move the common case in one indentation
level.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 07:16:55 +00:00
jeff
a307ec6ef8 - Rework vget() so we drop the usecount in two failure cases that were
missed by my last commit.

Sponsored by:	Isilon Systems, Inc.
2005-03-14 07:11:19 +00:00
phk
466fb85e71 Remove debugging printfs. 2005-03-14 06:51:29 +00:00
delphij
ebc7aa2a14 printf(3) expects that %*s having an int parameter, which generates
warning on 64-bit platforms.  Explicitly cast these values to int
to work around this issue, as these values are tend to be small.

Spotted by:	ia64 tinderbox
2005-03-14 04:33:13 +00:00
bmah
c9b5162e94 Minor grammar fixes: jail(8) chflags, rescue(8) and bsdtar.
MFC noted:  pcii.
2005-03-14 02:13:50 +00:00
iedowse
ab4fe62469 Add support for the ethernet port in the JVC MP-PRX1 port replicator. 2005-03-14 01:49:00 +00:00
iedowse
58c85262cd Set the split transaction interrupt C-mask correctly. This is the
final piece needed to make split transaction interrupt pipes work,
which I thought I had already committed.
2005-03-14 01:03:50 +00:00
kientzle
7f4dba0f0e A handful of minor portability and style improvements. 2005-03-14 00:30:35 +00:00
kientzle
c46a8c03ea Style correction: one tab after #define. 2005-03-14 00:29:05 +00:00
kientzle
b3cbed0960 Re-unbreak the distfile target.
Also, reduce the WARNS level to 5 since different build environments
end up using different Yacc skeletons.  The BSD one does not
predeclare yyparse, the FSF one does, so it's not really possible to
consistently enforce both -Wmissing-prototypes and -Wredundant-decls.
2005-03-13 23:49:53 +00:00