Commit Graph

238 Commits

Author SHA1 Message Date
christos
ea65093059 stub out for now 2013-04-14 16:52:47 +00:00
christos
1dd1e91a24 add a stub for arm 2013-04-14 16:39:59 +00:00
christos
213aef742a let zfs autoload too. 2013-03-04 01:14:35 +00:00
christos
db9ff9a846 print the function name that was not found. 2013-03-03 18:18:13 +00:00
christos
c43c276ced autoload tracing modules. 2013-03-03 18:16:35 +00:00
christos
9776ad40b3 need to be a DRIVER class module to be able to autoload when /dev/dtrace/dtrace
is opened.
2013-03-03 16:56:15 +00:00
tron
53529c743e Fix dodgy arguments to snprintf(3) which cause a warning that breaks
the build (at least with "USE_SSP" set to "yes").
2013-02-20 22:45:12 +00:00
christos
55ad42a55f Avoid comparison between pointer and integer. 2013-01-26 20:15:50 +00:00
wiz
3c7ce2aac6 Put optional args before non-optional ones. 2013-01-20 23:51:40 +00:00
wiz
519dc5efd2 Sort options in SYNOPSIS and text.
XXX: please check if SYNOPSIS are correct, I think they missing some .Op.
2013-01-19 01:22:12 +00:00
christos
d3d2c27409 add man pages 2013-01-18 19:58:43 +00:00
christos
a83c8cf9a9 Handle enum forward declarations. 2013-01-18 16:23:48 +00:00
dsl
a34e002f26 Spell cprng_fast() properly 2013-01-03 17:12:05 +00:00
dsl
278835249a Use cprgn_fast() not rnd_extract_data().
The latter isn't in any header files any more.
2013-01-03 16:42:55 +00:00
dsl
51f5533426 Compilation fixes:
- include sys/ioctl.h
- NULL isn't an int constant
- %llf isn't a printf format
2013-01-03 16:41:51 +00:00
tron
888f2d7310 Include "sys/ioctl.h" for the prototype of ioctl(2) which fixes the build. 2013-01-02 21:19:13 +00:00
dsl
6c6b743ee5 I've NFI why this code has userspace stuff playing with 'struct proc *'
nor why it uses &p0 as a magic constant (rather than NULL).
Re-instate the definition of p0, but enable the 'fake' definition
  of 'struct proc' if the relevant part of sys/proc.h seems to have
  been #if'ed away.
Should fix the build.
2013-01-02 16:31:24 +00:00
dsl
be6d96d7d9 Explicitly include sys/ioctl.h 2013-01-02 10:33:49 +00:00
dsl
07465819ee Replace alloca(256) with an array.
The code ended up using alloca() from libc - which 'just can't work' (tm).
It is also pointless!
2013-01-02 10:33:19 +00:00
dsl
b4041ccef0 Comment out the unused 'struct proc p0;'
This is userspace, it isn't supposed to know what a 'struct proc' is.
2013-01-01 19:03:26 +00:00
dsl
f337b6c74a This needs an explicit include of sys/ioctl.h.
XXX: There is some crappy code in here :-)
2013-01-01 19:02:19 +00:00
chs
8f4ea3c47b adapt the profile dtrace provider to netbsd. 2012-12-07 03:11:17 +00:00
chs
11c69f2d20 adapt the cyclic module and profile dtrace provider to netbsd.
for now, just hook the cyclic callback into hardclock().
2012-12-02 01:05:16 +00:00
chs
a32db86a29 update cyclic module to the freebsd 8-stable version as of svn r219520. 2012-12-02 00:05:38 +00:00
christos
7c1cb982d4 we have _SC_PHYS_PAGES now 2012-11-04 19:12:41 +00:00
riastradh
d9310ec72a Use 0 for MS_NOMNTTAB since we have no mnttab anyway. 2012-10-20 22:11:38 +00:00
joerg
fdd8614af9 Hack to avoid missing macro to unbuild the tree. 2012-10-20 11:37:37 +00:00
riastradh
0041a2c6fe Let's try that again without the static... 2012-10-19 22:19:15 +00:00
riastradh
e75d983bfe Add omitted secpolicy_vnode_utime_modify, for zfs. 2012-10-19 19:58:33 +00:00
riastradh
4797828821 Back out accidental commit of errno kludge for rmdir(".") &c.
Solaris returns EEXIST, whereas we want to return ENOTEMPTY (POSIX
allows both), but this got included in an unrelated commit and should
be separated into a common commit for other related error code fixes.
2012-10-18 14:29:44 +00:00
riastradh
2111fc7126 Take a first whack at making zfs permissions work.
zfs_access uses secpolicy_vnode_access, so it makes no sense for the
latter to call VOP_ACCESS!

Everything seems to return EACCES instead of EPERM, probably because
that's what kauth returns.  This should be fixed, but that may
require some nontrivial surgery to zfs's calls to secpolicy_*, which
is where kauth gets involved.

This commit imports some code from illumos to implement the routine
secpolicy_vnode_setattr.  This shouldn't be outside dist/, but for
now it is expedient to do so.  We ought to fix that, along with all
the other CDDL code outside dist/, when we next import a newer
version of zfs.
2012-10-18 14:22:57 +00:00
riastradh
8e972045d7 Restore _PC_NO_TRUNC in zfs_netbsd_pathconf.
Accidentally clobbered it in a previous commit while moving patches
around between source trees -- oops.
2012-10-16 00:04:15 +00:00
riastradh
6d6cb07bff Fail lookup of .. in a deleted directory with ENOENT.
Don't try to zget the parent, whose znode id may have been recycled
by now.

