pooka
5b81af7179
Fix this for non-module (which, i guess, is only i386/ALL).
...
XXX: autoconfusion vs. modules is an intolerable mess of stepping
on each others' toes.
2010-01-08 00:27:48 +00:00
haad
293fc00622
Indent files remove unnecessary blank lines, white spaces and KNFize code.
2010-01-04 00:12:22 +00:00
haad
66ff911808
Refactor dmioctl to by cleaner and to copyout dictionary in case when something
...
went wrong.
2010-01-03 22:55:25 +00:00
haad
c52cab8857
KNF police, remove unnecessary whitespaces and tabulators. Refactor dmioctl
...
to not use prop_dictionary_copy* functions if NetBSD_DM_IOCTL command was
not called on device. If disk_ioctl returms anything else then ENOTTY exit
from dmioctl.
2010-01-03 22:44:10 +00:00
haad
b9ba4842ce
Hook device-mapper to autoconf framework. Add dm_attach, dm_match and dm_detach
...
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@.
2010-01-03 22:22:23 +00:00
haad
22c533e1d0
Replace aprint_Verbose with aprint_debug to shutup unnecessary logs.
2010-01-03 12:53:00 +00:00
haad
36fe06980c
Add private lock to dm_dev_t used for mutual exclusion for diks(9) api
...
routines. This change fixes PR kern/42532.
2009-12-29 23:37:47 +00:00
haad
8181298188
Add support for DM_QUERY_INACTIVE_TABLE_FLAG to dm_table_status and 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-06 14:33:46 +00:00
haad
676cba4177
Make our driver version equal to linux driver.
2009-12-06 14:31:16 +00:00
haad
79ad9d0df4
Install netbsd-dm.h file to include/dev/dm so it can be used by public.
2009-12-05 11:34:37 +00:00
haad
bd8ee331ed
Include only user-kernel communication protocol related information in this header.
2009-12-05 11:30:26 +00:00
haad
ca10901dd8
Remove wrong TODO item, it violates abstraction between kernel-libdevmapper
...
and lvm tools.
2009-12-05 01:25:12 +00:00
haad
8f50b1a274
Fix bug in dm_table_resume_ioctl where dmv->flags was sent back to libdevmapper
...
except flags variable. This fixes weird behaviour, when worng links to
devices in /dev/mapper were created after lvrename/lvresize.
2009-12-05 01:21:41 +00:00
haad
f26bfe28da
Revert my commit which have added knowledge about dm targets to libdevmapper,
...
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-12-01 23:12:09 +00:00
joerg
af76846cf3
Reduce a noise from a debug printf to debug level
2009-10-23 20:41:11 +00:00
joerg
336cbcc88d
Don't spam the console with debug messages.
2009-10-16 21:23:08 +00:00
haad
76a0c0e7d2
Fix bug in kmem_alloc/kmem_free of params string. Params string was
...
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-09-09 22:38:49 +00:00
yamt
83723a32c5
fix a comment typo.
2009-08-16 11:02:24 +00:00
haad
a1f246d056
Remove unneeded targets from build. Should fix brekage of ALL kernel build
...
found by cegger@.
2009-06-28 22:05:07 +00:00
jakllsch
f6c1b3e09a
Some fixes for dm(4).
...
- Limit accesses to the size of the volume.
This fixes a KASSERT in physio_biodone().
- Change dm_table_size() to return the size of the volume in
DEV_BSIZE units. It was reporting it in DEV_BSIZE^2 units.
- Remove a bit of trailing whitespace.
ok haad
2009-06-27 16:10:25 +00:00
cegger
f978dd86b2
buidfix: change dm_target_snapshot_orig_init() to match prototype.
2009-06-20 09:57:26 +00:00
haad
f5b48500f1
Add support for DIOCGDISKINFO to disk like device drivers. Change
...
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-05 21:52:31 +00:00
haad
62e994ce96
Parse dm param string in libdevmapper and not in a dm target init function.
...
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-06-05 19:56:40 +00:00
haad
33e2a4a918
Destroy locks in dm_dev_free, do not allocate struct disk twice.
2009-04-13 18:51:54 +00:00
haad
a650e4b356
Update to reality.
2009-04-13 16:12:27 +00:00
haad
ba7fcfeeb5
Use functions from disk(9) framework. Initialize disk/disklabel during
...
dm_device_create_ioctl, before calling dmgetdisklabel.
Use disk_busy/disk_unbusy in dmstrategy to display LVM LV's in iostat
output.
2009-04-06 22:58:10 +00:00
haad
57fb98e3bf
Fix build on amd64. Patch sent by dieter roelants.
2009-04-06 22:48:26 +00:00
dyoung
b63bf39017
It is only by chance that this gets the prop_array_t definition that it
...
needs, so explicitly #include <prop/proplib.h>.
2009-03-25 23:35:54 +00:00
cegger
df7f595ecd
Ansify function definitions w/o arguments. Generated with sed.
2009-03-18 10:22:21 +00:00
agc
15de39d387
Fix tyop in previous.
2009-03-08 02:07:38 +00:00
reinoud
664af01cd8
Actually lmplement striping as LVM target. OK'd by Adam.
2009-03-07 22:17:18 +00:00
haad
50b5b59cc7
Fix lvm lvrename command. There was bug in dm_dev_lookup where
...
dm_dev_lookup_name was called with device uuid. Remove dm_dev_t:dk_label is
it not used anymore.
2009-03-06 16:17:29 +00:00
haad
5b244085d8
Linear target has only 2 arguments in a params string not 9.
2009-03-01 23:17:39 +00:00
haad
f8faf523ec
Change comment and add description of line used to configure mirror device.
2009-03-01 23:16:51 +00:00
haad
f048f56f71
Add initial support for striping target, hardcode maximal number of stripes
...
to 2 for now. strategy routine must be written, for now only parsing and
support routines are available. This is work in progress code and should be
taken very carefully.
2009-03-01 23:15:56 +00:00
haad
e654dd3da2
Call dm_target_busy only on properly autoloaded module.
2009-02-20 11:14:11 +00:00
haad
9629be83bf
Release tables before we drop reference on device, now creating device with
...
nonexistent target fails and not ends with deadlock.
2009-02-20 11:12:30 +00:00
haad
d624725a46
In NetBSD our target modules are called with prefix dm_target_. Add this
...
prefix to target module name when loading module, lvm2tools uses linux
target names e.g. zero not dm_target_zero.
2009-02-19 23:20:27 +00:00
haad
17599f37f3
Add support for autoloading of device-mapper targets modules. Add
...
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-02-19 23:07:32 +00:00
agc
dc733729ad
Move back to printing the minor device as a 32-bit entity
2009-01-22 04:56:06 +00:00
haad
d80238dac9
Add struct disk to dm_dev so our LV will beshowed in iostat output.
2009-01-16 11:19:02 +00:00
haad
44e4eeea57
Disable unloading of dm driver when there are any devices defined. This means
...
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-16 00:46:12 +00:00
haad
2df042407e
Add dm module as dependency and remove module_hold/module_rele calls.
2009-01-14 00:56:15 +00:00
haad
a74b9dc067
Use 64bit long minor nuber in dm_dev structure.
2009-01-11 11:54:52 +00:00
haad
ae10a6c772
Fix aprint_debug after christos-time_t merge.
2009-01-11 11:44:23 +00:00
haad
0e718155a1
Return ENOSYS during from dm_target_init routine these tow targets aren't
...
implemented yet.
2009-01-02 22:33:51 +00:00
haad
2a2e81e0f1
Properly register dm_target_* modules with module framework.
2009-01-02 11:06:17 +00:00
haad
894d2ad3b7
Add stubs for mirror target, too. This target does nothing for now, but lvm
...
tools support mirror target and trying to create LV with mirrorred backend
caused panic in dm_table_load_ioctl.
2009-01-02 11:03:24 +00:00
haad
2547289caf
Add more tasks and add more details about them.
2009-01-02 01:13:49 +00:00
haad
32013fd9f2
Add stripe target functions stubs. Stripe target must be present in dm driver
...
because without it lvm2tools will not create LVsi and eventualy panic system.
Problem reported by agc@.
2009-01-02 00:42:31 +00:00