summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_target_linear.c
AgeCommit message (Collapse)Author
2020-01-21dm: #if0 target's ->upcall() handlertkusumi
This is part of NetBSD's dm design, but unimplemented (all handlers return 0) and also unused.
2019-12-28dm: Fix typo in comment dklinear -> lineartkusumi
2019-12-21dm: Remove target's ->deps() by implementing deps in dm coretkusumi
Retrieving device dependencies doesn't need to be target specific. The reason it currently needs ->deps() is because dm core doesn't have data structure that allows table to walk through target's underlying devices. Add struct dm_mapping to be able to do this, and remove ->deps()'s from targets which basically do the same thing. =====(A) before this commit table | [dm core] ------------------------------------------------------- | pdev pdev pdev [dm targets] v ^ ^ ^ target----/---------/---------/ (void*) =====(B) this commit table---->mapping-->mapping-->mapping-->... | | | | | v v v [dm core] ------------------------------------------------------- | pdev pdev pdev [dm targets] v ^ ^ ^ target----/---------/---------/ (void*) taken-from: DragonFlyBSD
2019-12-20dm: Fix "table" output format of dm-linear and dm-stripetkusumi
The existing "table" output showing device file path of pdev is not compatible with dm in Linux kernel (and also DragonFlyBSD). It should be showing "major:minor" instead. taken-from: DragonFlyBSD
2019-12-18dm: Test # of args in target's ->init()tkusumi
The # of args is part of target's spec. Both Linux kernel and DragonFlyBSD test argc on ctr/init.
2019-12-15dm: Rename dm specific atoi() to atoi64()tkusumi
This is uint64_t version, not sys/lib/libsa/atoi.c.
2019-12-15dm: Style cleanups (no functional changes)tkusumi
2019-12-15dm: "unsigned" -> "unsigned int" for consistencytkusumi
Use either one, but not both.
2019-12-15dm: Rename targets' ->status() to ->table() given ->info() existstkusumi
Since now that dm targets in NetBSD have ->info() for "status", ->status() should be renamed to ->table() for "table", given how dm target status was originally designed in Linux kernel. taken-from: DragonFlyBSD
2019-12-14dm: Remove unconditional debug prints in targets' ->strategy()tkusumi
Having debug prints in ->strategy() by default just to tell ->strategy() is called is overkill. taken-from: DragonFlyBSD
2019-12-12dm: Make target's ->init() take parsed argc and argvtkusumi
This gets rid of the same parser code in each target using strsep(3). taken-from: DragonFlyBSD
2019-12-09dm: Silence aprint_normal() in dm_target_linear_status()tkusumi
dm_target_linear_status() shouldn't print this debug message by default on dmsetup "table" ioctl/command.
2019-12-08dm: Refactor target's ->init() i/ftkusumi
Take dm_table_entry_t* instead of void**. Remove dm_dev_t* unneeded by target code. No functional change, but for future changes. taken-from: DragonFlyBSD
2019-12-07dm: Fix strange pointer declarationstkusumi
Should be "type *name" or "type* name", but not "type * name". taken-from: DragonFlyBSD
2019-12-06dm: Remove trailing whitespacetkusumi
2019-12-05dm: Make dm core set config to NULL after destroytkusumi
Just let dm core do this instead of having a comment expecting each target to do the right thing. taken-from: DragonFlyBSD
2019-12-03dm: Include <sys/vnode.h> in dm.htkusumi
dm.h already depends on vnode, so have dm.h include <sys/vnode.h> instead of other .c files. taken-from: DragonFlyBSD
2019-12-02dm: Remove misleading comment on linear target argtkusumi
The offset arg is mandatory. Remove code and comment that makes it sounds like it's optional. taken-from: DragonFlyBSD
2019-12-01dm: Remove unused dm_dev::dev_typetkusumi
Given OOP-like architecture of dm target device structure, dm_dev doesn't need to have self contained target type field, and in fact this is unused.
2019-10-15convert more KM_NOSLEEP to KM_SLEEP and remove code to handle failures.chs
2018-01-05PR/52900: Tomohiro Kusumi: Fix kernel panic when target's ->init() failedchristos
Reliably unbusy the target in the *all* the destroy routines, so ioctl does not need to do it.
2017-06-04more dependiences -> dependenciesmbalmer
2017-06-01remove checks for failure after memory allocation calls that cannot fail:chs
kmem_alloc() with KM_SLEEP kmem_zalloc() with KM_SLEEP percpu_alloc() pserialize_create() psref_class_create() all of these paths include an assertion that the allocation has not failed, so callers should not assert that again.
2014-06-14Change dk_lookup() to return an anonymous vnode not associated withhannken
any file system. Change all consumers of dk_lookup() to get the device from "v_rdev" instead of VOP_GETATTR() as specfs does not support VOP_GETATTR(). Devices obtained with dk_lookup() will no longer disappear on forced unmounts. Fix for PR kern/48849 (root mirror raid fails on shutdown) Welcome to 6.99.44
2011-10-14Change the vnode locking protocol of VOP_GETATTR() to request at leasthannken
a shared lock. Make all calls outside of file systems respect it. The calls from file systems need review. No objections from tech-kern.
2010-12-23make dm aware of physical sector sizes.mlelstv
For aggregates of multiple disks we use the largest sector size from all disks. For standard power-of-2 sizes this is the same as the least common multiple. We still require proper alignment of the targets in the mapping table. ok by haad@
2010-11-15curlwp needs sys/lwp.h.uebayasi
2010-05-18Add support for DIOCCACHESYNC ioctl for dm devices. Add new sync functionhaad
pointer to dm_target_t because that is the only part of dm which know real block device. disk_ioctl_switch parses whole device table and for every entry it calls particular sync routine which propagates DIOCCACHESYNC to real disk. While I was here implement some KNF fixes and remove unneeded symbols from dm.h. Problem reported on port-xen@ by Hugo Silva.
2010-01-04Indent files remove unnecessary blank lines, white spaces and KNFize code.haad
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-08-16fix a comment typo.yamt
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-03-01Linear target has only 2 arguments in a params string not 9.haad
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@.