993 Commits

Author SHA1 Message Date
pjd
bf411a0ae5 MFC: sys/geom/eli/g_eli.c 1.12,1.13
- Don't forget to initialize crp_etype field.

  Reported by:	Nick Evans <nevans@syphen.net>

- Fix copy&paste typo.

Approved by:	re (scottl)
2005-09-15 14:17:31 +00:00
pjd
38a6d09956 MFC: sys/geom/eli/g_eli.c 1.6-11
sys/geom/eli/g_eli.h	1.3-4
	sys/geom/eli/g_eli_ctl.c	1.2
	sbin/geom/class/eli/geli.8	1.4-6
	sbin/geom/class/eli/geom_eli.c	1.3

Sync with HEAD:
- We don't need to clear allocated memory. This will speed-up things a bit.
- Even if crypto_dispatch() return an error, request is not canceled and
  our callback will still be called, just to tell us that requested
  failed...
- Always run dedicated kernel thread (even when we have hardware support).
  There is no performance impact, but allows to allocate memory with
  M_WAITOK flag.
  As a side effect this simplify code a bit.
- Allow to change number of iterations for PKCS#5v2. It can only be used
  when there is only one key set.
- Add a __packed keyword to g_eli_metadata struct definition, so
  sizeof(struct g_eli_metadata) will return the exact number of bytes needed
  for storing it on the disk.
  Without this change GELI was unusable on amd64 (and probably other 64-bit
  archs), because sizeof(struct g_eli_metadata) was greater than 512 bytes
  and geli(8) was failing on assertion.

Approved by:	re (scottl)
2005-08-30 15:27:30 +00:00
pjd
19d5e2ae00 MFC: sys/geom/label/g_label_ext2fs.c 1.2
sys/geom/label/g_label_iso9660.c	1.2
	sys/geom/label/g_label_reiserfs.c	1.2

Verify if we can actually read the data at given offset.

Approved by:	re (scottl)
2005-08-30 15:18:54 +00:00
pjd
dae84097da MFC: sys/geom/label/g_label.c 1.17
Back-out the change from revision 1.14 and allow for '/' in labels again.

Convinced by:	green, Gavin Atkinson, dougb, gordon
Approved by:	re (scottl)
2005-08-30 15:16:14 +00:00
pjd
ba6b9383b3 MFC: sys/sys/systm.h 1.235
sys/i386/i386/mp_machdep.c	1.253
	sys/amd64/amd64/mp_machdep.c	1.262
	sys/geom/stripe/g_stripe.c	1.27
	sys/geom/stripe/g_stripe.h	1.8

Avoid code duplication and implement bitcount32() function in systm.h only.

Approved by:	re (scottl)
2005-08-30 15:14:40 +00:00
nyan
a3a2b08eb8 MFC: revision 1.54 (Implement g_ctl api).
Approved by:	re (kensmith)
2005-08-19 12:40:32 +00:00
le
60ff518762 MFC:
geom_vinum.c        rev. 1.17
  geom_vinum_drive.c  rev. 1.19
  geom_vinum_plex.c   rev. 1.16
  geom_vinum_rm.c     rev. 1.7
  geom_vinum_var.h    rev. 1.9, 1.10
  geom_vinum_volume.c rev. 1.9

Approved by:  re (kensmith)
2005-08-19 08:48:04 +00:00
phk
7b495a458a MFC: Implement g_ctl api for metadata modification.
Approved by:	re@
2005-08-16 22:44:39 +00:00
phk
a79bee48a4 MFC: fix a tiny race in statistics collection.
Approved by:	re@
2005-08-16 22:43:51 +00:00
pjd
00e8438663 MFC: sys/geom/eli/g_eli.h 1.2
Be case-insensitive when dealing with algorithm names.

Submitted by:	Benjamin Lutz <benlutz@datacomm.ch>
PR:		kern/84659
Approved by:	re (kensmith)
2005-08-16 09:00:24 +00:00
pjd
80716b8623 MFC: sbin/geom/class/eli/geli.8 1.3
sys/geom/eli/g_eli.c		1.4,1.5

