Commit Graph

129813 Commits

Author SHA1 Message Date
thorpej
4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
mycroft
c09a793e93 Push atime/mtime updates even further -- into the reclaim path, so they happen
rarely in the normal case.  (Note: This happens at reboot/shutdown time because
all file systems are unmounted.)

Also, for IN_MODIFY, use IN_ACCESSED, not IN_MODIFIED; otherwise "ls -l" of
your device node or FIFO would cause the time stamps to get written too
quickly.
2004-08-14 14:32:04 +00:00
cube
224d89c7db Remove debug printf (hi mycroft!). 2004-08-14 12:53:35 +00:00
wiz
5bf3687024 Add an article. 2004-08-14 11:04:29 +00:00
jdolecek
64fbdbbf78 document timeradd() and timersub() too, as e.g. select(2) points
to getitimer(2) for timersub() description

use .Fn rather than .Fa for the macro names

bump date
2004-08-14 10:03:30 +00:00
mycroft
5d31d187f3 Partially fix a performance problem in the partial-truncate case. We were
doing synchronous writes unnecessarily in a couple of places.  Now it's 1
write per truncate in my test case rather than 3.  :-P
2004-08-14 02:26:57 +00:00
jrf
ea0b6a43d0 Add -v option to usage message. 2004-08-14 02:16:13 +00:00
mycroft
14ae52970e There is no need to do a synchronous write when truncating a short symlink. 2004-08-14 01:32:02 +00:00
mycroft
9f8efecd46 In the indirect block unwind case, we only need to do the synchronous writes
of the inode in the softdep case.  XXX This is really a deficiency in softdep.
2004-08-14 01:30:56 +00:00
mycroft
bc25b30608 Add a new flag, IN_MODIFY. This is like IN_UPDATE|IN_CHANGE, but unlike
setting those flags, it does not cause the inode to be written in the periodic
sync.  This is used for writes to special files (devices and named pipes) and
FIFOs.

Do not preemptively sync updates to access times and modification times.  They
are now updated in the inode only opportunistically, or when the file or device
is closed.  (Really, it should be delayed beyond close, but this is enough to
help substantially with device nodes.)

And the most amusing part:
Trickle sync was broken on both FFS and ext2fs, in different ways.  In FFS, the
periodic call to VFS_SYNC(MNT_LAZY) was still causing all file data to be
synced.  In ext2fs, it was causing the metadata to *not* be synced.  We now
only call VOP_UPDATE() on the node if we're doing MNT_LAZY.  I've confirmed
that we do in fact trickle correctly now.
2004-08-14 01:08:02 +00:00
mycroft
81e93c0081 Add a new flag, UPDATE_CLOSE, to be used internally by file systems. 2004-08-13 23:15:39 +00:00
mycroft
fbf03babff There is an annoying deadlock that goes like this:
* Process A is closing one file descriptor belonging to a device.  In doing so,
  ffs_update() is called and starts writing a block synchronously.  (Note: This
  leaves the vnode locked.  It also has other instances -- stdin, et al -- of
  the same device open, so v_usecount is definitely non-zero.)
* Process B does a revoke() on the device.  The revoke() has to wait for the
  vnode to be unlocked because ffs_update() is still in progress.
* Process C tries to open() the device.  It wedges in checkalias() repeatedly
  calling vget() because it returns EBUSY immediately.

To fix, this:
* checkalias() now uses LK_SLEEPFAIL rather than LK_NOWAIT.  Therefore it will
  wait for the vnode to become unlocked, but it will recheck that it is on the
  hash list, in case it was in the process of being revoke()d or was revoke()d
  again before we were woken up.
* Since we're relying on the vnode lock to tell us that the vnode hasn't been
  removed from the hash list *anyway*, I have moved the code to remove it into
  the DOCLOSE section of vclean(), inside the vnode lock.

In the example at hand, process A was sh(1), process B was a child of init(8),
and process C was syslogd(8).
2004-08-13 22:48:06 +00:00
jdolecek
8ac2263519 constify 2004-08-13 21:45:03 +00:00
jdolecek
42d15fca03 on Linux, unlink() fails with EISDIR if the target is directory,
rather than EPERM; to emulate this properly, translate the error to EISDIR
if the target patch exists and points to a directory

