elad
0c9d8d15c9
Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
...
something meaningful. All relevant documentation has been updated or
written.
Most of these changes were brought up in the following messages:
http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html
Thanks to christos, manu, njoly, and jmmv for input.
Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
2012-03-13 18:40:26 +00:00
haad
62688f9115
Fix wrong KASSERT, reported by mhitch@.
2012-01-04 16:05:53 +00:00
agc
d3a7c35f37
fixup comments - no functional change
2011-12-11 22:53:26 +00:00
hannken
2cc7a01f10
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.
2011-10-14 09:23:28 +00:00
ahoka
7cc3650740
readd assertions noew with the correct struct
...
im wondering why the module cflags didnt warn about this obvious typo
2011-08-28 07:22:48 +00:00
joerg
c5a7423167
Revert last, assertions on undefined variables don't make sense.
2011-08-27 23:31:12 +00:00
ahoka
71a8c24685
add function to get the inactive table size (for during target init)
2011-08-27 17:10:05 +00:00
ahoka
58dc1a2f06
be consistent and define secsize here as well (though this seems unused?)
...
some white' from emacs
2011-08-27 17:09:09 +00:00
ahoka
ff2b2e8e7c
- add a function to get the inactive table's size
...
- some whitespace fix from emacs...
2011-08-27 17:07:49 +00:00
ahoka
0239807a25
Add a sanity check for missing functions in dmt
2011-08-27 17:06:08 +00:00
haad
b08f594364
Fix simple typo which made stripe target not working very at all. Issue
...
found by mhitch@.
2011-06-02 17:49:40 +00:00
joerg
23abb27f60
Fix logic error
2011-05-24 15:23:41 +00:00
christos
789f5516b0
Now that we have allowed operator to access the control node, make sure
...
that he cannot cause damage, by only allowing the superuser to do ioctls
that can cause damage.
2010-12-23 20:07:13 +00:00
mlelstv
75268cff3f
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@
2010-12-23 14:58:13 +00:00
haad
08d72eb06c
I have forgot to fix dm_dev_counter here, too.
2010-12-06 09:12:23 +00:00
haad
e52bc34bd3
We don't need 64 bit variable for dm_device coutner, too.
2010-12-06 09:03:40 +00:00
haad
50cad777f0
Add comment about dm_dev minor, and change it to 32bit value we realy not
...
going to use so much device minor numbers.
2010-12-06 08:54:49 +00:00
dholland
8f6ed30d57
Introduce struct pathbuf. This is an abstraction to hold a pathname
...
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.
Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).
The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00
uebayasi
0666f65e61
curlwp needs sys/lwp.h.
2010-11-15 05:52:41 +00:00
haad
1a571ae457
Add old file describing locking schema used in dm driver.
2010-10-23 21:18:54 +00:00
haad
2b4880da46
In rome do as romans do. If I will get EEXIST from devsw_attach don't exit and
...
continue. This unbreaks usage of libdm in RUMP.
2010-10-09 12:56:06 +00:00
pgoyette
23d5409e7e
Update the rest of the kernel to conform to the module subsystem's new
...
locking protocol.
2010-08-21 13:19:39 +00:00
haad
58b6472739
Add multi device strip support written by Guillermo Amaral and reviewed by me.
2010-05-18 15:10:41 +00:00
haad
fb8751aba4
Add support for DIOCCACHESYNC ioctl for dm devices. Add new sync function
...
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.
2010-05-18 15:10:38 +00:00
haad
c8688b58cc
Fix typo in comment.
2010-05-18 15:01:17 +00:00
jakllsch
c2ca7b837e
Fix build of i386 ALL kernel with patch from Greg A. Woods in PR/43056.
2010-03-26 15:46:04 +00:00
jakllsch
165a0cf70b
Rework module/builtin code so it works in both cases.
...
(Tested recently in the module case, slightly less recently as builtin.)
<haad> [if it works] go for it
2010-03-23 15:09:45 +00:00
haad
0d21743f10
Disable disk_ioctl_switch fo device-mapper control device.
2010-03-12 16:26:26 +00:00
jakllsch
dd483616f8
Use RUN_ONCE(9) again. (Everyone happy now?)
2010-02-27 00:31:57 +00:00
jakllsch
7d0469d4c4
Use correct prototype for dmattach().
2010-02-26 23:52:43 +00:00
haad
58c910bce8
Fix device-mapper to work in builtin case. This commit fixes
...
PR: 42799
REwork fix commited by jak@ to be more readable and remove unneeded ifdef _MODULE.
2010-02-25 23:37:39 +00:00
jakllsch
6fc9836341
Be sure to config_cfattach_attach() in dmattach().
...
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.
2010-02-25 20:48:58 +00:00
pooka
5b81af7179
Fix this for non-module (which, i guess, is only i386/ALL).
...
XXX: autoconfusion vs. modules is an intolerable mess of stepping
on each others' toes.
2010-01-08 00:27:48 +00:00
haad
293fc00622
Indent files remove unnecessary blank lines, white spaces and KNFize code.
2010-01-04 00:12:22 +00:00
haad
66ff911808
Refactor dmioctl to by cleaner and to copyout dictionary in case when something
...
went wrong.
2010-01-03 22:55:25 +00:00
haad
c52cab8857
KNF police, remove unnecessary whitespaces and tabulators. Refactor dmioctl
...
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.
2010-01-03 22:44:10 +00:00
haad
b9ba4842ce
Hook device-mapper to autoconf framework. Add dm_attach, dm_match and dm_detach
...
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@.
2010-01-03 22:22:23 +00:00
haad
22c533e1d0
Replace aprint_Verbose with aprint_debug to shutup unnecessary logs.
2010-01-03 12:53:00 +00:00
haad
36fe06980c
Add private lock to dm_dev_t used for mutual exclusion for diks(9) api
...
routines. This change fixes PR kern/42532.
2009-12-29 23:37:47 +00:00
haad
8181298188
Add support for DM_QUERY_INACTIVE_TABLE_FLAG to dm_table_status and dm_table_deps
...
this flag was introduced to dm->lvm protocol in 4.16.0 version of it. Restore
vrsion check functionality and sent back actual kernel driver version.
2009-12-06 14:33:46 +00:00
haad
676cba4177
Make our driver version equal to linux driver.
2009-12-06 14:31:16 +00:00
haad
79ad9d0df4
Install netbsd-dm.h file to include/dev/dm so it can be used by public.
2009-12-05 11:34:37 +00:00
haad
bd8ee331ed
Include only user-kernel communication protocol related information in this header.
2009-12-05 11:30:26 +00:00
haad
ca10901dd8
Remove wrong TODO item, it violates abstraction between kernel-libdevmapper
...
and lvm tools.
2009-12-05 01:25:12 +00:00
haad
8f50b1a274
Fix bug in dm_table_resume_ioctl where dmv->flags was sent back to libdevmapper
...
except flags variable. This fixes weird behaviour, when worng links to
devices in /dev/mapper were created after lvrename/lvresize.
2009-12-05 01:21:41 +00:00
haad
f26bfe28da
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@
2009-12-01 23:12:09 +00:00
joerg
af76846cf3
Reduce a noise from a debug printf to debug level
2009-10-23 20:41:11 +00:00
joerg
336cbcc88d
Don't spam the console with debug messages.
2009-10-16 21:23:08 +00:00
haad
76a0c0e7d2
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@.
2009-09-09 22:38:49 +00:00
yamt
83723a32c5
fix a comment typo.
2009-08-16 11:02:24 +00:00