Commit Graph

1012 Commits

Author SHA1 Message Date
sobomax
4cfd00e6b6 MFC: NTFS label recognition module for geom_label(4). 2005-12-29 06:22:38 +00:00
sobomax
348bb8c4b9 MFC: check for g_read_data(9) errors properly. 2005-12-29 05:59:51 +00:00
sobomax
222f0ca986 MFC: kill leading witespace. 2005-12-29 05:34:46 +00:00
le
0ed7cd39d9 MFC:
Since we want a vinum geom created anytime the module loads, move the
  geom creation to a seperate init function and ignore the tasting.

  The config is now parsed only in the vinumdrive geom, which hopefully
  fixes the problem, that the drive class tasted before the vinum class
  had a chance, for good.

  Also restore the behaviour that the module can be loaded at boot time
  and on a running system.

--

  Check for g_read_data(9) errors properly;  don't pass error value
  pointer to g_read_data(9) at all if we don't have any use of it.
2005-12-10 14:36:17 +00:00
cvs2svn
5b47c5585e This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-12-02 00:17:35 +00:00
jdp
9bb59aa42a MFC: Fix a bug that caused some /dev entries to continue to exist after
the underlying drive had been hot-unplugged from the system.

This merges the following revisions:

  Revision  Path
  1.94      src/sys/cam/scsi/scsi_cd.c
  1.181     src/sys/cam/scsi/scsi_da.c
  1.98      src/sys/geom/geom_disk.c
  1.5       src/sys/geom/geom_disk.h
  1.88      src/sys/geom/geom_subr.c
2005-11-26 22:55:20 +00:00
le
6a3b6cb6cd MFC:
Finally bring in what was produced during Google SoC 2005:

  Add functions to rename objects and to move a subdisk from one drive
  to another.

Plus several whitespace/style fixes.
2005-11-26 11:06:11 +00:00
cvs2svn
2b0dd32330 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-11-22 19:17:43 +00:00
pjd
cf1a35e6f5 Fix possible live-lock under heavy load where we can't allocate more
memory for request.
I was sure graid3 should handle such situations well, but green@ reported
it is not and we want to fix it before 6.0.

Submitted by:	green
Approved by:	re (scottl)
2005-10-28 20:27:53 +00:00
delphij
6dbb98c55a MFC (by le)
| 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.
|
| Revision  Changes    Path
| 1.8       +1 -34     src/sys/geom/vinum/geom_vinum_rm.c

Approved by:	re (scottl)
2005-10-09 04:37:34 +00:00
delphij
e27db9d6b8 MFC (by le)
|  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.
|
|  Revision  Changes    Path
|  1.11      +81 -71    src/sys/geom/vinum/geom_vinum_init.c

Approved by:	re (scottl)
2005-10-09 04:36:44 +00:00
delphij
5cd27adb61 MFC (by le)
| Correct the check if a plex is accessible in case it is not up.
| This makes degraded RAID5 plexes actually work.
|
| Revision  Changes    Path
| 1.10      +1 -1      src/sys/geom/vinum/geom_vinum_volume.cle

Approved by:	re (scottl)
2005-10-09 04:35:42 +00:00
delphij
18a5a36c5c MFC (by le)
| 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.
|
| Revision  Changes    Path
| 1.20      +4 -14     src/sys/geom/vinum/geom_vinum_drive.c
| 1.2       +1 -1      src/sys/modules/geom/geom_vinum/Makefile

Approved by:	re (scottl)
2005-10-09 04:34:29 +00:00
delphij
be43bdee0e MFC (by phk)
| Comment typo
|
| Revision  Changes    Path
| 1.23      +1 -1      src/sys/geom/bde/g_bde_crypt.c

Approved by:	re (scottl)
2005-10-09 03:30:30 +00:00
rodrigc
3e9ac3c943 MFC 1.58
Fix so that when a slice or a partition is removed through g_slice_config(),
  it is destroyed in GEOM, in addition to being removed from /dev.
  Before this patch, if you applied a new MBR which deleted a slice,
  the deleted slice would not be in /dev, but it would still appear
  in kern.geom.conftxt and kern.geom.confxml, which would confused
  the diskPartitionEditor in sysinstall.

Submitted by:	pjd
Requested by:	delphij
Approved by:	re (scottl)
2005-10-08 22:11:38 +00:00
phk
005f5c2cde MFC:
close a race in waiting for all geom events to have been
	handled.

Approved by:	re@ (scottl)
2005-10-07 15:06:27 +00:00
pjd
252b0c2081 MFC: sys/geom/eli/g_eli.h 1.4
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>
Reminded by:	delphij
Approved by:	re (scottl)
2005-10-06 18:17:29 +00:00
fjoe
9319fa7172 MFC g_uzip.c rev. 1.5:
- Fix "end_blk out of range" panic when INVARIANTS.
- Do not allow rw access.

Approved by:	re (scott)
2005-10-02 11:22:28 +00:00
jhb
74ef9d3c8a MFC: Use the new thread no sleeping facility to replace the g_xup, g_xdown,
and dont_sleep_in_callout mutexes.  Also, disallow sleeping in hardware
interrupt handlers.

Approved by:	re (kensmith)
2005-09-26 19:49:12 +00:00
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