summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_ioctl.c
AgeCommit message (Collapse)Author
2010-02-25Be sure to config_cfattach_attach() in dmattach().jakllsch
Loosely based on patch from Brian Brombacher, with other inspriation from vnd(4). This should fix PR kern/42799. While here, a few prototype, style and namespace pollution-related changes.
2010-01-04Indent files remove unnecessary blank lines, white spaces and KNFize code.haad
2010-01-03Hook device-mapper to autoconf framework. Add dm_attach, dm_match and dm_detachhaad
routines used by autoconf users. Change dm_dev_remove_ioctl to call dm_detach. This should be primary used by kernel to disable devices during shutdown of system with nested disk devices. Requested by dyoung@.
2009-12-29Add private lock to dm_dev_t used for mutual exclusion for diks(9) apihaad
routines. This change fixes PR kern/42532.
2009-12-06Add support for DM_QUERY_INACTIVE_TABLE_FLAG to dm_table_status and ↵haad
dm_table_deps this flag was introduced to dm->lvm protocol in 4.16.0 version of it. Restore vrsion check functionality and sent back actual kernel driver version.
2009-12-05Fix bug in dm_table_resume_ioctl where dmv->flags was sent back to libdevmapperhaad
except flags variable. This fixes weird behaviour, when worng links to devices in /dev/mapper were created after lvrename/lvresize.
2009-12-01Revert my commit which have added knowledge about dm targets to libdevmapper,haad
this breaks abstraction. Because only lvmtools/lvmlib and device-mapper can have knowledge about target mapping and libdevmapper only passes requests from lvmtools to kernel and back. Bump major library and driver version. Requested by: yamt@
2009-09-09Fix bug in kmem_alloc/kmem_free of params string. Params string washaad
allocated with length DM_MAX_PARAMS_SIZE and released with strlen + 1 size. Disable KM_NOSLEEP allocation because we do not need them here there is nothing critical in ioctl part of dm driver. Bug reported by jak@.
2009-06-05Add support for DIOCGDISKINFO to disk like device drivers. Changehaad
partutil.c::getdiskinfo to use it to get disk geometry info. Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk driver doesn't support it use old DIOCGDINFO. This patch adds support for wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and other tools. No objections on tech-userlevel@.
2009-06-05Parse dm param string in libdevmapper and not in a dm target init function.haad
Create proplib param dictionary entry in libdevmapper and pass it to dm in dm_ioctl dict. Param target is then passed to target init function, where is parse. I like this aproach much better than passing char **argv and trusting to user input. I have bumped minor lib/driver version. XXX. Add more sanity checks in kernel.
2009-04-13Destroy locks in dm_dev_free, do not allocate struct disk twice.haad
2009-04-06Use functions from disk(9) framework. Initialize disk/disklabel duringhaad
dm_device_create_ioctl, before calling dmgetdisklabel. Use disk_busy/disk_unbusy in dmstrategy to display LVM LV's in iostat output.
2009-03-08Fix tyop in previous.agc
2009-02-20Release tables before we drop reference on device, now creating device withhaad
nonexistent target fails and not ends with deadlock.
2009-02-19Add support for autoloading of device-mapper targets modules. Addhaad
dm_target_autoload function which tries to load target module. Fix two deadlocks in dm_table_load_ioctl error path(I forgot to call dm_dev_unbusy).
2009-01-16Disable unloading of dm driver when there are any devices defined. This meanshaad
that we have to run lvm vgchange -a n before modunload in NetBSD. We really need to disable module unloading only for mounted devices, I have to look at vfs_hooks for mount/umount calls and find way how to mark devices as mounted in dm driver.
2009-01-11Use 64bit long minor nuber in dm_dev structure.haad
2008-12-21Fix error path in target_init call. When initializing target fails i havehaad
to release table before I try to destroy it and I haveto unbusy device, too.
2008-12-19Add infrastructure needed to load device-mapper targets as modules.haad
Targets wasn't converted yet and at least snapshot target will be converted in a near future.
2008-12-19Merge the haad-dm branch to -current. This branch adds LVM functionality tohaad
the base NetBSD system. It uses Linux LVM2 tools and our BSD licensed device-mapper driver. The device-mapper driver can be used to create virtual block devices which maps virtual blocks to real with target mapping called target. Currently these targets are available a linear, zero, error and a snapshot (this is work in progress and doesn't work yet). The lvm2tools adds lvm and dmsetup binary to based system, where the lvm tool is used to manage and administer whole LVM and the dmestup is used to communicate iwith device-mapper kernel driver. With these tools also a libdevmapper library is instaled to the base system. Building of tools and driver is currently disable and can be enabled with MKLVM=yes in mk.conf. I will add sets lists and rc.d script soon. Oked by agc@ and cube@.