Commit Graph

110564 Commits

Author SHA1 Message Date
pjd
b58db25ebe - Add genid field to the metadata which will allow to improve reliability a bit.
After this change, when component is disconnected because of an I/O error,
  it will not be connected and synchronized automatically, it will be logged
  as broken and skipped. Autosynchronization can occur, when component is
  disconnected (on orphan event) and connected again - there were no I/O
  error, so there is no need to not connected the component, but when there were
  writes while it wasn't connected, it will be synchronized.
  This fix cases, when component is disconnected because of I/O error and can be
  connected again and again.
- Bump version number.
- Add version change history.
- Implement backward compatibility mechanism. After this change when metadata in
  old version is detected, it is automatically upgraded to the new (current)
  version.
2004-12-22 23:09:32 +00:00
ru
3a1bb12c82 Further fix the case mentioned in rev. 1.302. The
intent was (and still is) that if a user has say
CPUTYPE=i686 set in /etc/make.conf, we don't print
the assignment type warning unless TARGET_CPUTYPE
is overridden.

Unfortunately, the implementation was buggy, and
only recent changes to bsd.cpu.mk that swapped
canonical and alias values of some CPU types made
the bug apparent.

Here's what happens here.

- CPUTYPE=i686 is set in /etc/make.conf,
- bsd.cpu.mk reset it to "pentiumpro",
- Makefile.inc1 compares this canonical value
  with the result of the following test,

make -f /dev/null CPUTYPE=pentiumpro -V CPUTYPE

and expects the result to be "pentiumpro" too,
but "i686" is returned, here's why.  We have two
CPUTYPE variables, global, set to "i686" in
/etc/make.conf, and command-line (of a higher
precedence), set to "pentiumpro".

The following part of bsd.cpu.mk,

.  elif ${CPUTYPE} == "i686"
CPUTYPE = pentiumpro

which is responsible for converting aliases to
canonical values, sees the value of the CPUTYPE
command-line variable first, "pentiumpro", and
no conversion is done -- the net effect is that
CPUTYPE global stays with its old value "i686",
and "make -V CPUTYPE" (which prints variables
in the global context) returns "i686".

The fix was to pass the CPUTYPE in the test above
as an environment variable instead of as a command
line variable, i.e.,

CPUTYPE=pentiumpro make -f /dev/null -V CPUTYPE

This time, CPUTYPE global is still set to "i686"
initially (by /etc/make.conf), and an envieronment
variable CPUTYPE (of a lower precedence) is set
to "pentiumpro".  The .elif sees it's set to
"i686" and resets it to "pentiumpro", and so
"make -V" returns "pentiumpro".

NB: these various types of make(1) variables can
be very painful, especially when combined with
"make -V".
2004-12-22 22:00:01 +00:00
alc
04b2362b0f Add send buffer locking to uipc_send(). Without this locking a race can
occur between a reader and a writer that results in a panic upon close,
e.g.,
	"panic: sbflush_locked: cc 4 || mb 0xffffff0052afa400 || mbcnt 0"

