Commit Graph

750 Commits

Author SHA1 Message Date
pjd
2a65f27c4f Don't use 'bp' after its destruction! 2004-08-05 14:07:21 +00:00
pjd
a762088315 Simplify a bit - we could use 'sc' here as it was initialized properly. 2004-08-05 13:22:17 +00:00
pjd
0b32901632 - Add two fields to bio structure: 'bio_cflags' which can be used by
consumer and 'bio_pflags' which can be used by provider.
- Remove BIO_FLAG1 and BIO_FLAG2 flags. From now on new fields should be
  used for internal flags.
- Update g_bio(9) manual page.
- Update some comments.
- Update GEOM_MIRROR, which was the only one using BIO_FLAGs.

Idea from:	phk
Reviewed by:	phk
2004-08-04 21:35:05 +00:00
pjd
c111951680 - Add "prefer" balance algorithm. When used, only disk with the biggest
priority will be used for reading.
- Bump version number.
2004-08-04 12:09:53 +00:00
pjd
a107bfb237 MFp4: We don't really need g_mirror_free_disk() function. 2004-08-04 10:02:06 +00:00
pjd
f381f9a205 Fix comment. 2004-08-03 15:41:33 +00:00
pjd
889eca7e19 - Fix unloading by the same way it is done in my other classes:
set gp->softc to NULL and return ENXIO when it is NULL, so GEOM
  will not panic or hang, but unload one device on every 'unload'.
  This make 'unload' command usable, but it have to be executed
  <number of devices> + 1 times.
- Made use of 'pp' variable.
2004-08-02 00:37:40 +00:00
pjd
1dba5c34f9 Typo. 2004-08-01 20:41:58 +00:00
pjd
e628843899 - Launch main provider when there are no more disks in NEW state.
- Log syncid bump at debug level 1.
2004-08-01 09:01:50 +00:00
pjd
578bfcb897 If there are no valid components after the timeout, just destroy device.
There is probably nothing to wait for.
2004-07-31 22:10:51 +00:00
le
e2ca49b0bc Propagate size changes upwards. 2004-07-31 21:34:21 +00:00
pjd
e0a971d6d4 Handle spoil event in dedicated function: g_mirror_spoiled().
The different between the new function and g_mirror_orphan() (which was
used previously) is that syncid is bumped immediately, instead of on
first write, because when consumer was spoiled, it means, that its
provider was opened for writing, so we can't trust that its data
will be valid when it will be connected again.
2004-07-31 21:08:17 +00:00
pjd
e9aabe3b50 Remove unused field. 2004-07-31 13:03:38 +00:00
pjd
cd4a05fa81 Destroy synchronization geom immediately. This should fix unloading without
stopping all mirrors.
2004-07-31 11:22:03 +00:00
pjd
6bb53152ba Allow slice creation on providers from MIRROR class.
This should allow mounting root file system from a mirror.
2004-07-31 01:17:20 +00:00
pjd
0d74239c00 Add '-p' option for 'insert' command which allows to specify priority
of the new component.
Version number wasn't bumped (it should be), because I think there are
no geom_mirror users yet.
2004-07-31 00:54:44 +00:00
pjd
8c9f26b7ea - Check if 'slice' argument was given.
- Check if disk isn't already the mirror component.
2004-07-31 00:51:33 +00:00
pjd
ecaa6b91a6 Dump correct field. 2004-07-31 00:37:14 +00:00
le
d9c517d66a Set the access counts of a subdisk correctly when attaching it
to a plex that already has subdisks.
2004-07-30 23:40:38 +00:00
pjd
adaa0482b4 Add GEOM_MIRROR class which provide RAID1 functionality and has many useful
features. The gmirror(8) utility should be used for control of this class.
There is no manual page yet, but I'm working on it with keramida@.

Many useful tests provided by:	simon (thank you!)
Some ideas from:		scottl, simon, phk
2004-07-30 23:13:45 +00:00
pjd
6e57ee9a4c Nuke geom_mirror class. New geom_mirror class is in the way.
Approved by:	phk
2004-07-30 19:59:36 +00:00
pjd
0560d38991 Allow to create slices on providers from class LABEL and class NOP.
This is really ugly way to do this, but there is no other way for now.
It allows to mount root file system from providers which belong to
those classes.

Approved by:	phk
2004-07-30 19:55:12 +00:00
pjd
7a7cae7b30 - Add '-S' option, which allow to specify sector size for transparent
provider.
- Bump version number.

