Home | History | Annotate | Download | only in dm
History log of /src/sys/dev/dm/dm_target_stripe.c
RevisionDateAuthorComments
 1.45  08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.44  21-Jan-2020  tkusumi dm: #if0 target's ->upcall() handler

This is part of NetBSD's dm design, but unimplemented
(all handlers return 0) and also unused.
 1.43  21-Dec-2019  tkusumi branches: 1.43.2;
dm: Fix dm-stripe's "status" output format

As mentioned in "dm: Don't try to implement "status" as subset of "table"",
dm-stripe in NetBSD doesn't have correct "status" output format.
Implement ->info() to sync with Linux kernel.

Note that num_error for stripe device isn't implemented yet.

taken-from: DragonFlyBSD
 1.42  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.41  20-Dec-2019  tkusumi dm: Fix "table" output format of dm-linear and dm-stripe

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
 1.40  18-Dec-2019  tkusumi dm: Test # of args in target's ->init()

The # of args is part of target's spec.
Both Linux kernel and DragonFlyBSD test argc on ctr/init.
 1.39  15-Dec-2019  tkusumi dm: Rename dm specific atoi() to atoi64()

This is uint64_t version, not sys/lib/libsa/atoi.c.
 1.38  15-Dec-2019  tkusumi dm: Style cleanups (no functional changes)
 1.37  15-Dec-2019  tkusumi dm: "unsigned" -> "unsigned int" for consistency

Use either one, but not both.
 1.36  15-Dec-2019  tkusumi dm: Rename targets' ->status() to ->table() given ->info() exists

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
 1.35  14-Dec-2019  tkusumi dm: Remove unconditional debug prints in targets' ->strategy()

Having debug prints in ->strategy() by default just to tell ->strategy()
is called is overkill.
taken-from: DragonFlyBSD
 1.34  12-Dec-2019  tkusumi dm: Make target's ->init() take parsed argc and argv

This gets rid of the same parser code in each target using strsep(3).
taken-from: DragonFlyBSD
 1.33  09-Dec-2019  tkusumi dm: Correct target name "stripe" -> "striped"

Sync with Linux kernel.
The file name is "stripe", but the target name is "striped".
DragonFlyBSD also follows this.
 1.32  08-Dec-2019  tkusumi dm: Move targets specific structs to .c files

These don't need to be defined and exposed in dm.h.
 1.31  08-Dec-2019  tkusumi dm: Refactor target's ->init() i/f

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
 1.30  07-Dec-2019  tkusumi dm: Fix strange pointer declarations

Should be "type *name" or "type* name", but not "type * name".
taken-from: DragonFlyBSD
 1.29  06-Dec-2019  tkusumi dm: Fix typos in comments/messages

taken-from: DragonFlyBSD
 1.28  06-Dec-2019  tkusumi dm: Don't ignore dm_target_alloc() argument

dm_target_alloc() is supposed to be copying the name argument to its ->name.
taken-from: DragonFlyBSD
 1.27  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.26  03-Dec-2019  tkusumi dm: Include <sys/vnode.h> in dm.h

dm.h already depends on vnode, so have dm.h include <sys/vnode.h>
instead of other .c files.

taken-from: DragonFlyBSD
 1.25  01-Dec-2019  tkusumi dm: Remove unused dm_dev::dev_type

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.
 1.24  15-Oct-2019  chs convert more KM_NOSLEEP to KM_SLEEP and remove code to handle failures.
 1.23  05-Jan-2018  christos branches: 1.23.4;
use some size_t, add whitespace between functions, rcsids.
 1.22  01-Jun-2017  chs remove checks for failure after memory allocation calls that cannot fail:

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.
 1.21  19-Aug-2014  christos branches: 1.21.2;
cleanup properly on error.
 1.20  18-Aug-2014  agc Avoid a memory leak - from maxv
 1.19  14-Jun-2014  hannken branches: 1.19.2;
Change dk_lookup() to return an anonymous vnode not associated with
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
 1.18  07-Aug-2012  haad branches: 1.18.2; 1.18.12;
