to the disk subsystem.
Make disk_set_info also set blocksize shift values.
Remove every call to disk_blocksize.
Keep disk_blocksize for ABI compatibility, make it also set dg_secsize.
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@
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.
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.
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.
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@.
- 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
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@.
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.
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@.