| Age | Commit message (Collapse) | Author |
|
|
|
interfaces, make sure that initialization and destruction
follow the proper sequence. This is triggered by the recent
changes to the devsw stuff; per riastradh@ the required call
sequence is:
devsw_attach()
config_init_component() or config_cf*_attach()
...
config_fini_component() or config_cf*_detach()
devsw_detach()
While here, add a few missing calls to some of the detach
routines.
Testing of these changes has been limited to:
1. compile without build break
2. no related test failures from atf
3. modload/modunload work as well as
before.
No functional device testing done, since I don't have any
of these devices. Let me know of any damage I might cause
here!
XXX Some of the modules affected by this commit are already
XXX broken; see kern/56772. This commit does not break
any additional modules (as far as I know).
|
|
|
|
|
|
also remove some trailing space in documentation.
|
|
|
|
log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
|
|
|
|
on open devices unless detach is forced.
PR kern/54969 (Disk cache is no longer flushed on shutdown)
|
|
|
|
|
|
This is part of NetBSD's dm design, but unimplemented
(all handlers return 0) and also unused.
|
|
Tested by Matthias Petermann, thanks!
|
|
which I missed in my initial dm-flakey commit.
|
|
Ported from DragonFlyBSD, but this target had originally existed in
Linux kernel. See below for details.
https://www.kernel.org/doc/Documentation/device-mapper/delay.txt
Due to "tick" in hz(9) not working (which results in dmdlthread spinning
forever in _submit_queue() without dp extracted from delayed list
and queued into submit list), this hasn't been hooked to dm.kmod yet.
taken-from: DragonFlyBSD
|
|
Ported from DragonFlyBSD, but this target had originally existed in
Linux kernel. See below for details.
https://www.kernel.org/doc/Documentation/device-mapper/dm-flakey.txt
Due to two technical issues, this hasn't been hooked to dm.kmod yet.
1) "tick" in hz(9) not working.
2) Unable to use ->b_private in nestiobuf callback when it's already
used for mbp (see HAS_BUF_PRIV2).
taken-from: DragonFlyBSD
|
|
These two don't really need to be inlined.
|
|
|
|
|
|
Since ->info() (counter part of ->table() in the original dm design
in Linux kernel in .status where both INFO and TABLE are optional)
is an optional handler, make ->table() optional as well. Some
targets don't have anything to do in ->table() just as in ->info().
taken-from: DragonFlyBSD
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
|
|
More readable without dm_ioctl_switch() as a separate function.
|
|
|
|
The # of args is part of target's spec.
Both Linux kernel and DragonFlyBSD test argc on ctr/init.
|
|
|
|
|
|
Add these two targets to dm.kmod.
These are generally available in Linux and DragonFlyBSD,
so enable them in NetBSD as well.
|
|
This is uint64_t version, not sys/lib/libsa/atoi.c.
|
|
|
|
Apparently some targets have nothing to sync, so make it 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)".
|
|
Use either one, but not both.
|
|
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
|
|
The way dm_table_status_ioctl() implements "status" and "table" is
not compatible with Linux kernel. Some targets have different outputs
that "status" can't be implemented as subset of "table".
Add ->info() handler to sync with "status" behavior in Linux kernel.
Some targets which currently exist in NetBSD (I think striped)
as well as some minor targets that I plan to port to NetBSD
can/should implement ->info(), but will do that in a different commit.
taken-from: DragonFlyBSD
|
|
which comes from prop_dictionary_get_uint32() result.
taken-from: DragonFlyBSD
|
|
|
|
Use of void casts in dm is not consistent, just get rid of them.
|
|
Having debug prints in ->strategy() by default just to tell ->strategy()
is called is overkill.
taken-from: DragonFlyBSD
|
|
Having assertions here causes panic if target is missing anything
as shown in "dm: Add dummy target ->sync()/->secsize() to prevent panic on modload(8)".
Instead just return EINVAL if a handler(s) isn't implemented.
taken-from: DragonFlyBSD
|
|
Need to free dmp regardless of dm_pdev_rem() return value.
taken-from: DragonFlyBSD
|
|
This gets rid of the same parser code in each target using strsep(3).
taken-from: DragonFlyBSD
|
|
This change seems to break "deps" in dm ioctl(2) for linear target.
Revert the change, will revisit later.
https://mail-index.netbsd.org/current-users/2019/12/11/msg037179.html
|
|
dm_target_linear_status() shouldn't print this debug message by default
on dmsetup "table" ioctl/command.
|
|
Looks like cleanup_exit label is in a wrong place.
Should skip prop_dictionary_copyout_ioctl() on error.
|
|
Sync with Linux kernel.
The file name is "stripe", but the target name is "striped".
DragonFlyBSD also follows this.
|