Commit Graph

1021 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
71270ca60b Fix copy&paste typo.
MFC after:	3 days
2005-09-10 07:46:47 +00:00
Pawel Jakub Dawidek
cf47954083 Don't forget to initialize crp_etype field.
Reported by:	Nick Evans <nevans@syphen.net>
MFC after:	3 days
2005-09-10 07:45:10 +00:00
Lukas Ertl
fcac1be89a Set the G_PF_WITHER flag on the subdisk provider that is about to
be destroyed.  That way the GEOM system handles all deallocations
and we don't have to do it ourselves.
2005-09-08 20:08:46 +00:00
Poul-Henning Kamp
e4da09c03f Remove a race condition that could result in processes being stuck
waiting for geom events to happen:

Instead of maintaining a count of outstanding events, simply look if
the queue is empty.  Make sure to not remove events from the queue
until they are executed in order to not open a new race.

Much work by:	pjd
Tested by:	kris
MT6:		yes, should be.
2005-09-04 19:14:19 +00:00
Poul-Henning Kamp
ac4b76b7ff Typo. 2005-09-03 11:03:10 +00:00
Pawel Jakub Dawidek
3b37814794 Use KTR to log allocations and destructions of bios.
This should hopefully allow to track down "duplicate free of g_bio" panics.
2005-08-29 11:39:24 +00:00
Lukas Ertl
1f710312a2 Prevent that sync operations can be started when they are already
in progress, and be a bit more user friendly in terms of error
messages returned from the kernel.
2005-08-28 18:16:31 +00:00
Pawel Jakub Dawidek
3ae0e7d8ae Verify length of the data to read as well. 2005-08-28 00:14:21 +00:00
Lukas Ertl
df5175af0f Shuffle around the order in which the components are compiled.
This way, the VINUMDRIVE class is loaded before the VINUM class,
but since geom does the tasting for newly arrived classes
last-in-first-out, the VINUM class tastes first.

This removes the need to call gv_parse_config() in the drive
taste path.
2005-08-26 14:40:32 +00:00
Pawel Jakub Dawidek
9d34e94d14 Verify offset before reading.
MFC after:	2 days
2005-08-26 12:50:08 +00:00
Takanori Watanabe
7ba4d2eaeb Add NTFS labeling function.
Reviewed by:pjd
2005-08-26 11:35:10 +00:00
Pawel Jakub Dawidek
a180109fa3 Verify if we can actually read the data at given offset.
Reported by:	Martin <nakal@nurfuerspam.de>
2005-08-23 18:55:38 +00:00
Lukas Ertl
fdb9eda84f Correct the check if a plex is accessible in case it is not up.
This makes degraded RAID5 plexes actually work.
2005-08-22 23:24:26 +00:00
Pawel Jakub Dawidek
dd549194ae By default, when doing crypto work in software, start as many threads
as we have active CPUs and bind each thread to its own CPU.

MFC after:	3 days
2005-08-21 18:12:51 +00:00
Pawel Jakub Dawidek
b8db9f58da Remove stale comment (we now always start worker thread).
MFC after:	3 days
2005-08-21 18:06:35 +00:00
Pawel Jakub Dawidek
b866c830d9 Back-out the change from revision 1.14 and allow for '/' in labels again.
Convinced by:	green, Gavin Atkinson, dougb, gordon
MFC after:	1 day
2005-08-20 17:05:47 +00:00
Pawel Jakub Dawidek
efd9ac0dfc 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.

Reported by:	Michael Reifenberger <mike@Reifenberger.com>
MFC after:	3 days
2005-08-20 10:43:03 +00:00
Pawel Jakub Dawidek
7a5c26fcbd Allow to change number of iterations for PKCS#5v2. It can only be used
when there is only one key set.

MFC after:	3 days
2005-08-19 22:19:25 +00:00
Pawel Jakub Dawidek
fcd46203c5 - Add a missing period.
- Fix number of spaces.

MFC after:	3 days
2005-08-19 22:16:26 +00:00
Pawel Jakub Dawidek
a95452ee8d Avoid code duplication and implement bitcount32() function in systm.h only.
Reviewed by:	cperciva
MFC after:	3 days
2005-08-19 22:10:19 +00:00
Pawel Jakub Dawidek
dddd1d537a 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.

MFC after:	3 days
2005-08-17 15:25:57 +00:00
Pawel Jakub Dawidek
bf71eaacf1 We should now return 0. 2005-08-17 15:12:34 +00:00
Pawel Jakub Dawidek
d1dca8a818 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...