This allows for a quite interesting trick. One can setup a stripe with
stripe size of 512 bytes and create transparent provider on top of it
with sector size equal to <ndisks> * 512. The result will be something
like RAID3 without parity disk (every access will touch all disks).
2004-07-30 08:19:22 +00:00
le
8e620f7e71 Shut up the compiler and temporarily '#if 0' gv_destroy_geom(),
until we need it again.
2004-07-29 11:32:09 +00:00
pjd
73a684d587 Improve geom(8)'s 'list' command to show geoms and their providers and
consumers. Teach STRIPE, CONCAT and NOP classes about this improvement.
2004-07-26 17:14:47 +00:00
pjd
3a2f13d5f5 Change naming scheme from /dev/<name>.stripe to /dev/stripe/<name>. 2004-07-26 16:10:27 +00:00
pjd
badd010cc7 Change naming scheme from /dev/<name>.concat to /dev/concat/<name>. 2004-07-26 16:08:32 +00:00
pjd
dca201cdfb M_WAITOK is ok here, while I'm using M_WAITOK later in this function. 2004-07-26 15:41:28 +00:00
pjd
4a150a7afe M_WAITOK is ok here, while I'm using M_WAITOK later in this function. 2004-07-26 15:35:04 +00:00
le
8870a257a7 Save the vinum config back to disk after syncing two plexes. 2004-07-26 07:30:21 +00:00
le
d360d6d42f There's a chance that the VINUMDRIVE class tastes before the
VINUM class, so let the VINUMDRIVE class parse the on-disk
configuration, too.
2004-07-25 23:01:09 +00:00
le
c5dbc6f1ad Check for a NULL pointer before dereferencing it. 2004-07-25 09:41:31 +00:00
le
9795b96112 Use a temporary geom when tasting vinumdrives and lock the 'real'
vinumdrive geom with an exclusive bit.  This should fix the problem
when underlying partitions overlap (i.e. the 'a' partition is at
the same offset as the 'c' partition).

Ideas borrowed from pjd@, quite a bit of testing by
Matthias Schuendehuette <msch@snafu.de>.
2004-07-24 22:26:40 +00:00
le
64d6caaef2 Disable kldunloading of geom_vinum temporarily until I figured out
how to do it correctly.
2004-07-24 19:04:24 +00:00
pjd
67d8cb396e MFp4: Add two options for gnop(8)'s 'create' command:
-o offset - specifies where to start on the original provider
	-s size - specifies size of the transparent provider
2004-07-19 07:52:56 +00:00
pjd
6639216695 Fix copy&paste bug. 2004-07-18 16:51:58 +00:00
pjd
a2b179fee8 Fix exclusive-bit leakage. 2004-07-18 06:54:29 +00:00
phk
5c95d686a1 Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.

A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".
2004-07-15 08:26:07 +00:00
pjd
9b7cadd593 Remove unused macro. 2004-07-13 12:01:29 +00:00
pjd
8d2fee9da1 Decrease log level of one debug message, so there is no hole (level 2
wasn't used at all).
2004-07-13 12:01:11 +00:00
pjd
c684a2d6ed Minor sysctl description fixes.
Submitted by:	simon
2004-07-13 11:23:31 +00:00
pjd
227209a4da Implement "FAST" mode for GEOM_STRIPE class and turn it on by default.
In this mode you can setup even very small stripe size and you can be
sure that only one I/O request will be send to every disks in stripe.
It consumes some more memory, but if allocation fails, it will fall
back to "ECONOMIC" mode.

It is about 10 times faster for small stripe size than "ECONOMIC" mode
and other RAID0 implementations. It is even recommended to use this
mode and small stripe size, so our requests are always splitted.

One can still use "ECONOMIC" mode by setting kern.geom.stripe.fast to 0.
It is also possible to setup maximum memory which "FAST" mode can consume,
by setting kern.geom.stripe.maxmem from /boot/loader.conf.
2004-07-09 14:30:09 +00:00
phk
5be6baa85c Only detach consumers which are attached when we wither stuff away.
Pointed out by:	pjd
2004-07-09 14:06:17 +00:00
phk
042d10f8ef Make withering water tight.
When we orphan/wither a provider, an attached geom+consumer could
end up being withered as a result and it may be in front of us in
the normal object scanning order so we need to do multi-pass.  On
the other hand, there may be withering stuff we can't get rid off
(yet), so we need to keep track of both the existence of withering
stuff and if there is more we can do at this time.
2004-07-08 16:17:14 +00:00
phk
a0a0195602 Fail normally rather than KASSERT if attempt to open a spoiled consumer. 2004-07-08 10:34:09 +00:00
pjd
28129f07e4 Add missing argument. 2004-07-06 17:06:54 +00:00
pjd
67f23990b6 Properly free resources if g_access() fails. 2004-07-06 16:29:32 +00:00
pjd
7822814115 - Add 'stop' command, which works just like 'destroy' command, but sounds
less dangerous.
- Update manual pages and extend examples.
- Bump versions.
2004-07-05 21:16:37 +00:00
pjd
c3fce26a1f g_clone_bio() can fail, be ready for this.
Approved by:	le
2004-07-05 13:24:22 +00:00
phk
0b5402fc6b We only need to check for overlaps if we increasing access counts. 2004-07-04 13:44:48 +00:00