It's not clear to me how Solaris avoids this, but maybe I'm just
missing something obvious.
2012-10-15 23:51:11 +00:00
riastradh
1baf22d09c Fix various issues in zfs life cycle, locking, and vop protocol.
- Restore some zfs locking and unlocking that got lost randomly.

- Enable use of the BSD vnode lock.  Lock order: all BSD vnode locks
are taken before all zfs internal locks.  There remains an issue with
O_EXCL, to be solved later (famous last words).  KASSERT the locking
scheme up the wazoo.

- Take our cruft out of zfs_lookup and move it to zfs_netbsd_lookup.
Restore much of the way zfs_lookup looked to make merging future
versions easier.  Disable use of the namecache for now because its
locking dance is too scary to contemplate.

- Implement BSD semantics for rename, to appease our tests.  This is
a provisional kludge; eventually we need VOP_RENAME to take a flag
specifying whether to use BSD semantics or POSIX semantics.

- Simplify zfs_netbsd_reclaim and make it work.  Now that getnewvnode
never tries to vclean anything itself, we need not worry about
recursion of ZFS_OBJ_MUTEX locks.

- Clarify and fix genfs node initialization and destruction.

zfs passes most of our atf vfs tests now, including the rename races.

Still to do:

- fix the impedance mismatch between our permissions model and zfs's;
- fix O_EXCL (nontrivial);
- throw dirconc at it and see how badly it explodes;
- find why zpool sometimes wedges itself during mkfs; and
- find why pool caches sometimes seem to get corrupted.
2012-10-15 23:08:19 +00:00
riastradh
1b44cf7c91 secpolicy_vnode_access must be called with the vnode lock held.
Don't unlock the vnode and then tell the caller about what the world
was like while the vnode was locked.  The world changes fast.
2012-10-15 22:50:25 +00:00
riastradh
2ea30100de Simplify zfs dirlock reference counting.
No need to pass dzp around; dl has a pointer to it.
2012-10-15 22:43:50 +00:00
riastradh
b2ba8fafaa Do reference counting for zfs range lock waiters.
Avoid cv_broadcast(&cv); cv_destroy(&cv); which works in Solaris only
by abuse of the condvar abstraction.

There are parts of this code that should be factored into smaller
subroutines, mainly range lock allocation and initialization, but
that would make it harder to merge newer versions of zfs, so for now
I've just expanded those parts further in-line.
2012-10-15 14:15:59 +00:00
riastradh
f1e3330bc7 Do reference counting for zfs dirlock waiters.
Solaris relies on cv_broadcast(&cv); cv_destroy(&cv) working, but
that hoses our cv_wait, which needs to continue using cv after it is
woken.  Solaris's idiom is an abuse of the condvar abstraction, but
we can get the same effect with reference counting.
2012-10-15 14:03:06 +00:00
njoly
172b16130f No need to include files more than once. 2012-10-11 08:01:23 +00:00
njoly
6b1609c666 Add _PC_NO_TRUNC support in zfs_netbsd_pathconf(). 2012-10-01 18:19:18 +00:00
riz
91aa9460ce Don't build with debugging (-g) by default. 2012-09-05 23:08:42 +00:00
pooka
fa4bf43b79 For now, make vop_islocked more like vop_lock and vop_unlock (i.e. don't
even attempt to do anything).
2012-09-01 16:19:00 +00:00
christos
ffd8412325 PR/46660: Henning Petersen: Fix typo in deviceid.c 2012-07-05 13:55:58 +00:00
njoly
b813bd15cb Use CTLTYPE_QUAD for uint64_t type in sysctl_createv. 2012-06-19 21:25:26 +00:00
chs
22738551d6 reduce diff to freebsd:
rename "xcpu" back to "cpu" now that the conflicting global variable
has been renamed out of the way.  this also fixes some cases
where references to the local variable "cpu" had not been renamed
and thus were accidentally referring to the former global "cpu".
2012-06-16 17:31:47 +00:00
chs
6e9ead4606 make dtrace work on amd64. 2012-06-11 15:18:05 +00:00
jym
57d7988f76 Now that pool_cache_invalidate() is synchronous and can handle per-CPU
caches, merge together pool_drain_start() and pool_drain_end() into

bool pool_drain(struct pool **ppp);

"bool" value indicates whether reclaiming was fully done (true) or not (false)
"ppp" will contain a pointer to the pool that was drained (optional).

See http://mail-index.netbsd.org/tech-kern/2012/06/04/msg013287.html
2012-06-05 22:51:47 +00:00
dsl
f7622c11cc Not sure why this has just started to fail!
But it really isn't a good idea to compare a uint64_t to NULL.
2012-06-03 10:53:51 +00:00
christos
27e3db30d5 Add FREAD for the benefit of kauth! 2012-04-26 23:34:09 +00:00
wiz
2b8cc88a65 Use the correct path in dt_module.c.
From clang via Henning Petersen in PR 46009.
2012-02-13 13:05:36 +00:00