summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Return G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORMmarcel2008-09-291-1/+1
| | | | | | | | | if the probe succeeds. This guarantees that the BSD scheme wins over the MBR scheme when MBR gets to probe first. Build- or link-time conditions can cause schemes to end up in the linker set in a different order. Normally BSD is before MBR in the linker set and as such get to probe first. But typically when the kernel gets rebuild or relinked, this can change.
* Insert the null scheme at the head. This does not change anymarcel2008-09-291-1/+1
| | | | | functionality, but creates an invariant: the first element on the list is always the null scheme.
* Export the partition name in the conftxt and confxml output.marcel2008-09-271-6/+12
| | | | | | | The conftxt output is used by libdisk, and the confxml output is used by gpart itself (gpart show -l). Submitted by: nyan@
* Hold the root mount while we're tasting. It is possiblemarcel2008-09-271-0/+4
| | | | | | that a nested partition (typically the BSD disklabel) is not done tasting while the root file system is being mounted. While this is rare, it's still possible.
* Allow 255 sectors/track for the BSD disklabel. The previous limitmarcel2008-09-271-1/+1
| | | | | | | of 63 sectors/track is too PC BIOS specific. On pc98, where the BSD disklabel is used as well, 255 sectors/track is not uncommon. Submitted by: nyan@
* Remove unit2minor() use from kernel code.ed2008-09-261-1/+1
| | | | | | | | | | | | | | | When I changed kern_conf.c three months ago I made device unit numbers equal to (unneeded) device minor numbers. We used to require bitshifting, because there were eight bits in the middle that were reserved for a device major number. Not very long after I turned dev2unit(), minor(), unit2minor() and minor2unit() into macro's. The unit2minor() and minor2unit() macro's were no-ops. We'd better not remove these four macro's from the kernel, because there is a lot of (external) code that may still depend on them. For now it's harmless to remove all invocations of unit2minor() and minor2unit(). Reviewed by: kib
* Just a fixup for a KTRACE message I stumbled upon many moons ago.sbruno2008-09-181-1/+1
| | | | | Reviewed by: Scott Long MFC after: 2 days
* - Add a new ioctl for getting the provider name of a geom provider.lulf2008-09-071-0/+7
| | | | | | | | - Add a routine for looking up a device and checking if it is a valid geom provider given a partial or full path to its device node. Reviewed by: phk Approved by: pjd (mentor)
* Fix build.rpaulo2008-09-051-2/+2
|
* Keep entries sorted.rpaulo2008-09-053-3/+3
|
* Include the vendor in the partition name.rpaulo2008-09-051-1/+1
|
* Detect Apple HFS GPT slices.rpaulo2008-09-053-1/+9
|
* Decontextualize vfs_busy(), vfs_unbusy() and vfs_mount_alloc() functions.attilio2008-08-311-5/+4
| | | | | | Manpages are updated accordingly. Tested by: Diego Sardina <siarodx at gmail dot com>
* Commit step 1 of the vimage project, (network stack)bz2008-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* Style(9).pjd2008-08-121-3/+4
|
* Add sbuf_new_auto as a shortcut for the very common case of creating ades2008-08-099-19/+19
| | | | | | | completely dynamic sbuf. Obtained from: Varnish MFC after: 2 weeks
* Trivial commit to attempt to diagnose a svn problem. Addpeter2008-07-221-0/+1
| | | | comment that Tivo disks are APM, but do not have a DDR record.
* Clear passphrase buffer after use.pjd2008-07-201-0/+2
| | | | Submitted by: Fabian Keil <fk@fabiankeil.de> (a bit different version)
* - When renaming a drive, also set the drive name in the gvinum header.lulf2008-07-191-0/+1
| | | | | | PR: kern/125632 Approved by: pjd (mentor) MFC after: 3 days
* - Fix a logic error when updating plex configuration.lulf2008-07-111-1/+2
| | | | Approved by: pjd (mentor)
* Introduce a new lock, hostname_mtx, and use it to synchronize accessrwatson2008-07-051-0/+2
| | | | | | | | | | | | to global hostname and domainname variables. Where necessary, copy to or from a stack-local buffer before performing copyin() or copyout(). A few uses, such as in cd9660 and daemon_saver, remain under-synchronized and will require further updates. Correct a bug in which a failed copyin() of domainname would leave domainname potentially corrupted. MFC after: 3 weeks
* Avoid NULL deference.delphij2008-06-301-0/+5
| | | | Reviewed by: ivoras
* - Fix spelling errors.lulf2008-06-201-5/+5
| | | | | | Approved by: kib (mentor) PR: kern/124788 Submitted by: Hywel Mallett <Hywel -at- hmallett.co.uk>
* Add the set and unset verbs used to set and clear attributes formarcel2008-06-184-5/+130
| | | | | partition entries. Implement the setunset method for the MBR scheme to control the active flag.
* Finish the support for partition labels and add it to the XML.marcel2008-06-121-10/+86
|
* Add the raw partition type to the XML.marcel2008-06-121-6/+12
|
* Add the raw partition type to the XML.marcel2008-06-121-4/+11
|
* Add the raw partition type to the XML.marcel2008-06-121-4/+10
|
* Add the raw partiton type to the XML.marcel2008-06-121-6/+14
|
* Add the raw partition type to the XML.marcel2008-06-121-4/+10
|
* Add the partition label and the raw partition type to the XML.marcel2008-06-121-5/+19
|
* Remove the distinction between device minor and unit numbers.ed2008-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though we got rid of device major numbers some time ago, device drivers still need to provide unique device minor numbers to make_dev(). These numbers are only used inside the kernel. They are not related to device major and minor numbers which are visible in devfs. These are actually based on the inode number of the device. It would eventually be nice to remove minor numbers entirely, but we don't want to be too agressive here. Because the 8-15 bits of the device number field (si_drv0) are still reserved for the major number, there is no 1:1 mapping of the device minor and unit numbers. Because this is now unused, remove the restrictions on these numbers. The MAXMAJOR definition was actually used for two purposes. It was used to convert both the userspace and kernelspace device numbers to their major/minor pair, which is why it is now named UMINORMASK. minor2unit() and unit2minor() have now become useless. Both minor() and dev2unit() now serve the same purpose. We should eventually remove some of them, at least turning them into macro's. If devfs would become completely minor number unaware, we could consider using si_drv0 directly, just like si_drv1 and si_drv2. Approved by: philip (mentor)
* - Recognize the 'volume' parameter when creating a plex.lulf2008-05-221-1/+2
| | | | | | PR: kern/75632 Approved by: pjd (mentor) MFC after: 1 day
* - Assert that we don't send new provider event for a provider which haspjd2008-05-181-1/+3
| | | | | G_PF_WITHER flag set. - Fix typo in assertion condition (sorry, but I forgot who report that).
* Play nice with DDB pager.pjd2008-05-181-4/+18
| | | | Educated by: jhb's BSDCan presentation
* Implement the G_PART_DUMPCONF method for all 6 schemes. Also callmarcel2008-04-237-0/+113
| | | | | | | | | | the method for the (indent == NULL) case (i.e. the kern.geom.conftxt sysctl). The purpose is to extend the conftxt output with scheme- specific fields which can be used by libdisk. In particular, have the schemes dump the xs and xt fields, which contain the backward compatible values for class type and partition type. This allows libdisk to work with the legacy slicers as well as with gpart and helps/promotes migration.
* Add the bootcode verb for installing boot code. Boot codemarcel2008-04-136-23/+147
| | | | | is supported for the MBR, GPT and PC98 schemes, where GPT installs boot code into the PMBR.
* Change the order from SI_ORDER_FIRST to SI_ORDER_ANY (withinmarcel2008-03-291-1/+1
| | | | | | | SI_SUB_DRIVERS) to avoid loading schemes before all the GEOM classes have been loaded and initialized. Otherwise we may end up using mutexes that haven't been initialized (due to g_retaste() posting an event).
* Add support for PC-9800 partition tables.marcel2008-03-281-0/+428
|
* When retasting, wither any existing GEOMs of the same class. Thismarcel2008-03-281-1/+7
| | | | | | | | | | | allows the class to create a different GEOM for the same provider as well as avoid that we end up with multiple GEOMs of the same class with the same name. For example, when a disk contains a PC98 partition table but only MBR is supported, then the partition table can be treated as a MBR. If support for PC98 is later loaded as a module, the MBR scheme is pre-empted for the PC98 scheme as expected.
* Redefine G_PART_SCHEME_DECLARE() from populating a private linker setmarcel2008-03-237-27/+128
| | | | | | | | to declaring a proper module. The module event handler is part of the gpart core and will add the scheme to an internal list on module load and will remove the scheme from the internal list on module unload. This makes it possible to dynamically load and unload partitioning schemes.
* Add g_retaste(), which given a class will present all non-open providersmarcel2008-03-232-0/+61
| | | | | | | | | | to it for tasting. This is useful when the class, through means outside the scope of GEOM, can claim providers previously unclaimed. The g_retaste() function posts an event which is handled by the g_retaste_event(). Event suggested by: phk
* - Fix a memory leak when re-discovering a gvinum configuration.lulf2008-03-181-0/+2
| | | | | Approved by: pjd (mentor) MFC after: 1 week
* Add support for VTOC8 labels (aka sun disk labels). When a label doesmarcel2008-03-021-0/+480
| | | | | | | | not have VTOC information about the partitions, it will be created. This is because the VTOC information is used for the partition type and FreeBSD's sunlabel(8) does not create nor use VTOC information. For this purpose, new tags have been added to support FreeBSD's partition types.
* Follow-up improvements to the handling of false positives: If themarcel2008-02-291-3/+32
| | | | | | | | | | | partition table is empty, check to see if we have something that looks sufficiently like a BPB. On non-i386 machines, the boot sector typically doesn't contain boot code; the end of the boot sector is all zeroes. This is also where the partition table is for MBRs. We only check the sector size and cluster size, as that seems to be the most reliable across implementations, BPB versions and platforms.
* Better handle false positives. The MBR differs from the boot sectormarcel2008-02-281-6/+24
| | | | | | | | | | only because there's a partition table where the boot sector has boot code. Boot sectors without boot code look like a MBR for all practical purposes. This change adds a check for the partition table and fails the probe when it's obvously invalid. The assumption being that the sector contains a boot sector and not a MBR. More checks are needed to distinguish a boot secto without boot code from a (empty) MBR.
* geom_lvm(4) is now known as geom_linux_lvm(4).thompsa2008-02-202-1290/+0
|
* Add a geom class to map Linux LVM logical volumes.thompsa2008-02-202-0/+1291
| | | | | | | | | | | The logical disks will appear as /dev/lvm/<vol group>-<logical vol>, for instance /dev/lvm/vg0-home. G_LINUX_LVM currently supports linear stripes with segments on multiple physical disks. The metadata is read only, logical volumes can not be allocated or resized. Reviewed by: Ivan Voras Previously known as geom_lvm(4), rename requested by des, phk.
* Teach the dump and minidump code to respect the maxioszie attribute ofscottl2008-02-151-0/+1
| | | | the disk; the hard-coded assumption of 64K doesn't work in all cases.
* Unbreak build, size_t is larger on 64bit platforms.thompsa2008-02-111-1/+1
|
OpenPOWER on IntegriCloud