Fix problem reported by jym on current-user@ patch was provided by mhitch@.
 1.17  04-Jan-2012  haad branches: 1.17.2;
Fix wrong KASSERT, reported by mhitch@.
 1.16  14-Oct-2011  hannken branches: 1.16.2; 1.16.6;
Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock. Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from tech-kern.
 1.15  27-Aug-2011  ahoka be consistent and define secsize here as well (though this seems unused?)
some white' from emacs
 1.14  02-Jun-2011  haad Fix simple typo which made stripe target not working very at all. Issue
found by mhitch@.
 1.13  23-Dec-2010  mlelstv branches: 1.13.2; 1.13.6;
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.12  15-Nov-2010  uebayasi curlwp needs sys/lwp.h.
 1.11  23-Oct-2010  haad Add old file describing locking schema used in dm driver.
 1.10  18-May-2010  haad Add multi device strip support written by Guillermo Amaral and reviewed by me.
 1.9  04-Jan-2010  haad branches: 1.9.2; 1.9.4;
Indent files remove unnecessary blank lines, white spaces and KNFize code.
 1.8  01-Dec-2009  haad 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@
 1.7  09-Sep-2009  haad 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@.
 1.6  05-Jun-2009  haad 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.
 1.5  06-Apr-2009  haad branches: 1.5.2;
Fix build on amd64. Patch sent by dieter roelants.
 1.4  07-Mar-2009  reinoud Actually lmplement striping as LVM target. OK'd by Adam.
 1.3  01-Mar-2009  haad 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.
 1.2  02-Jan-2009  haad branches: 1.2.2; 1.2.4; 1.2.6;
Return ENOSYS during from dm_target_init routine these tow targets aren't
implemented yet.
 1.1  02-Jan-2009  haad 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@.
 1.2.6.2  23-Jul-2009  jym Sync with HEAD.
 1.2.6.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.4.4  28-Apr-2009  skrll Sync with HEAD.
 1.2.4.3  03-Mar-2009  skrll Sync with HEAD.
 1.2.4.2  19-Jan-2009  skrll Sync with HEAD.
 1.2.4.1  02-Jan-2009  skrll file dm_target_stripe.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  02-Jan-2009  mjf file dm_target_stripe.c was added on branch mjf-devfs2 on 2009-01-17 13:28:53 +0000
 1.5.2.6  11-Aug-2010  yamt sync with head.
 1.5.2.5  11-Mar-2010  yamt sync with head
 1.5.2.4  16-Sep-2009  yamt sync with head
 1.5.2.3  20-Jun-2009  yamt sync with head
 1.5.2.2  04-May-2009  yamt sync with head.
 1.5.2.1  06-Apr-2009  yamt file dm_target_stripe.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:37 +0000
 1.9.4.3  12-Jun-2011  rmind sync with head
 1.9.4.2  05-Mar-2011  rmind sync with head
 1.9.4.1  30-May-2010  rmind sync with head
 1.9.2.2  06-Nov-2010  uebayasi Sync with HEAD.
 1.9.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.13.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.16.6.1  18-Feb-2012  mrg merge to -current.
 1.16.2.2  30-Oct-2012  yamt sync with head
 1.16.2.1  17-Apr-2012  yamt sync with head
 1.17.2.1  09-Aug-2012  martin Pull up following revision(s) (requested by haad in ticket #467):
sys/dev/dm/dm_target_stripe.c: revision 1.18
Fix problem reported by jym on current-user@ patch was provided by mhitch@.
 1.18.12.1  10-Aug-2014  tls Rebase.
 1.18.2.2  03-Dec-2017  jdolecek update from HEAD
 1.18.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.2.1  29-Aug-2014  martin Pull up following revision(s) (requested by christos in ticket #55):
sys/dev/dm/dm_target_stripe.c: revision 1.20-1.21
Avoid a memory leak - from maxv.
Cleanup properly on error.
 1.21.2.1  28-Aug-2017  skrll Sync with HEAD
 1.23.4.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.23.4.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.43.2.1  25-Jan-2020  ad Sync with head.

RSS XML Feed