- GELI doesn't need cryptodev.
- Because code paths for I/O requests are quite complex, add comments above
  the functions which participate in I/O paths.

Approved by:	re (kensmith)
2005-08-16 08:58:33 +00:00
pjd
ea84465e92 MFC:
- Add code for Ext2FS and ReiserFS labels recognition.
- Avoid creating directories in devfs by changing all '/' in labels to '_'.

Submitted by:	Stanislav Sedov <stas@310.ru>
PR:		kern/84638
Approved by:	re (kensmith)
2005-08-16 08:20:48 +00:00
cvs2svn
aa9ad453cc This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-08-15 17:07:38 +00:00
pjd
5312e7b17e MFC: g_raid3.c 1.41
g_raid3.h	1.12

Use root_mount KPI for RAID3 to delay root file system mount.
Actually, one cannot setup root file system on RAID3 device, but when
other file system exist in /etc/fstab which are placed on RAID3 device,
boot process will be interrupted when these devices are missing.

Approved by:	re (kensmith)
2005-08-05 19:43:29 +00:00
cvs2svn
ec43e58941 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-07-29 10:06:58 +00:00
pjd
07c78f2e9f MFC: g_concat.c 1.25
g_stripe.c	1.26

Before calling g_orphan_provider(), add G_PF_WITHER flag, so GEOM will know
to destroy it.

PR:		kern/81758
Submitted by:	trasz <trasz@buziaczek.pl>
Approved by:	re (kensmith)
2005-07-20 13:12:20 +00:00
pjd
9ef3d97ebe Add CANCEL command which allows to remove one request from the queue or
all requests from the queue if request number is not given.

Bump version number.

Approved by:	re (scottl)
2005-07-08 21:08:53 +00:00
pjd
b1db94ccb3 After provider creation!! 2005-05-25 15:54:17 +00:00
pjd
f5dbb79246 - Call root_mount_rel() when provider IS created, not earlier.
This should close the race observed by Daniel Eriksson.
- Remove redundant wakeup().
2005-05-25 13:10:04 +00:00
pjd
ae767d0b06 Add some debug code to diagnose root-on-mirror problems with recent -current.
Reported by:	Daniel Eriksson
2005-05-23 13:05:07 +00:00
pjd
0435460c63 Correct typo. 2005-05-18 21:53:08 +00:00
le
86733f6df7 When a drive dies, don't call g_wither_geom() directly, but instead
post an event to the geom event queue that will take care of it,
letting outstanding bios finish, and closing the consumers.

Plus some cosmetic clean ups.
2005-05-17 16:38:30 +00:00
pjd
0a798a236d cp can't be NULL.
Noticed by:	Coverity Prevent analysis tool
2005-05-11 19:36:56 +00:00
pjd
0e95eeadc2 gp can't be NULL.
Noticed by:	Coverity Prevent analysis tool
2005-05-11 19:35:43 +00:00
pjd
08790cba80 Add KASSERT() to be sure there is an active component.
Suggested by:	Coverity Prevent analysis tool
2005-05-11 18:13:51 +00:00
pjd
9d22b74b8f Check return value.
Found by:	Coverity Prevent analysis tool
2005-05-11 18:07:39 +00:00
nyan
123c83cc66 Fix signed vs unsigned warning. 2005-05-01 09:44:50 +00:00
le
3998514c39 Only allow RAID5 plexes to be parity checked.
PR:           kern/80427
Submitty by:  Stijn Hoop <stijn@win.tue.nl>
2005-04-28 13:09:00 +00:00
pjd
93f62be898 Fix provider's size check for 'insert' command.
Before this fix one was able to insert one sector too small provider.