Reported by:	Mike Tancsa <mike@sentex.net>
MFC after:	3 days
2005-08-17 14:34:52 +00:00
Pawel Jakub Dawidek
2be2b2eab5 We don't need to clear allocated memory. This will speed-up things a bit.
MFC after:	3 days
2005-08-17 14:08:50 +00:00
Poul-Henning Kamp
52d71e1a85 remove stale comments 2005-08-16 20:03:29 +00:00
Lukas Ertl
664a97517f Make it possible to remove stale, left-over subdisks. 2005-08-16 15:12:44 +00:00
Lukas Ertl
8cc5eb98ad Fix a stupid logic bug introduced in geom_vinum_drive.c rev 1.18:
When a drive is newly created, it's state is initially set to 'down',
so it won't allow saving the config to it (thus it will never know of
itself being created).  Work around this by adding a new flag, that's
also checked when saving the config to a drive.
2005-08-15 17:07:47 +00:00
Pawel Jakub Dawidek
bb30fea667 Because code paths for I/O requests are quite complex, add comments above
the functions which participate in I/O paths.

MFC after:	1 day
2005-08-13 17:45:37 +00:00
Pawel Jakub Dawidek
ac445fbab5 Provide more complete "How to add a new file system to glabel." list.
MFC after:	1 week
2005-08-12 00:34:45 +00:00
Pawel Jakub Dawidek
9417a618d1 Add code for Ext2FS and ReiserFS labels recognition.
Submitted by:	Stanislav Sedov <stas@310.ru>
PR:		kern/84638
MFC after:	1 week
2005-08-12 00:27:45 +00:00
Pawel Jakub Dawidek
055c32a1bc Avoid creating directories in devfs by changing all '/' in labels to '_'.
Idea from:	Stanislav Sedov <stas@310.ru>
MFC after:	3 days
2005-08-12 00:05:09 +00:00
Pawel Jakub Dawidek
6985decf3c GELI doesn't need cryptodev.
MFC after:	3 days
2005-08-11 14:52:27 +00:00
Pawel Jakub Dawidek
6eb1d21f14 Be case-insensitive when dealing with algorithm names.
PR:		kern/84659
Submitted by:	Benjamin Lutz <benlutz@datacomm.ch>
2005-08-08 19:40:38 +00:00
Pawel Jakub Dawidek
ea35a2ec3a MFp4: Export more informations about encrypted providers.
MFC after:	1 week
2005-07-27 22:31:57 +00:00
Pawel Jakub Dawidek
7625429883 Reduce default debug level to 0.
MFC after:	1 week
2005-07-27 21:48:47 +00:00
Pawel Jakub Dawidek
c58794debd Add GEOM_ELI class which provides GEOM providers encryption.
For features list and usage see manual page: geli(8).

Sponsored by:	Wheel Sp. z o.o.
		http://www.wheel.pl
MFC after:	1 week
2005-07-27 21:43:37 +00:00
Pawel Jakub Dawidek
4ed854e8d4 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.

MFC after:	3 days
X-MFC-note:	MFC only to RELENG_6, as RELENG_5 doesn't have root_mount KPI.
2005-07-27 09:03:51 +00:00
Poul-Henning Kamp
8827c821de By design I left a tiny race in updating the I/O statistics based on
the assumption that performance was more important that beancounter
quality statistics.

As it transpires the microoptimization is not measurable in the
real world and the inconsistent statistics confuse users, so revert
the decision.

MT6 candidate:	possibly
MT5 candidate:	possibly
2005-07-25 21:12:54 +00:00
Pawel Jakub Dawidek
565bc10111 Add a very simple and small GEOM class - ZERO.
It creates very huge provider (41PB) /dev/gzero.
On BIO_READ request it zero-fills bio_data and on BIO_WRITE it does nothing.
You can also set kern.geom.zero.clear sysctl to 0 to do nothing even for
BIO_READ.

I'm using it for performance testing where it is very helpful.

MFC after:	3 days
2005-07-25 10:03:16 +00:00
Poul-Henning Kamp
0322f8dc8d Comment typo 2005-07-20 18:08:16 +00:00
Pawel Jakub Dawidek
0499edf459 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>
MFC after:	3 days
2005-07-17 13:15:02 +00:00
Yoshihiro Takahashi
0bf2708b8c Merged from geom_mbr.c revisions 1.62 and 1.66.
- Implement a gctl handler and the verb "write MBR".
2005-07-15 15:29:45 +00:00
Lukas Ertl
7ad68986b8 *) Implement round-robin reads for multiplex volumes.
*) Plug a possible memory leak. [1]

[1] obtained from: pjd@.
2005-07-15 13:38:06 +00:00
Poul-Henning Kamp
1c3cf26412 Implement a gctl handler and the verb "write MBR" which can be used to
update metadata and bootcode while the MBR is in use.

MFC candidate
2005-07-15 08:00:44 +00:00
Pawel Jakub Dawidek
84436f14c4 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
Pawel Jakub Dawidek
59ddf345d5 After provider creation!! 2005-05-25 15:54:17 +00:00
Pawel Jakub Dawidek
0f2bbe5ba4 - 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
Pawel Jakub Dawidek
4eafb037f6 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
Pawel Jakub Dawidek
d246aa55e7 Correct typo. 2005-05-18 21:53:08 +00:00
Lukas Ertl
0164489c96 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