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.
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
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.
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)
| 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)
| 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)
| 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)
| 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)
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)
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)
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)
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)
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)
- 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)
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)
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)
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.
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).