Home | History | Annotate | Download | only in dm
History log of /src/sys/dev/dm/dm_table.c
RevisionDateAuthorComments
 1.21  21-Aug-2021  andvar fix typos in sys/dev/dm code comments and documentation.
also remove some trailing space in documentation.
 1.20  20-Aug-2021  andvar fix various typos in comments and log messages.
 1.19  31-Dec-2019  tkusumi dm: Remove unnecessary inlining

These two don't really need to be inlined.
 1.18  22-Dec-2019  tkusumi dm: Make numsec/secsize arguments in dm_table_disksize() optional
 1.17  21-Dec-2019  tkusumi dm: Remove target's ->deps() by implementing deps in dm core

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
 1.16  15-Dec-2019  tkusumi dm: Style cleanups (no functional changes)
 1.15  15-Dec-2019  tkusumi dm: Make targets' ->secsize() optional

and make a caller assume secsize 0 if ->secsize not present.
This allows a dummy function to be removed which was added in
"dm: Add dummy target ->sync()/->secsize() to prevent panic on modload(8)".
 1.14  15-Dec-2019  tkusumi dm: "unsigned" -> "unsigned int" for consistency

Use either one, but not both.
 1.13  14-Dec-2019  tkusumi dm: Remove void casts of function calls

Use of void casts in dm is not consistent, just get rid of them.
 1.12  07-Dec-2019  tkusumi dm: Fix strange pointer declarations

Should be "type *name" or "type* name", but not "type * name".
taken-from: DragonFlyBSD
 1.11  07-Dec-2019  tkusumi dm: Simplify list eviction code

taken-from: DragonFlyBSD
 1.10  05-Dec-2019  tkusumi dm: Make dm core set config to NULL after destroy

Just let dm core do this instead of having a comment expecting each
target to do the right thing.

taken-from: DragonFlyBSD
 1.9  04-Dec-2019  tkusumi dm: style + whitespace + indentation fixes

No functional changes.
 1.8  05-Jan-2018  christos branches: 1.8.4;
use some size_t, add whitespace between functions, rcsids.
 1.7  27-Aug-2011  ahoka add function to get the inactive table size (for during target init)
 1.6  23-Dec-2010  mlelstv make dm aware of physical sector sizes.

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@
 1.5  04-Jan-2010  haad branches: 1.5.4;
Indent files remove unnecessary blank lines, white spaces and KNFize code.
 1.4  23-Oct-2009  joerg Reduce a noise from a debug printf to debug level
 1.3  27-Jun-2009  jakllsch 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
 1.2  19-Dec-2008  haad branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
Merge the haad-dm branch to -current. This branch adds LVM functionality to
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@.
 1.1  07-Jul-2008  haad branches: 1.1.2;
Add dmgetdefaultdisklabel to get virtual disklabel for Logical Volume device. Add snapshot targets (snapshot, snapshot-origin), add dm_type to dm_dev structure to identify type of device. e.g. we can have mirrored disk device with snapshot on them and spare disk on them. When driver want to work with snapshot devices, it looks to upcalls list and finds all DM_SNAPSHOT devices.
 1.1.2.12  05-Nov-2008  haad Fix copyright in TNF licenses.
 1.1.2.11  02-Nov-2008  haad Use typedef in all structures in dm driver and use them in source code.
No functional change expected.
 1.1.2.10  16-Oct-2008  haad Rewrite locking in dm driver for last time. Replace rwlock with mutex/cv.
Move table lists to separate structure called table_head and access them
through dm_table interface. Thx go@, rmind@ and Dusan Bernat for help and
suggestions.
 1.1.2.9  08-Sep-2008  haad Fix comment in dm_table and change target alloc function suggested by rmind@.
 1.1.2.8  04-Sep-2008  haad Remove unneeded includes.
 1.1.2.7  19-Aug-2008  haad Add $NetBSD$ tag to all dm driver sources.
 1.1.2.6  02-Aug-2008  haad Fix dm_table_destroy, use example code from queue.h. This should fix
dmsetup remove for zero/error target device.
 1.1.2.5  29-Jul-2008  haad Change comment in dm_table_destroy and dm-target_linear_init.
These functions should be called with per device mutex held.
 1.1.2.4  28-Jul-2008  haad Add status function to targets. This function is called from dm_table_status_ioctl,
when DM_STATUS_TABLE_FLAG is specified and it's purpose is construct params string.
Which can be sent back to libdevmapper.

Add adding removing of the DM_SUSPENDED_FLAG flag in dm_dev_suspend/resume ioctls.
 1.1.2.3  19-Jul-2008  haad *** empty log message ***
 1.1.2.2  11-Jul-2008  haad KNFize my sources add space after comma in function parameters.
Wrap to 80 chars per line.
 1.1.2.1  07-Jul-2008  haad Import of device-mapper driver. This driver is BSD rewrite of linux dm driver.
For now only error, linear and zero targets are supported. This driver uses NetBSD
specific ioctl protocola based on proplib.

I was able to create logical volume (with lvm2tools lvcreate utility) with this
version of driver, newfs it and mount it.
 1.2.8.4  11-Mar-2010  yamt sync with head
 1.2.8.3  18-Jul-2009  yamt sync with head.
 1.2.8.2  04-May-2009  yamt sync with head.
 1.2.8.1  19-Dec-2008  yamt file dm_table.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:36 +0000
 1.2.6.1  23-Jul-2009  jym Sync with HEAD.
 1.2.4.2  19-Jan-2009  skrll Sync with HEAD.
 1.2.4.1  19-Dec-2008  skrll file dm_table.c was added on branch nick-hppapmap on 2009-01-19 13:17:53 +0000
 1.2.2.2  17-Jan-2009  mjf Sync with HEAD.
 1.2.2.1  19-Dec-2008  mjf file dm_table.c was added on branch mjf-devfs2 on 2009-01-17 13:28:53 +0000
 1.5.4.1  05-Mar-2011  rmind sync with head
 1.8.4.1  08-Apr-2020  martin Merge changes from current as of 20200406

RSS XML Feed