summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of the gv_bioq hack in most parts of the I/O path andle2006-01-065-81/+89
| | | | use the standard bioq structures.
* MFp4: Typo fix (without it the XML GEOM tree wasn't consistent).pjd2005-12-191-1/+1
| | | | Reported by: Eric Anderson <anderson@centtech.com>
* Fix build breakage by fixing typo.pjd2005-12-091-1/+1
| | | | Reported by: glebius
* - Allow to specify the byte which will be used for filling read buffer.pjd2005-12-081-4/+7
| | | | | | - Improve sysctl description a bit. Submitted by: Ivan Voras <ivoras@gmail.com>
* Teach NOP GEOM class how to gather the following statistics:pjd2005-12-082-3/+74
| | | | | | | | - number of read I/O requests, - number of write I/O requests, - number of read bytes, - number of written bytes. Add 'reset' subcommand for resetting statistics.
* It is unclear who is wrong and who is right, but when operating onsobomax2005-11-301-0/+10
| | | | | | | | | | | | | | | plain file bsdlabel(8) always writes label at a fixed offset from its beginning (512 bytes), regardless of the sector size. At the same time, bsdlabel geom class expects label to be available at the very beginning of the second sector. As a result, images prepared in userland for media with sector size different from 512 bytes (i.e. 2k for cdroms) are not recognized by the tasting mechanism. Solve the problem by always looking for the label at 512-byte offset if we can't find it at the beginning of the second sector and sector size is not 512 bytes.
* Don't pass error value pointer to g_read_data(9) at all if we don'tsobomax2005-11-3013-25/+24
| | | | | | have any use of it. Suggested by: pjd
* Check for g_read_data(9) errors properly:sobomax2005-11-3017-26/+26
| | | | | | | | | | o The only indication of error condition is NULL value returned by the function; o value pointed to by error argument is undefined in the case when operation completes successfully. Discussed with: phk
* Kill leading whilespace.sobomax2005-11-301-1/+1
|
* We do nothing with returned error value, so just remove it.pjd2005-11-291-3/+2
|
* Check value returned by g_read_data(9), otherwise we can end in panic(9)sobomax2005-11-291-0/+3
| | | | | | if read error happens. MFC after: 1 week
* Add sysctl descriptions.le2005-11-251-7/+8
|
* Since we want a vinum geom created anytime the module loads, movele2005-11-242-136/+27
| | | | | | | | | | | 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.
* Whitespace.le2005-11-201-8/+8
|
* Always declare variables at the start of the function.le2005-11-201-47/+110
| | | | | | | | | Don't allocate potentially large variables on the stack. Check strsep() return values when the string comes from userland. Shorten variable names for lucidity's sake. most of the stuff: Pointed out by: njl@
* Fix whitespace issue.le2005-11-201-11/+11
| | | | Pointed out by: joel@
* Finally bring in what was produced during Google SoC 2005:le2005-11-196-4/+513
| | | | | | | | | Add functions to rename objects and to move a subdisk from one drive to another. Obtained from: Chris Jones <chris.jones@ualberta.ca> Sponsored by: Google Summer of Code 2005 MFC in: 1 week
* Fix a bug that caused some /dev entries to continue to exist afterjdp2005-11-183-2/+16
| | | | | | | | | | | | | | | | | | | | | | | the underlying drive had been hot-unplugged from the system. Here is a specific example. Filesystem code had opened /dev/da1s1e. Subsequently, the drive was hot-unplugged. This (correctly) caused all of the associated /dev/da1* entries to be deleted. When the filesystem later realized that the drive was gone it closed the device, reducing the write-access counts to 0 on the geom providers for da1s1e, da1s1, and da1. This caused geom to re-taste the providers, resulting in the devices being created again. When the drive was hot-plugged back in, it resulted in duplicate /dev entries for da1s1e, da1s1, and da1. This fix adds a new disk_gone() function which is called by CAM when a drive goes away. It orphans all of the providers associated with the drive, setting an error condition of ENXIO in each one. In addition, we prevent a re-taste on last close for writing if an error condition has been set in the provider. Sponsored by: Isilon Systems Reviewed by: phk MFC after: 1 week
* o Slightly refactor the ctlreq code to maximize code sharing betweenmarcel2005-11-131-67/+127
| | | | | | | | | | | | | | verbs. Only the create verb operates on a provider. All other verbs operate on a GPT geom. Also, the GPT entry oriented verbs require a non-downgraded GPT. o Have all verbs take an optional flags parameter. The flags parameter is a string of single-letter flags. The typical use of these flags is to enable certain behaviour in support fo the gpt(8) tool. o Add dummy implementations for the destroy and recover verbs. This change causes test 2 of the GPT regression test suite to fail. The presence of a geom parameter is now required even for unknown verbs.
* Make the kern.geom.conftxt sysctl more usable by also dumping themarcel2005-11-121-5/+4
| | | | | | | | | | | MD class. Previously only the DISK class was dumped. The only consumer of this sysctl is libdisk (i.e. sysinstall) and it tests explicitly for instances of the DISK class. Dumping other classes is therefore harmless. By also dumping the MD class regression tests can be written that use the MD class for operations that would normally be done on the DISK class. The sysctl can now be used to test if those operations took an effect. An example is partitioning.
* Normalize a significant number of kernel malloc type names:rwatson2005-10-318-8/+8
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Fix possible live-lock under heavy load where we can't allocate morepjd2005-10-281-1/+12
| | | | | | | | 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
* Add checking for File record magic.takawata2005-10-261-0/+6
|
* Rough implementation of the create and add verbs. The verbs causemarcel2005-10-091-2/+290
| | | | | in-memory changes only and as such are only useful for prototyping and regression testing purposes.
* Move some devstat collection to below where large IO operations are choppedtegge2005-09-301-3/+3
| | | | | | | up. This make iostat report operations passed down to the device driver instead of operations passed down to GEOM disk. The transfer size limit imposed by the device driver is no longer hidden, improving the correlation between iostat output and device driver workload.
* - Fix "end_blk out of range" panic when INVARIANTS.fjoe2005-09-291-2/+5
| | | | | | | - Do not allow rw access. Submitted by: Dario Freni <saturnero at freesbie dot org> MFC after: 3 days
* o Don't cause a panic when the control request lacks a verb.marcel2005-09-181-5/+9
| | | | | o Don't set the error twice when the named class does not exist. It causes ioctl(2) to return with error EEXIST.
* Complete rewrite in preparation of adding support for controlmarcel2005-09-171-154/+726
| | | | | | | | | | | | | | | | | requests. The following features have been added: 1. Extensive checking and validation of both the primary and secondary headers to protect against corrupted data and to take advantage of the redundancy to allow the GPT to be used in the face of recoverable corruption. 2. Dynamic data-structures to avoid hardcoding gratuitous table limits so as to support the creation of GPT tables of (as of yet) unspecified size. 3. Only allow kernel dumps to swap partitions to provide the necessary anti-footshooting measures. Linux swap partitions are allowed. 4. Complete dump of the GPT configuration, including labels. 5. Supports Byte Order Mark (U+FEFF) handling for big-endian, little-endian and mixed-endian partition names.
* - Add a new simple facility for marking the current thread as being in ajhb2005-09-151-30/+7
| | | | | | | | | | | | | state where sleeping on a sleep queue is not allowed. The facility doesn't support recursion but uses a simple private per-thread flag (TDP_NOSLEEPING). The sleepq_add() function will panic if the flag is set and INVARIANTS is enabled. - Use this new facility to replace the g_xup and g_xdown mutexes that were (ab)used to achieve similar behavior. - Disallow sleeping in interrupt threads when invoking interrupt handlers. MFC after: 1 week Reviewed by: phk
* Fix so that when a slice or a partition is removed through g_slice_config(),rodrigc2005-09-141-0/+1
| | | | | | | | | | | | 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 Tested by: pjd, rodrigc MFC after: 1 week
* Fix copy&paste typo.pjd2005-09-101-1/+1
| | | | MFC after: 3 days
* Don't forget to initialize crp_etype field.pjd2005-09-101-0/+1
| | | | | Reported by: Nick Evans <nevans@syphen.net> MFC after: 3 days
* Set the G_PF_WITHER flag on the subdisk provider that is about tole2005-09-081-34/+1
| | | | | be destroyed. That way the GEOM system handles all deallocations and we don't have to do it ourselves.
* Remove a race condition that could result in processes being stuckphk2005-09-041-24/+30
| | | | | | | | | | | | waiting for geom events to happen: Instead of maintaining a count of outstanding events, simply look if the queue is empty. Make sure to not remove events from the queue until they are executed in order to not open a new race. Much work by: pjd Tested by: kris MT6: yes, should be.
* Typo.phk2005-09-031-1/+1
|
* Use KTR to log allocations and destructions of bios.pjd2005-08-291-0/+36
| | | | This should hopefully allow to track down "duplicate free of g_bio" panics.
* Prevent that sync operations can be started when they are alreadyle2005-08-281-71/+81
| | | | | in progress, and be a bit more user friendly in terms of error messages returned from the kernel.
* Verify length of the data to read as well.pjd2005-08-281-0/+2
|
* Shuffle around the order in which the components are compiled.le2005-08-261-14/+4
| | | | | | | | | 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.
* Verify offset before reading.pjd2005-08-261-1/+5
| | | | MFC after: 2 days
* Add NTFS labeling function.takawata2005-08-263-0/+115
| | | | Reviewed by:pjd
* Verify if we can actually read the data at given offset.pjd2005-08-232-6/+13
| | | | Reported by: Martin <nakal@nurfuerspam.de>
* Correct the check if a plex is accessible in case it is not up.le2005-08-221-1/+1
| | | | This makes degraded RAID5 plexes actually work.
* By default, when doing crypto work in software, start as many threadspjd2005-08-211-5/+10
| | | | | | as we have active CPUs and bind each thread to its own CPU. MFC after: 3 days
* Remove stale comment (we now always start worker thread).pjd2005-08-211-5/+0
| | | | MFC after: 3 days
* Back-out the change from revision 1.14 and allow for '/' in labels again.pjd2005-08-201-8/+0
| | | | | Convinced by: green, Gavin Atkinson, dougb, gordon MFC after: 1 day
* Add a __packed keyword to g_eli_metadata struct definition, sopjd2005-08-201-1/+1
| | | | | | | | | | | 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> MFC after: 3 days
* Allow to change number of iterations for PKCS#5v2. It can only be usedpjd2005-08-191-2/+21
| | | | | | when there is only one key set. MFC after: 3 days
* - Add a missing period.pjd2005-08-191-3/+3
| | | | | | - Fix number of spaces. MFC after: 3 days
* Avoid code duplication and implement bitcount32() function in systm.h only.pjd2005-08-192-7/+1
| | | | | Reviewed by: cperciva MFC after: 3 days
OpenPOWER on IntegriCloud