summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Fix a panic caused by a corrupted table when the header ismarcel2008-11-061-4/+7
| | | | | | | | | still valid. We were checking the state of the header and not the table. PR: 119868 Based on a patch from: Jaakko Heinonen <jh@saunalahti.fi> MFC after: 1 week
* Improve VFS locking:attilio2008-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement real draining for vfs consumers by not relying on the mnt_lock and using instead a refcount in order to keep track of lock requesters. - Due to the change above, remove the mnt_lock lockmgr because it is now useless. - Due to the change above, vfs_busy() is no more linked to a lockmgr. Change so its KPI by removing the interlock argument and defining 2 new flags for it: MBF_NOWAIT which basically replaces the LK_NOWAIT of the old version (which was unlinked from the lockmgr alredy) and MBF_MNTLSTLOCK which provides the ability to drop the mountlist_mtx once the mnt interlock is held (ability still desired by most consumers). - The stub used into vfs_mount_destroy(), that allows to override the mnt_ref if running for more than 3 seconds, make it totally useless. Remove it as it was thought to work into older versions. If a problem of "refcount held never going away" should appear, we will need to fix properly instead than trust on such hackish solution. - Fix a bug where returning (with an error) from dounmount() was still leaving the MNTK_MWAIT flag on even if it the waiters were actually woken up. Just a place in vfs_mount_destroy() is left because it is going to recycle the structure in any case, so it doesn't matter. - Remove the markercnt refcount as it is useless. This patch modifies VFS ABI and breaks KPI for vfs_busy() so manpages and __FreeBSD_version will be modified accordingly. Discussed with: kib Tested by: pho
* Add support for reading Tivo Series 1 partitioning. This likely needsimp2008-11-021-12/+52
| | | | | | | | | a little refinement, but is good enough to commit as is. # Should look to see if I should move swab(3) into the kernel or just # provide the unoptimized routine here. Reviewed by: marcel@
* Revert r184136. Instead, push the check for crashdumpmap overflow into thekib2008-10-311-1/+1
| | | | | | | | MD i386 and amd64 dump code. Requested by: jhb Retested by: pho MFC after: 3 days (+ 176304 + 184136)
* - Import macros used in gmirror for printing gvinum debug messages and makinglulf2008-10-2610-72/+94
| | | | | | the output more standardized. - Add a sysctl to set the verbosity of the debug messages. - While there, fixup typos and wording in the messages.
* Invalid BSD disklabels have been created by sysinstall andmarcel2008-10-251-1/+6
| | | | | | | | | | | | | | | are possibly still being created. The d_secperunit field contains the number of sectors of the disk and not of the slice/partition to which the disklabel applies. Rather than reject the disklabel, we now silently adjust the field. Existing code, like bslabel(8), does not seem to check the label that extensively and seems to adjust fields as a side-effect as well. In other words, it's not that important apparently, so gpart should not be too strict about it. Reported by: nyan@ Reported by: Andriy Gapon <avg@icyb.net.ua>
* Allow dumps to partitions with a tag of 0. The legacymarcel2008-10-221-2/+5
| | | | | sunlabel implementation in FreeBSD does not use VTOC information and as such as no partition types.
* Do not overflow crashdumpmap.kib2008-10-211-1/+1
| | | | | | Reported and tested by: pho Reviewed by: jhb MFC after: 1 week
* The active and bootable flags are not part of the type.marcel2008-10-201-11/+82
| | | | | | | | | | Export the active and bootable flags as attributes in the configuration XML and allow them to be manipulated with the set/unset commands. Since libdisk treats the flags as part of the partition type, preserve behavior by keeping them included in the configuration text.
* Remove the struct thread unuseful argument from bufobj interface.attilio2008-10-102-3/+3
| | | | | | | | | | | | | | | | | | | | | In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync() and BO_SYNC() "virtual method" of the buffer objects set. Main consumers of bufobj functions are affected by this change too and, in particular, functions which changed their KPI are: - vinvalbuf() - g_vfs_close() Due to the KPI breakage, __FreeBSD_version will be bumped in a later commit. As a side note, please consider just temporary the 'curthread' argument passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP Reviewed by: kib Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* - Use the new gv_write_header function to write out the header when removing alulf2008-10-021-1/+1
| | | | drive to make sure that the header is in the correct format.
* - Remove unneeded macro since the config_length field in the header was changedlulf2008-10-021-5/+0
| | | | to 64 bit in the new format.
* - Make gvinum header on-disk structure consistent on all platforms by storinglulf2008-10-013-8/+232
| | | | | | | | | | | the gvinum header in fields of fixed size and in a big endian byte order rather than the size and byte order of the actual platform. Note that the change is backwards compatible with the old gvinum configuration format, but will save the configuration in the new format when the 'saveconfig' command is executed. Submitted by: Rick C. Petty <rick-freebsd -at- kiwi-computer.com>
* 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.
OpenPOWER on IntegriCloud