sys/geom/raid3/g_raid3.c 1.70-1.72
- Don't use f-word in comments. We are gentlemans.
Pointed out by: Maciej Sobczak
- Commit the results of the typo hunt by Darren Pilgrim.
This change affects documentation and comments only,
no real code involved.
PR: misc/101245
Submitted by: Darren Pilgrim <darren pilgrim bitfreak org>
Tested by: md5(1)
Commit to HEAD by: yar
- Not only a request from us can be passed to g_{mirror,raid3}_worker()
function, but also a request to us, in which case checking bio_cflags
is wrong, because the class above us is controling it, not we.
sys/geom/geom_io.c 1.70
Add g_duplicate_bio() function which does the same thing what g_clone_bio()
is doing, but g_duplicate_bio() allocates new bio with M_WAITOK flag.
- Allow to close access even if device is already destroyed.
Reported by: Ulrich Spoerlein <uspoerlein@gmail.com>
PR: kern/98093
- When kern.geom.raid3.use_malloc tunnable is set to 1, malloc(9) instead of
uma(9) will be used for memory allocation.
In case of problems or tracking bugs, there are more useful tools for
malloc(9) debugging than for uma(9) debugging, like memguard(9) and
redzone(9).
- Use proper defines instead of magic values.
- Use proper G_MIRROR_DESTROY_* defines instead of magic values.
- Allow to close access even if device is already destroyed.
Reported by: Ulrich Spoerlein <uspoerlein@gmail.com>
PR: kern/98093
In g_dev_strategy(), when failing an IO request with EINVAL due to
offset or request size which is not a multiple of the sector size, make
sure that the bio is set to indicate that no data has actually been
transferred.
The result of this is that the file offset is no longer incremented for
these requests. The fact that the file offset was incremented broke
fdisk(8)'s probing of sector size for non-512 byte sector sizes.
sys/geom/eli/g_eli_crypto.c 1.3
Sync geli with HEAD.
- geli(8) provides keys on newsession time, so remove CRD_F_KEY_EXPLICIT flag
as HW crypto drivers don't support it.
- Correct debug: we are sending child bio here, not parent bio.
- Pass BIO_GETATTR requests down.
sys/geom/raid3/g_raid3.h 1.18
sys/geom/raid3/g_raid3_ctl.c 1.16
Sync graid3 with HEAD.
- Introduce and use delayed-destruction functionality from a pre-sync hook,
which means that devices will be destroyed on last close.
This fixes destruction order problems when, eg. RAID3 array is build on
top of RAID1 arrays.
Requested, reviewed and tested by: ru
- Be sure to not destroy device twice. This is only possible in theory, but
with this change there is even no theoretical race.
- Remove dead code.
- Comment possible event miss, which isn't critical, but probably can be
fixed by replacing the event lock usage with the queue lock.
- Use G_RAID3_FOREACH_SAFE_BIO() macro instead of G_RAID3_FOREACH_BIO() in
two places where g_io_request() is called. g_io_request() can free bio
structure so we can't reference it after and G_RAID3_FOREACH_BIO() macro
was doing this.
Found by: Coverity Prevent analysis tool (with my new models)
sys/geom/mirror/g_mirror.h 1.23
sys/geom/mirror/g_mirror_ctl.c 1.16
Sync gmirror with HEAD:
- Introduce and use delayed-destruction functionality from a pre-sync hook,
which means that devices will be destroyed on last close.
This fixes destruction order problems when, eg. RAID3 array is build on
top of RAID1 arrays.
Requested, reviewed and tested by: ru
- Be sure to not destroy device twice. This is only possible in theory, but
with this change there is even no theoretical race.
- Remove dead code.
- Comment possible event miss, which isn't critical, but probably can be
fixed by replacing the event lock usage with the queue lock.
We shouldn't lock the topology here - we will panic on assertion inside
g_raid3_bump_syncid().
Reported by: Bradley W. Dutton <brad-fbsd-stable@duttonbros.com>
Approved by: re (kensmith)
- Don't hold the device sx lock when going to sleep.
- Prevent possible live-lock in case of memory problems by freeing
already completed requests first.
Reported and tested by: markus, Bradley W. Dutton <brad-fbsd-stable@duttonbros.com>
Approved by: re (hrs)
Fix storing offset of already synchronized data. Offset in entire array was
stored in metadata instead of an offset in single disk.
After reboot/crash synchronization process started from a wrong offset
skipping (not synchronizing) part of the component which can lead to data
corrutpion (when synchronization process was interrupted on initial
synchronization) or other strange situations like 'graid3 status' showing
value more than 100%.
Reported, reviewed and tested by: ru
Reported by: Dmitry Morozovsky <marck@rinet.ru>
Approved by: re (hrs)
it on the very beginning of the second sector. This makes it compatible
with labels created by disklabel(8) on non-512-byte-per-sector
devices.
Approved by: re
Synchronize graid3(8) with HEAD:
- Speed up synchronization process by using configurable number of parallel
I/O requests.
- Reimplement graid3 softc synchronization by using per-device sx(9) lock.
- Stop synchronization from pre-sync hook.
- Fix possible race between synchronization and regular requests.
Approved by: re (mux)
Synchronize gmirror(8) with HEAD:
- Speed up synchronization process by using configurable number of parallel
I/O requests.
- Allow for kernel dumps to the mirror.
- Reimplement gmirror softc synchronization by using per-device sx(9) lock.
- Stop synchronization from pre-sync hook.
- Fix possible race between synchronization and regular requests.
Approved by: re (mux)
We need to check if file system size is equal to provider's size, because
sysinstall(8) still bogusly puts the first partition at offset 0 instead of 16,
so glabel/ufs will find file system on a slice instead of partition.
Before sysinstall is fixed, we must keep this code, which means that we
wont't be able to detect UFS file systems created with 'newfs -s ...'.
PS. bsdlabel(8) creates partitions properly.
Approved by: re (hrs)
vnode_create_vobject() while preserving the binary ABI
to filesystem modules in RELENG_6: introduce a new function
vnode_create_vobject_off() that takes the size argument
as off_t; move all stock file systems to it; re-implement
the old vnode_create_vobject() using vnode_create_vobject_off()
so that old or binary-only FS modules can work w/o hitting the
bug. The trick is to pass a size of 0 to vnode_create_vobject_off()
so that it will call VOP_GETATTR() and thus get the actual,
untruncated file size even if the calling module still uses
the old vnode_create_vobject().
PR: kern/92243
Approved by: re (scottl)
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)