History log of /dragonfly/sys/dev/disk/dm/dm_target_zero.c (Results 1 – 25 of 31)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc
# 19bd59e4 27-Nov-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Make init/destroy handlers optional

Some targets don't need to do anything in init/destroy handler,
as there is no private data to init/cleanup, so make them optional.

table_en->ta

sys/dev/disk/dm: Make init/destroy handlers optional

Some targets don't need to do anything in init/destroy handler,
as there is no private data to init/cleanup, so make them optional.

table_en->target_config can be set to NULL regardless of destroy
handler or its result.

show more ...


# c662db9a 27-Nov-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove dm_table_init_target() call with NULL

These can be removed after 41a68322.


# 19b2b39d 26-Nov-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove obvious/redundant/disabled kprintfs


# 41a68322 26-Nov-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove dm_dev::dev_type

This is unused, and also not necessary.

dm core shouldn't need to be aware of target driver type.
Target dependent actions are handled by target dependent h

sys/dev/disk/dm: Remove dm_dev::dev_type

This is unused, and also not necessary.

dm core shouldn't need to be aware of target driver type.
Target dependent actions are handled by target dependent handlers.
dm targets have oop-like structure, so we don't want/need
dm core to be able to do things like below.

Also see d471f1f9 and 49784e7d.

switch (dev->dev_type) {
case DM_LINEAR_DEV:
do_something_specific_to_linear(); break;
case DM_STRIPE_DEV:
do_something_specific_to_striped(); break;
case ...:
...; break;
}

show more ...


Revision tags: v4.6.1
# 2ca88594 01-Oct-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove default:break for switch enums on kldload

This could be reverted as compilers may warn if not all enum elements
are covered, but some dm targets don't have default case on lo

sys/dev/disk/dm: Remove default:break for switch enums on kldload

This could be reverted as compilers may warn if not all enum elements
are covered, but some dm targets don't have default case on loading,
and it's been working. Compiles with LINT64.

show more ...


Revision tags: v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc
# 30ef4508 17-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Cleanup header includes


# b7c11cda 13-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Cleanups

* Fix comments.
* Add a blank line between functions.
* Some minor fixes on dm core.


# be52293a 12-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Don't expect destroy() to set config to NULL

Having a comment like below in dm core that expects programmers
to code their dm targets in a certain way is not efficient.
They may not

sys/dev/disk/dm: Don't expect destroy() to set config to NULL

Having a comment like below in dm core that expects programmers
to code their dm targets in a certain way is not efficient.
They may not read such a rule written in the source.

/*
* Remove target specific config data. After successfull
* call table_en->target_config must be set to NULL.
*/

Just check a return value of destroy() and set config to NULL
on dm core side since it's also visible to dm core. There is
nothing targets can/would do with the config pointer other than
setting it to NULL considering targets have just freed it.

show more ...


# a6b470c8 11-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Fix/refactor alloc/free functions [6/6]

Rename dm_target_rem() to dm_target_remove() for consistency.


# efaf91a7 11-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Fix/refactor alloc/free functions [4/6]

dm_target_alloc() takes char *name, but does nothing with it.
Add strlcpy and remove strlcpy from each target's init().


# b4e97860 09-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Check if target has registered handlers

Define which handlers are mandatory or optional.
init(), destroy(), strategy() are (or should be) mandatory.
Others aren't needed by all targ

sys/dev/disk/dm: Check if target has registered handlers

Define which handlers are mandatory or optional.
init(), destroy(), strategy() are (or should be) mandatory.
Others aren't needed by all targets hence should be optional.

Add sanity checks in dm_target_insert() to make sure targets
have implemented and registered mandatory handlers.

Cleanup struct dm_target by removing obvious comments and
adding comments on mandatory/optional handlers.

show more ...


# eca20b99 07-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Don't force targets to implement table handler

All targets implementing table handler is redundant as some
of them don't need to do anything. Avoid it by a simple NULL
check, just l

sys/dev/disk/dm: Don't force targets to implement table handler

All targets implementing table handler is redundant as some
of them don't need to do anything. Avoid it by a simple NULL
check, just like what's been done to other handlers.

show more ...


# 9dc5a315 07-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove unnecessary dump=NULL;


# 333a8a0c 07-Nov-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove upcall handler

dm target's upcall() handler
int (*upcall)(dm_table_entry_t *, struct buf *);
implemented by dm targets acutally do nothing other than
returning 0. Also note

sys/dev/disk/dm: Remove upcall handler

dm target's upcall() handler
int (*upcall)(dm_table_entry_t *, struct buf *);
implemented by dm targets acutally do nothing other than
returning 0. Also note that upcall() is not used by dm core.

The targets that are supposed to be relying on this api are
obviously not working at the moment, however things aren't
as simple as just implementing missing upcall() handler.

upcall() is supposed to be something to do with targets like
snapshot, but it lacks documentation and purpose of this api
is not clear at all. Whoever tries to implement snapshot/etc
will have to re-design dm core and appropriate handlers from
scratch anyway without using the existing one.

