| Age | Commit message (Collapse) | Author |
|
|
|
also remove some trailing space in documentation.
|
|
|
|
log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
|
|
|
|
|
|
|
|
Since ->info() (counter part of ->table() in the original dm design
in Linux kernel in .status where both INFO and TABLE are optional)
is an optional handler, make ->table() optional as well. Some
targets don't have anything to do in ->table() just as in ->info().
taken-from: DragonFlyBSD
|
|
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
|
|
|
|
|
|
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
|
|
The way dm_table_status_ioctl() implements "status" and "table" is
not compatible with Linux kernel. Some targets have different outputs
that "status" can't be implemented as subset of "table".
Add ->info() handler to sync with "status" behavior in Linux kernel.
Some targets which currently exist in NetBSD (I think striped)
as well as some minor targets that I plan to port to NetBSD
can/should implement ->info(), but will do that in a different commit.
taken-from: DragonFlyBSD
|
|
which comes from prop_dictionary_get_uint32() result.
taken-from: DragonFlyBSD
|
|
|
|
This gets rid of the same parser code in each target using strsep(3).
taken-from: DragonFlyBSD
|
|
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
|
|
taken-from: DragonFlyBSD
|
|
"version" is implemented and handled in userspace,
hence dm ioctl doesn't need to support it.
taken-from: DragonFlyBSD
|
|
No functional changes.
|
|
dm.h already depends on vnode, so have dm.h include <sys/vnode.h>
instead of other .c files.
taken-from: DragonFlyBSD
|
|
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.
|
|
Explicitly clear status string to prevent dmsetup(8) from
printing binary junk to stdout. Similar change has been
applied to DragonFlyBSD since 2015.
https://github.com/DragonFlyBSD/DragonFlyBSD/commit/a6cf54187fd7c3e994c573215806ec03572c038e
taken-from: DragonFlyBSD
|
|
Fixes lvrename operation.
|
|
Reliably unbusy the target in the *all* the destroy routines, so ioctl
does not need to do it.
|
|
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.
|
|
is NULL.
|
|
|
|
|
|
|
|
- some whitespace fix from emacs...
|
|
|
|
|
|
going to use so much device minor numbers.
|
|
|
|
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.
|
|
|
|
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@.
|
|
routines. This change fixes PR kern/42532.
|
|
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.
|
|
except flags variable. This fixes weird behaviour, when worng links to
devices in /dev/mapper were created after lvrename/lvresize.
|
|
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@
|
|
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@.
|
|
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@.
|
|
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.
|
|
|
|
dm_device_create_ioctl, before calling dmgetdisklabel.
Use disk_busy/disk_unbusy in dmstrategy to display LVM LV's in iostat
output.
|
|
|
|
nonexistent target fails and not ends with deadlock.
|
|
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).
|