this fixes the 'ant clean' problem reported by Marc Recht on current-users@
with SuSE 9.1 libraries
2004-08-13 21:27:32 +00:00
dsl
13a7bd52d8 Save and restore screen underneath prompt boxes 2004-08-13 18:26:52 +00:00
mycroft
7d2e1537c5 Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this
for a speedup by doing:
$_rc_subr_loaded . /etc/rc.subr
2004-08-13 18:08:03 +00:00
mycroft
e0fc84bd24 Put back one of the sleep()s -- it doesn't affect us in the usual case. 2004-08-13 17:22:39 +00:00
mycroft
f3b5a6849c Replace the sleep(2) in setctty() with a nanosleep(), with a default value of
250ms.
2004-08-13 17:19:15 +00:00
mycroft
40321c3f44 Remove a completely gratuitous 30 delay if you enter the wrong shell path. 2004-08-13 17:11:49 +00:00
uch
579420e43b use HCAJ, HCVJ group instead of HCAJ1, HCVJ1C_JP 2004-08-13 15:55:14 +00:00
uch
9d15e929e7 recompile. 2004-08-13 15:52:28 +00:00
uch
5adb2fdc5d add WCE101 and WCE200 binary install target. 2004-08-13 15:51:45 +00:00
uch
986311dca4 add SH7707 2004-08-13 15:50:09 +00:00
uch
e659dc81a4 fix debug print. 2004-08-13 15:49:37 +00:00
uch
abe2d7cbc7 regen. 2004-08-13 15:49:13 +00:00
uch
7ee4f55250 add SH7707 and HP360LX. add HCAJ and HCVJ group for Sharp Telios 2004-08-13 15:48:51 +00:00
uch
643a469d36 set user specified console as default. 2004-08-13 15:48:21 +00:00
uch
00539717e3 add debug print. 2004-08-13 15:47:53 +00:00
simonb
384a2881c7 Fix a couple of niggles:
. Incorrect name in the kernel config ident lines.
. Call the commented out NetBSD 0.9 binary compat option "COMPAT_09" and
    not "COMPAT_10"(!).
2004-08-13 15:42:02 +00:00
wiz
a5c8081d79 Bump date for previous, and re-add some flags that were removed in the
previous commit without a mention in the commit message, and which are
still in the usage.
2004-08-13 15:24:03 +00:00
tv
21840e450a Add "urandomkey" key generation method as described in PR kern/22766;
useful for configuring a throwaway key for cgd-on-swap at boot time.
2004-08-13 15:03:57 +00:00
wiz
e682d869e8 Bump date for previous. 2004-08-13 13:45:53 +00:00
wiz
bf78254603 Sort options, add -K to usage. 2004-08-13 13:45:46 +00:00
wiz
25ac688cb9 Bump date for new -q. 2004-08-13 13:38:14 +00:00
wiz
8a623e1980 Sort options in SYNOPSIS. 2004-08-13 13:37:14 +00:00
wiz
6579bae669 Add all options to usage. 2004-08-13 13:37:04 +00:00
agc
938f9f0f4f Modify pkg_info so that it will only print information on uninstalled
binary packages in the current working directory if -. is given on the
command line. If no -. is given, pkg_info will look for its information
in the ${PKG_DBDIR}.

This addresses a long-held gripe on the part of a number of people,
including myself, which completely violated the POLS.

Bump version for this and previous pkg_admin modification.
2004-08-13 13:34:42 +00:00
agc
50a555ad6a Add a -q switch to pkg_admin, which allows it to work in a quiet manner.
Fixes the change request in PR 26583, but in a different manner,
preserving existing behaviour and making the new behaviour dependent
upon a command line option.
2004-08-13 13:28:46 +00:00
tsutsui
d91b03bd13 Use bus_space(9) on news68k.
Update/sort the comment/ifdefs about bus_space-using ports.

XXX which should we use defined(__${MACHINE_CPU}__) or defined(${MACHINE})?
2004-08-13 12:59:20 +00:00
tsutsui
e6be65a968 Adapt to NCR5380_USE_BUS_SPACE. 2004-08-13 12:54:44 +00:00
mycroft
e3dd5f4885 Rearrange slightly so that we don't blow up if the card disappears during the
initial enable.
2004-08-13 12:42:11 +00:00
mycroft
6360c4b0f8 Delete-previous-char and delete-next-char without an argument are not supposed
to modify the yank buffer in Emacs.  Make it so.
2004-08-13 12:10:38 +00:00
pooka
b151590832 kill "magic" number 2004-08-13 11:25:58 +00:00
mycroft
1d167b13be amd64 also has bus_space... 2004-08-13 10:52:18 +00:00
drochner
d9a2463d75 oops - forgot the isapnp attachment when I added joystick support
recently
fixes PR port-i386/26630 by George F. Costanzo
2004-08-13 08:45:25 +00:00
mycroft
27b5b1440c Remove a really gratuitous 1s delay. 2004-08-13 04:36:08 +00:00
thorpej
46f4277564 WDCDEBUG -> ATADEBUG. 2004-08-13 04:10:49 +00:00
mycroft
c369e5b81c Fix two annoying display glitches with "fast scrolling" and
WSDISPLAY_SCROLLSUPPORT.
2004-08-13 04:03:38 +00:00
thorpej
ab20886f7b Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
2004-08-13 03:12:59 +00:00
thorpej
577bf67014 Move wdcstart() to ata.c and rename it to atastart(). 2004-08-13 02:16:40 +00:00