summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add a geom class to map Linux LVM logical volumes.thompsa2008-02-112-0/+1290
| | | | | | | | | The logical disks will appear as /dev/lvm/<vol group>-<logical vol>, for instance /dev/lvm/vg0-home. GLVM 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
* Various fixes:marcel2007-12-241-41/+25
| | | | | | | | | | | | | | | o BSD disklabels have relative offsets. Even for the BSD in MBR slice setup, except when the mbroffset ioctl is supported. Since we don't support that ioctl, bsdlabel(8) expects relative offsets. So, when reading an existing disklabel, correct for disklabels that mistakenly have the mbroffset offsets. o Don't take the geometry seriously, because it's untrustworthy. We do expect the numbers to be within range. This means that the secperunit field will not be computed from secpercyl and ncyls, but simply is the mediasize in sectors. o Don't enforce partitions to be aligned to track boundaries. The default label, constructed by bsdlabel(8), puts partition a at offset BBSIZE bytes, which commonly means sector 16.
* Chop DIOCGDELETE from userland up in 1024 sector chunks to give geom_diskphk2007-12-161-2/+18
| | | | | | | or any other bio chopping geom a reasonable size of work. Check for delivered signals between chunks, because the request size and service time is unbounded.
* Don't limit BIO_DELETE requests to MAXPHYS, they perform no dataphk2007-12-162-5/+3
| | | | transfers, so they are not subject to the VM system limitation.
* Decode as many or as few partition entries as the label claims theremarcel2007-12-091-1/+1
| | | | are. We have already checked it against the caller provided maxpart.
* Fix a bug in the add verb, where we failed to keep the listmarcel2007-12-091-2/+2
| | | | | of partitions in index-order. This is assumed by the APM, MBR and BSD partitioning schemes.
* Internal partitions can not be deleted or modified.marcel2007-12-081-2/+2
|
* Skip internal partitions in the check for (user) partitions formarcel2007-12-081-1/+1
| | | | | the destroy command. Previously a freshly created BSD disklabel could not be destroyed because of the internal partition.
* Add support for FS_ZFS.marcel2007-12-081-0/+7
|
* Only attach to a GPT partition if it has the GPT_ENT_TYPE_FREEBSD type.jhb2007-12-061-0/+13
| | | | | | | | XXX: This only works currently with GEOM_GPT which only exists in 6.x. XXX: I didn't add 'mbroffset' support for a GPT partition holding a BSD label as I'm not sure if they use relative or absolute offsets. MFC after: 3 days
* Add a BSD disklabel backend to g_part:marcel2007-12-063-14/+494
| | | | | | | o Disklabels can have between 8 and 20 partitions (inclusive). o No device special file is created for the raw partition. o Switch ia64 to use this backend. o No support for boot code yet.
* On some arches, openssl is built with OPENSSL_NO_CAMELLIA, so thejb2007-11-191-0/+2
| | | | code here needs to depend on that too.
* o s/resiserfs_sb/reiserfs_sb/.maxim2007-11-161-1/+1
| | | | Submitted by: Ighighi
* Save stack only when KTR_GEOM is both compiled into the kernel and enabledpjd2007-10-261-5/+5
| | | | | | | in debug.ktr.mask. Because saving stack is very expensive, it's better only to do it when one really wants to. Reported by: Dan Nelson
* First cut at support for booting a GPT labeled disk via the BIOS bootstrapjhb2007-10-243-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on i386 and amd64 machines. The overall process is that /boot/pmbr lives in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for locating and loading /boot/gptboot. /boot/gptboot is similar to /boot/boot except that it groks GPT rather than MBR + bsdlabel. Unlike /boot/boot, /boot/gptboot lives in its own dedicated GPT partition with a new "FreeBSD boot" type. This partition does not have a fixed size in that /boot/pmbr will load the entire partition into the lower 640k. However, it is limited in that it can only be 545k. That's still a lot better than the current 7.5k limit for boot2 on MBR. gptboot mostly acts just like boot2 in that it reads /boot.config and loads up /boot/loader. Some more details: - Include uuid_equal() and uuid_is_nil() in libstand. - Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using /boot/pmbr and /boot/gptboot. Note that the disk must have some free space for the boot partition. - This required exposing the backend of the 'add' function as a gpt_add_part() function to the rest of gpt(8). 'boot' uses this to create a boot partition if needed. - Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that it can handle a filesystem > 1.5 TB. - /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O unlike boot1 since /boot/pmbr loads all of gptboot up front. The C portion of gptboot (gptboot.c) has been repocopied from boot2.c. The primary changes are to parse the GPT to find a root filesystem and to use 64-bit disk addresses. Currently gptboot assumes that the first UFS partition on the disk is the / filesystem, but this algorithm will likely be improved in the future. - Teach the biosdisk driver in /boot/loader to understand GPT tables. GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is similar to the /dev names the kernel uses (e.g. /dev/ad0p2). - Add a new "freebsd-boot" alias to g_part() for the new boot UUID. MFC after: 1 month Discussed with: marcel (some things might still change, but am committing what I have so far)
* Add the freebsd-zfs alias. Both APM and GPT have ZFS partitionmarcel2007-10-214-0/+17
| | | | types.
OpenPOWER on IntegriCloud