MFC after:	3 days
2005-04-25 10:41:26 +00:00
wollman
bc5273fd8f The size of a filesystem may be less than the size of the provider it
resides on.  Fix the special case of the filesystem fragment size not
evenly dividing the size of the provider.  Fixing the general case
probably requires better superblock validation (left as an exercise to
the reader).
2005-04-19 21:55:28 +00:00
pjd
15eddd96be Remove the hack which allowed to use gmirror for root file system,
use root_mount KPI instead.
2005-04-19 21:47:25 +00:00
phk
ed5a7da798 Call g_waitidle() instead of GEOM using the root_mount_hold() KPI.
GEOM could (and will) get events as a result of drivers coming in
late so a one-shot method is not good enough for GEOM.
2005-04-19 06:23:59 +00:00
phk
b7f29c0fc0 Add a named reference-count KPI to hold off mounting of the root filesystem.
While we wait for holds to be released, print a list of who holds us
back once per second.

Use the new KPI from GEOM instead of vfs_mount.c calling g_waitidle().

Use the new KPI also from ata.

With ATAmkIII's newbusification, ata could narrowly miss the window
and ad0 would not exist when we tried to mount root.
2005-04-18 21:21:26 +00:00
pjd
c3333321cc Protect against recursive labels creation in simlar way as it is done
in BSD and MBR classes, ie. if provider below us uses the same metadata,
don't create labels based on the metadata.
This allows to create labels on geoms with rank != 1 without hacks.

Tested by:	Chris Elsworth <chris@shagged.org> on sparc64
OK'ed by:	phk
MFC after:	2 weeks
2005-04-12 08:14:15 +00:00
pjd
a2b6f80684 Fix a long-standing bug. Error string has to be copyied from the user
process context.

Approved by:	phk
MFC after:	3 days
2005-04-08 09:28:08 +00:00
pjd
ae7daf0c96 - Add a missing g_io_deliver() in case of allocation failure - we didn't
completed I/O requests here.
- First allocate all needed bios, so if any of allocations fail, we can
  free memory before sending any I/O requests down.

Reported by:	Pawel Malachowski
MFC after:	3 days
2005-04-03 14:55:49 +00:00
nyan
a855c5b2ce Remove geometry translations here. 2005-03-30 12:59:54 +00:00
joerg
a1f08bc5f7 Support VTOC volume names. This can be useful to distinguish multiple
disks in a system.  Solaris' format(1m) displays the volume names in
the disk overview.

MFC after:	1 month
2005-03-30 09:33:10 +00:00
phk
55543da1eb fix a "modify after free" bug which is practically impossible to
experience.

Found by:	Coverity (id #540 #541)
2005-03-26 21:07:35 +00:00
pjd
9129b5403c If an error occurs, clean up before returning from g_raid3_connect_disk(). 2005-03-26 17:24:19 +00:00
pjd
e13782ca35 Make the code more obvious - when an error occurs in g_mirror_connect_disk(),
detach and destroy consumer before returning.
2005-03-26 17:23:01 +00:00
pjd
90f14e00b7 Check for return values.
Submitted by:	sam
Found by:	Coverity Prevent analysis tool
2005-03-26 16:51:19 +00:00
phk
31aaa9f619 g_read_data() can return NULL, check for it.
Found by:	Coverity (ID#258)
2005-03-18 07:03:56 +00:00
phk
05ad105753 After rejecting the bio request early, return instead of panicing.
Found by:	Coverity (ID#450)
2005-03-18 07:01:31 +00:00
phk
aaa532d778 Avoid null pointer dereference. 2005-03-18 06:57:58 +00:00
pjd
84f16c193c Plug memory leak.
Submitted by:	Ted Unangst
Found by:	Coverity Prevent analysis tool
Approved by:	phk
MFC after:	3 days
2005-03-16 20:48:13 +00:00
phk
f6aaa7c4a4 forward declare struct disk. 2005-03-15 10:47:38 +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
ume
73402ef817 stop including rijndael-api-fst.h from rijndael.h.
this is required to integrate opencrypto into crypto.
2005-03-11 15:42:51 +00:00
le
ee457df6ea Remove test for zero sectorsize when tasting. This check doesn't
seem to be necessary anymore, and it prevents tasting a valid drive
when booting with geom_vinum already loaded, since SCSI disks set their
sectorsize not until first opening them.
2005-03-07 19:58:58 +00:00