Reviewed by: rwatson@
MFC after: 2 weeks
2004-12-22 20:28:46 +00:00
pjd
d608d899c2 'forget' command takes device names, not provider names. 2004-12-22 17:50:44 +00:00
phk
cc0d4329c3 Include fcntl.h
Include selinfo.h (don't rely on vnode.h to do so)
Check O_NONBLOCK instead of IO_NELAY
Don't include vnode.h
2004-12-22 17:39:21 +00:00
phk
3fdb7bea32 Don't include filedesc.h
Include fcntl.h
Include selinfo.h (don't rely on vnode.h to do so)
Check O_NONBLOCK instead of IO_NDELAY
Don't include vnode.h
2004-12-22 17:38:43 +00:00
phk
0970167e88 Include fcntl.h
Check O_NONBLOCK instead of IO_NDELAY
Include uio.h
Don't include vnode.h
Don't include filedesc.h
2004-12-22 17:37:57 +00:00
phk
fbe7293f5a Include uio.h
Check O_NONBLOCK instead if IO_NDELAY
Don't include vnode.h
2004-12-22 17:37:14 +00:00
phk
66e2363925 Include fcntl.h
Check O_NONBLOCK instead of IO_NDELAY.
Include selinfo.h instead of relying on vnode.h to do so.
Don't include vnode.h
2004-12-22 17:36:38 +00:00
phk
8deec74094 Include fcntl.h
check O_NONBLOCK instead of IO_NDELAY
Don't include vnode.h.
2004-12-22 17:35:52 +00:00
phk
1273b3575c Include fcntl.h
check O_NONBLOCK instead of IO_NDELAY
don't include vnode.h
2004-12-22 17:34:53 +00:00
phk
52fb0f35d0 Include fcntl.h
Check O_NONBLOCK instead of IO_NDELAY
Don't include vnode.h
2004-12-22 17:34:25 +00:00
phk
76e8599a69 Check O_NONBLOCK instead of IO_NDELAY.
Don't include <sys/vnode.h>
2004-12-22 17:32:53 +00:00
phk
55f52615a8 Fix comment. 2004-12-22 17:32:27 +00:00
phk
9fa6e5be50 Don't include vnode.h.
Check O_NONBLOCK instead of IO_NDELAY
2004-12-22 17:31:44 +00:00
wollman
e834322116 Correct speling erors. 2004-12-22 17:31:28 +00:00
phk
bff8bad9d3 Don't include vnode.h 2004-12-22 17:31:10 +00:00
phk
56253832a8 Include fcntl.h not vnode.h.
Include uio.h instead of relying on vnode.h to do so.
Check O_NONBLOCK not IO_NDELAY.
2004-12-22 17:30:38 +00:00
phk
6ab1262cc8 Check O_NONBLOCK not IO_NDELAY.
Don't include vnode.h
2004-12-22 17:29:37 +00:00
phk
a7cd5bffca #include fcntl.h not vnode.h. Check O_NONBLOCK not IO_NDELAY. 2004-12-22 17:29:02 +00:00
phk
8e1e714930 #include of <sys/vnode.h> not necesary. 2004-12-22 17:28:34 +00:00
phk
c13e70487f Be consistent about flag values passed to device drivers read/write
methods:

Read can see O_NONBLOCK and O_DIRECT.

Write can see O_NONBLOCK, O_DIRECT and O_FSYNC.

In addition O_DIRECT is shadowed as IO_DIRECT for now for backwards
compatibility.
2004-12-22 17:05:44 +00:00
phk
4e6a1d00d2 Shuffle numeric values of the IO_* flags to match the O_* flags from
fcntl.h.

This is in preparation for making the flags passed to device drivers be
consistently from fcntl.h for all entrypoints.

Today open, close and ioctl uses fcntl.h flags, while read and write
uses vnode.h flags.
2004-12-22 16:25:50 +00:00
keramida
1a7818d0d2 Punctuation marks should be separate arguments in groff macros.
Noticed by:	ru
2004-12-22 16:20:12 +00:00
keramida
592e2c4993 Use .Dv NULL when referring to NULL C pointers, instead of "nil". 2004-12-22 16:15:52 +00:00
ru
2d481ce9df Look into machine-specific manpage subdirectories too.
PR:		bin/72243
MFC after:	3 weeks
2004-12-22 16:04:58 +00:00
keramida
46fa95804b Cross reference init(8) too, instead of vaguely referring to the
"initialization process".
2004-12-22 15:44:21 +00:00
ru
f8a7e41733 Fixed the only warning and mark as WARNS=6 clean. 2004-12-22 15:25:51 +00:00
ru
d365c98640 - Fixed handling of manpage subdirectories:
catman /usr/share/man/man8
  cd /usr/share/man; catman man8

- Don't print false warnings about invalid cat pages which are
  machine-specific cat page subdirectories (visible with -v).

- Fixed one memory leak.
2004-12-22 15:24:48 +00:00
rwatson
f00429a695 Remove single line containing the word "KLD" ommitted in ps.1:1.80.
Pointed out by:	ru (some time ago)
2004-12-22 09:04:47 +00:00
yongari
98dec7d251 Due to unknown reasons, Disk_Names() returns SCSI CDROM as a valid
disk. This is main reason why sysinstall presents SCSI CDROM to
available disks in Fdisk/Label menu. In addition, adding a blank
SCSI CDROM to the menu generates floating point exception in sparc64.
Disk_Names() just extracts sysctl "kern.disks". Why GEOM treats SCSI
CDROM as a disk is beyond me and that should be investigated.
For temporary workaround, ignore SCSI CDROM device.

PR:		sparc64/72962
Tested by:	R. Tyler Ballance < tyler AT tamu DOT edu>
MFC after:	1 week
2004-12-22 08:26:48 +00:00
yongari
4b0d04a9a6 Plug memory leak.
MFC after:	1 week
2004-12-22 08:17:18 +00:00
kientzle
c8690d4c1a Include wchar.h to improve our chances of finding
WCHAR_MAX.  This might fix a portability problem on HP_UX.

Thanks to: Susan Kim
2004-12-22 06:40:28 +00:00
kientzle
df72015a3c Portability nit: Some platforms require stdio.h before bzlib.h.
Thanks to: Kurt J. Lidl
2004-12-22 06:30:14 +00:00
kientzle
1db0b0f050 Add __archive_strappend_int to format a decimal
number into a variable-length archive_string.
2004-12-22 06:12:40 +00:00
kientzle
5babdbc5e3 Add a fallback version of fnmatch() to the bsdtar
source code.  Include configure logic to pick up the
system one when it exists and use the fallback version
when it doesn't exist.  Set the default for FreeBSD
to use the system version.

With this, bsdtar should now be quite portable.
2004-12-22 06:08:04 +00:00
kientzle
b5c1699658 GC an unused #include 2004-12-22 05:54:10 +00:00
kientzle
5b6c40f225 Fix -W long option handling.
In particular:
  -W excl=text
fails because "excl" is a prefix of both "exclude" and "exclude-from".  But,
  -W exclude=text
is okay because it matches "exclude" exactly.

Thanks to: Jose F Nieves
MFC after: 7 days
2004-12-22 03:38:28 +00:00
kientzle
15dfe78baa Don't truncate major/minor numbers written to the legacy
ustar fields.  Later, we're going to permit numeric extensions
for these fields, so we can support large values here.  In particular,
this allows GNU tar to correctly extract such entries even
though it doesn't support the pax extended attributes.

Note: r1.18 and r1.17.2.1 of this file allowed similar treatment
of the uid/gid fields.

Thanks to: Ben Mesander
2004-12-22 02:35:37 +00:00
kientzle
66ddfc8a78 Tune the bidding for tar archives. This
improves the recognition of hardlink entries
with/without bodies (which is implemented through
a look-ahead that uses the bid function).

MFC after: 7 days
2004-12-22 00:49:16 +00:00
kientzle
38e8a38c12 Portability: the included fts.c should now
compile on many non-FreeBSD systems, including
Linux, Solaris, Darwin, etc.

Thanks to: many people who pointed out the same portability problem
2004-12-22 00:21:28 +00:00
roam
5a6d53a669 And this, kids, is what happens if you act on a patch without looking
at the mailing list to see if there isn't any more discussion just
around the corner.  Here's the update to the other part of the manpage
that deals with the hw.ata.atapi_dma loader tunable and initializing
ATAPI devices in PIO or DMA mode.

PR:		75021
Submitted by:	Craig Rodrigues <rodrigc@crodrigues.org>
Spotted by:	Joel Dahl <joel@automatvapen.se>
2004-12-21 20:02:50 +00:00
pjd
968f03faa7 Now, when force device destruction is done on shutdown, hide warning,
that device cannot be destroyed immediately, under debug=1.

Suggested by:	simon
2004-12-21 19:50:18 +00:00
roam
66d65c6614 Reflect the change of the hw.ata.atapi_dma sysctl default in rev. 1.217 of
src/sys/dev/ata/ata-all.c from PIO to DMA.

Submitted by:	Craig Rodrigues <rodrigc@crodrigues.org>
MFC after:	1 week
2004-12-21 19:41:21 +00:00
pjd
c18c5197dc Improve reliability and clean up code a bit.
For more details check src/sys/geom/mirror/g_mirror.c rev.1.47,1.48,1.49,1.50.
2004-12-21 19:30:59 +00:00
alc
6e5db3a043 Use vtopde() instead of pmap_pde() in pmap_kextract(); vtopde() is smaller
and faster in cases, such as pmap_kextract(), where the pde is known to
exist.
2004-12-21 19:25:56 +00:00
pjd
085de6ea5e Wait a bit after creating device. 2004-12-21 19:03:10 +00:00
pjd
13636f516f When RAID3 device is configured in "verify" mode, synchronization of the
parity component is now force on creation.
Change regression test which check "verify" mode to work properly after
this change.
2004-12-21 18:48:59 +00:00
pjd
c5ff5344f3 This should not be permitted, but some GEOM classes held the topology lock
while doing g_(read|write)_data() (e.g. BSD). This can cause a deadlock
in MIRROR class. Not sure if this is safe to drop the topology lock in BSD
class, so change the code in MIRROR class to avoid this deadlock.
2004-12-21 18:42:51 +00:00
pjd
27d828652f Implement g_topology_try_lock().
No objection from:	phk
2004-12-21 18:32:46 +00:00