show more ...


# f28e17b7 28-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Make target's init() take argc and argv

dm core shouldn't be passing char *params to targets' init()
because all targets are basically going to copy-paste a code
snippet (that strse

sys/dev/disk/dm: Make target's init() take argc and argv

dm core shouldn't be passing char *params to targets' init()
because all targets are basically going to copy-paste a code
snippet (that strseps params) from the existing targets code
which is inefficient and should be avoided.

This commit adds dm_table_init() which converts char *params
to int argc and char **argv, and passes them to init().

show more ...


# e620de1a 24-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Add dm_table_init_target()


# d471f1f9 24-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Don't let targets implement deps [2/2]

This commit gets rid of target's deps handler by introducing
a new structure struct dm_mapping which embeds struct dm_pdev*
and a tailq struct

sys/dev/disk/dm: Don't let targets implement deps [2/2]

This commit gets rid of target's deps handler by introducing
a new structure struct dm_mapping which embeds struct dm_pdev*
and a tailq structure for the next entry whose tailq head is
embedded within struct dm_table_entry.

=====(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*)

Each target's init() now calls dm_table_add_deps(table, pdev)
to add a new dm_mapping (that points to pdev) to table. This
allows dm table structure to refer to underlying devices that
the target is dependent on (by following this tailq) without
using target specific deps handler.

dmsetup(8)'s deps subcommand is now handled by a newly added
dm core function dm_table_deps() that is common among targets.
This greatly reduces complexity and size of targets plus make
code less error prone. Targets only need to call dm_table_add
_deps() as mentioned above whenever they allocate underlying
device(s) via dm_pdev_insert().

show more ...


# 49784e7d 24-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Don't let targets implement deps [1/2]

As mentioned in 66fee7cc, each dm target implementing its deps
ioctl handler is inefficient and error prone since each handler
is going to be

sys/dev/disk/dm: Don't let targets implement deps [1/2]

As mentioned in 66fee7cc, each dm target implementing its deps
ioctl handler is inefficient and error prone since each handler
is going to be just a copy pasted code from other target for
its underlying device(s).

The way dm computes device dependencies (i.e. deps handler)
shouldn't be targets specific in the first place. The problem
here is that dm table (struct dm_table_entry) is unable to see
its underlying device(s), but only each target specific data
structure can see them. This commit and next one fix it and
enables dm core to handle dependencies without using targets
specific code.

This commit only changes API format of init handler. It needs
to pass dm table instead of device and void**, for the next
commit.

show more ...


# 54b60c60 19-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Don't implement "status" as a subset of "table" [2/2]

struct dm_target's "char *(*status)(void *);"
handler should be "char *(*table)(void *);"
given that it now has "char *(*info)(

sys/dev/disk/dm: Don't implement "status" as a subset of "table" [2/2]

struct dm_target's "char *(*status)(void *);"
handler should be "char *(*table)(void *);"
given that it now has "char *(*info)(void *);"
to be compatible with Linux dm behavior.

This breaks API compatibility with NetBSD's dm, but the
previous commit already broke compatibility with NetBSD,
in order to implement it right.

show more ...


# bdf2de7b 12-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Cleanups

Remove a space from
dm_table_entry_t * table_en,
struct buf * bp,
dm_dev_t * dmv,
etc

No binary change.


# 903c3618 01-Oct-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Conform to style(9)


# 89635542 29-Sep-2015 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/dev/disk/dm: Remove unconditional kprintf in strategy()

dm-error has unconditional kprintf in strategy originally
brought from the same function in NetBSD, but this is just
bothering considering

sys/dev/disk/dm: Remove unconditional kprintf in strategy()

dm-error has unconditional kprintf in strategy originally
brought from the same function in NetBSD, but this is just
bothering considering the purpose of this dm target is to
generate an error.

show more ...


Revision tags: v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


Revision tags: v2.12.0, v2.13.0
# b188342f 21-Jun-2011 Adam Hoka <adam.hoka@gmail.com>

dm - Move the target unbusy to the dm_table_destroy function

Sponsored-by: Google Summer of Code


Revision tags: v2.10.1, v2.11.0, v2.10.0
# a84e173e 02-Dec-2010 Alex Hornung <ahornung@gmail.com>

dm - undo my pointless moving of dm.h

* There was no need to move dm.h, we can just use <dev/disk/dm/dm.h>.

* And since we can do the above, we can also get rid of the strange
Makefile CFLAGS mag

dm - undo my pointless moving of dm.h

* There was no need to move dm.h, we can just use <dev/disk/dm/dm.h>.

* And since we can do the above, we can also get rid of the strange
Makefile CFLAGS magic I added.

* Also undo the removal on upgrade of /usr/include/dev/disk/dm/dm.h and
instead remove sys/dm.h

Reported-by: Sascha Wildner

show more ...


12