summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass the file->flags down to geom ioctl handlers.phk2004-12-126-8/+20
| | | | | | | | Reject certain ioctls if write permission is not indicated. Bump geom API version. Reported by: Ruben de Groot <mail25@bzerk.org>
* - Turn off 'fast' mode by default and increase maximum memory to consumepjd2004-12-091-2/+2
| | | | | when this mode is used. - Manual page update.
* o Don't limit GPT as a rank 2 provider. Allow it to be connectedmarcel2004-12-051-17/+25
| | | | | | | | | anywhere in the DAG. This includes configurations that are not allowed by the EFI specification. o Reject a GPT partition table if it's not preceeded by a PMBR. There's no need to preserve the MBR partitioning anymore as GPT is mature and with the first bullet extending the applicability of GPT, it's better to be a bit more strict.
* When initializing device, set d_softc and d_no fields for all components,pjd2004-12-041-3/+4
| | | | | | | | because we know it then and we need it when inserting a component which wasn't destroyed while device was running. Reported by: Michael Handler <handler@grendel.net> MFC after: 1 week
* Add observations of the Linux98 and Grub/98 boot loaders. Theseimp2004-11-301-5/+15
| | | | | | | | | observations lead me to believe that the convetion for pc98 boot loaders is to have a jump unstruction, followed by a string, followed by code. The jump usually doesn't have a nop after it and usually the string is NUL terminated, but Grub/98 breaks both of these rules. # I looked for, but failed to find the Minux boot blocks for PC-9801 port.
* Reject tasting of this provider if the sector size isn't a multiple ofimp2004-11-301-3/+6
| | | | | | | | | | | | | | | | | | | 512. If I had an audio cdrom in my cd player when I booted my system, I'd get a panic from geom because you can't read 8192 bytes from an audio cdrom. Remove XXX comment about IPL1 and replace it with some information from my soon to be published web page on the pc98 disk layout. The IPL1 test was the result of an observation of a disk with FreeBSD's boot0 program. It was testing part of an area what appears to be reserved for a boot loader name, which comes after a jump over this area. I don't yet know if it is required to be any specific jump instruction, or if the destination has to be location 11. [1] [1] FreeBSD Press No. 13, page 115, poorly translated by myself. The picture there shows offset 8 as the destination of the jump, but FreeBSD's boot0 program has three padding NULs after the IPL1 name and uses a 16-bit 'jmp' instruction.
* Fix a long standing bug in geom_mbr which is only now exposed by thephk2004-11-281-4/+14
| | | | | | | | | | | | | | | correct open/close behaviour of filesystems: When an ioctl to modify the MBR arrives, we cannot take for granted that we have the consumer open. The symptom is that one cannot run 'boot0cfg -s2 /dev/ad0' in single-user mode because / is the only open partition in only open r1w0e1. If it is not, we attempt to increase the write count by one and decrease it again afterwards. Presumably most if not all other slices suffer from the same problem.
* Implement 'setstate' to allow setting the state of drives and subdisksle2004-11-263-5/+82
| | | | for debugging and emergency purposes.
* Implement checkparity/rebuildparity.le2004-11-267-13/+316
|
* - Add missing Giant drop before acquiring the topology lock.pjd2004-11-231-3/+6
| | | | - Move DROP_GIANT()/PICKUP_GIANT() to g_gate_ioctl().
* Use M_ZERO to not panic in mtx_init when INVARIANTS enabled.fjoe2004-11-201-1/+1
| | | | | Submitted by: simokawa MFC after: 1 week
* Move RAID5 offset calculation into a separate function to avoidle2004-11-151-50/+56
| | | | code duplication.
* Share gv_roughlength() between kernel and userland, as we will need itle2004-11-154-36/+36
| | | | there later.
* Before trying to update metadata (so open consumer for writing), be surepjd2004-11-092-21/+53
| | | | | | | | | | that the events queue is empty. In other case we're able to hit the race where for example da0s1 is tasted by some other class, which means that da0 is open with exclusive bit set, which means that we can't open da0 for writing if it is our component. Reported by: Attila Nagy <bra@fsn.hu> (and somebody else sometime ago, but I cannot find who it was)
* Introduce g_waitidlelock() function which is simlar to g_waitidle(),pjd2004-11-092-0/+13
| | | | | | | but should be called with the topology lock held and returns with the topology lock held and empty event queue. Approved by: phk (sometime ago)
* Don't rely on DIRTY flag to be sure that consumer if open, becausepjd2004-11-092-2/+2
| | | | | DIRTY flag can be removed in idle process. Use consumer's acw field instead to avoid opening consumer twice.
* For BIO_READ check if provider is open for reading and for BIO_WRITE,pjd2004-11-091-3/+11
| | | | | | check if provider is open for writing. This fixes panic when device is open only for writing and we send write request.
* Drop Giant lock before grabbing the topology lock.pjd2004-11-092-0/+4
|
* If device is marked as beeing destroyed, deny all access requests.pjd2004-11-082-2/+4
|
* Don't forget to make sure that there are no not-finished requests beforepjd2004-11-052-30/+66
| | | | | | marking components as clean. Pointed out by: scottl
* - Mark all raid3 components as clean after kern.geom.raid3.idletime seconds.pjd2004-11-052-2/+82
| | | | - Make kern.geom.raid3.timeout variable tunable.
* Mark raid3 devices as clean on shutdown (after all file systems arepjd2004-11-051-3/+52
| | | | | | unmounted). Suggested by: scottl
* - Use ->index consumer's field to track number of in-flight requests.pjd2004-11-051-2/+10
| | | | - Remove unused #include.
* Use shutdown hooks to mark mirrors as clean after all file systems arepjd2004-11-051-1/+47
| | | | | | unmounted. Suggested by: scottl
* Remove unused #include.pjd2004-11-051-1/+0
|
* - Add a sysctl kern.geom.mirror.idletime, so one can specify after how manypjd2004-11-051-13/+37
| | | | | | | | seconds of idling, DRITY flags are removed. - If mirror is in idle state or is not open for writing, sleep without timeout when waiting for I/O requests. - Don't use atomic operations, for now sysctls are protected by Giant. - Update debugs.
* MFp4:pjd2004-11-052-13/+69
| | | | | | | | | | | | | | | | | | | | | | - Fix for good (I hope) force-stopping mirrors and some filure cases (e.g. the last good component dies when synchronization is in progress). Don't use ->nstart/->nend consumer's fields, as this could be racy, because those fields are used in g_down/g_up, use ->index consumer's field instead for tracking number of not finished requests. Reported by: marcel - After 5 seconds of idle time (this should be configurable) mark all dirty providers as clean, so when mirror is not used in 5 seconds and there will be power failure, no synchronization on boot is needed. Idea from: sorry, I can't find who suggested this - When there are no ACTIVE components and no NEW components destroy whole mirror, not only provider. - Fix one debug to show information about I/O request, before we change its command.
* Finish cut&paste adjustments.phk2004-11-041-1/+1
| | | | Spotted by: tegge
* Stop dumping the MBR entries under bootverbosephk2004-11-031-2/+2
|
* Stop wasting a bootverbose line on all geom slices.phk2004-11-031-1/+1
|
* Don't set si_bsize_phys, nobody cares.phk2004-10-291-2/+0
|
* Add GEOM class "VFS" for filesystems and other buffer cache usersphk2004-10-292-0/+194
| | | | | | | of GEOM devices. There is nothing magic about this, it just gives a bufobj interface to GEOM.
* Add g_wither_geom_close() function.phk2004-10-292-0/+18
|
* Give dev_strategy() an explict cdev argument in preparation for removingphk2004-10-291-2/+2
| | | | | | | | | | | buf->b-dev. Put a bio between the buf passed to dev_strategy() and the device driver strategy routine in order to not clobber fields in the buf. Assert copyright on vfs_bio.c and update copyright message to canonical text. There is no legal difference between John Dysons two-clause abbreviated BSD license and the canonical text.
* Give each plex a separate queue where held back bios are put on.le2004-10-262-3/+16
| | | | | | | This lowers the CPU usage of the worker thread and prevents a possible live lock on non-SMP machines. MFC candidate.
* Use unit number allocation functions for GEOM minor numbers.phk2004-10-252-11/+18
|
* Retire si_stripesize and si_stripeoffset they will not be needed in cdevphk2004-10-251-2/+0
| | | | in the future.
* Don't call g_waitidle(), it happens automagically now.phk2004-10-233-6/+3
|
* Add a new per-thread private flag: TDP_GEOM.phk2004-10-231-1/+8
| | | | | | | | | | | | | | This flag gets set whenever the thread posts an event on the GEOM event queue, and if the flag is set when the thread is prepared to return to userland from the kernel, g_waitidle() will be called to make sure that the posted events have completed. This can replace an insufficient number of g_waitidle() calls in various other places, and has the advantage of being failsafe: Any system call which does a VOP_OPEN()/VOP_CLOSE will now correctly wait for any geom events it posted as part of spoils or tastes. Assert that topology and Giant is not held in g_waitidle().
* Move the prototype for g_waitidle() to a more visible place.phk2004-10-231-1/+0
|
* - Turn KASSERT()s into warning printf()'s in the g_class_load() routine.arr2004-10-221-10/+26
| | | | | | | This removes a panic that will occur if you build with GENERIC and attempt to kldload a GEOM module that is already in the kernel. Reviewed by: phk
* Add KTR_GEOM, which allows tracing of basic GEOM I/O events occuringrwatson2004-10-211-0/+26
| | | | | | in the g_up and g_down threads. Each time a bio is propelled up and down the stack, an event is generating showing the provider, offset, and length, as well as thread wakeup and work status information.
* Ehh. Introduce a hack: Wait for 3 seconds, so GEOM is able to give uspjd2004-10-141-0/+5
| | | | | | | | | | | | providers for tasting. Before this hack, race below is possible: SI_SUB_RAID (no not-fully-configured geoms, so don't block) GEOM tasting (now geoms are created) SI_SUB_MOUNT_ROOT (if root file system is placed on a mirror, it is possible that this mirror is not fully configured yet) There is a lot of work to do to avoid such hacks and I need a working solution before 5.3, sorry. Reported by: John Hay <jhay@icomtek.csir.co.za>
* Only allow for unloading when there are no geoms in LABEL GEOM class.pjd2004-10-141-1/+16
| | | | | | | | | We have to use our own destroy_geom method, because default one, which is a part of geom_slice is broken. MT5 candidate. PR: kern/72467 Submitted by: Vladimir Novoseltsev
* When loading GEOM modules, we expect the actual load process to be donegreen2004-10-121-1/+9
| | | | | | | | | | | | | | | | by the time that kldload(8) returns. Satisfy that by making the GEOM module load event -- only when the kernel is !cold -- wait until the GEOM module init function has finished instead of returning immediately. This is the other half of fixing md(8) (actually, "mfs" in fstab(5)) that is similar to r1.128 of src/sys/dev/md/md.c. This bug would be why RAM disks would often fail on boot and the first call to mdconfig(8) would probably fail. pjd has ideas for not requiring kldload(8) to work synchronously for control devices that could make this obsolete. Silence on: -arch
* Trace information about a buffer while we still control it.ups2004-10-111-2/+3
| | | | | Reviewed by: phk Approved by: sam (mentor)
* Only do the geometry translations on ad* devices, other devices seems tosos2004-10-081-18/+22
| | | | | have their own way of life. Those other devices translations should be moved here as well.
* Be sure to always return 0 for negative access requests.pjd2004-10-071-0/+8
| | | | Reported by: Maciej Kucharz <qk@comp.waw.pl>
* Move the PC98 specific geometry "gunk" to geom_pc98.c where it belongs.sos2004-10-071-0/+19
| | | | | | | | This also adds support for bigger disks on the controller I have access to, and maybe others if I understood the adhoc methods used on those. Those with more PC98 bigdrive controllers it is hereby invited to add/fix support for those in geom_pc98.c and not using #ifdef PC98 all over the place.
* Don't set the BIO_ONQUEUE debugging flag until we actually put the biophk2004-10-061-1/+1
| | | | onto a queue. This made the ENOMEM handling an instant panic.
OpenPOWER on IntegriCloud