Commit Graph

15870 Commits

Author SHA1 Message Date
yamt
5c3967c0d3 comments 2012-07-30 23:04:42 +00:00
yamt
a143089ba8 comment 2012-07-30 23:02:41 +00:00
skrll
ddb65e7ed5 Backout previous. ld.so requires the division routines so this needs
more thought.
2012-07-30 12:57:54 +00:00
dsl
160cd430cb Make this compile with the compiler I'm using.
Move variable defs to top of function.
Don't use const static mib[] - run time initialisation won't matter,
and not using static data may actually help in a .so.
2012-07-29 14:44:13 +00:00
njoly
6ddf50a26a Kill extra Fc macro. 2012-07-28 09:56:09 +00:00
christos
7dab8608fa mention PATH_MAX instead of 16. 2012-07-27 21:33:46 +00:00
wiz
b713a39753 Remove trailing whitespace. 2012-07-27 18:22:04 +00:00
pooka
3b3ffd7039 Once again, make the rump kernel hypercall layer work on Linux. 2012-07-27 09:09:05 +00:00
ginsbach
8a9d1a0f53 - Further clarify differences between inet_pton() and inet_aton()
(i.e. the former only accepts decimal numbers; no octal or hex)
- Clarify that inet_network() does not do byte rearrangement for one,
  two, and three part dotted addresses ala inet_aton() and inet_addr().
- whitespace
2012-07-25 14:51:15 +00:00
christos
eb537b13b6 Mention how big the name can be. 2012-07-23 02:21:14 +00:00
joerg
ca946cd63d Redo hashing, if two of the three individual hashes result in identical
hash modules. This is the trivial case for loops in the 3-graph and got
lost when adopting the nbperf code.
2012-07-21 22:49:37 +00:00
manu
075ba0e590 - Fix same vnodes associated with multiple cookies
The scheme used to retreive known nodes on lookup was flawed, as it only
used parent and name. This produced a different cookie for the same file
if it was renamed, when looking up ../ or when dealing with multiple files
associated with the same name through link(2).

We therefore abandon the use of node name and introduce hashed lists of
inodes. This causes a huge rewrite of reclaim code, which do not attempt
to keep parents allocated until all their children are reclaimed

- Fix race conditions in reclaim
There are a few situations where we issue multiple FUSE operations for
a PUFFS operation. On reclaim, we therefore have to wait for all FUSE
operation to complete, not just the current exchanges. We do this by
introducing node reference count with node_ref() and node_rele().

- Detect data loss caused by FAF
VOP_PUTPAGES causes FAF writes where the kernel does not check the
operation result. At least issue a warning on error.

- Enjoy FAF shortcut on setattr
No need to wait for the result if the kernel does not want it. There is
however an exception for setattr that touch the size, we need to wait
for completion because we have other operations queued for after the
resize.

- Fix fchmod() on write-open file
fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.

- Remove node TTL handling for netbsd-5 for simplicity sake. The code
still builds on netbsd-5 but does not have the node TTL feature anymore.
It works fine with kernel support on netbsd-6.
2012-07-21 05:49:42 +00:00
manu
8502ba8ea3 - Improve PUFFS_KFLAG_CACHE_FS_TTL by reclaiming older inactive nodes.
The normal kernel behavior is to retain inactive nodes in the freelist
until it runs out of vnodes. This has some merit for local filesystems,
where the cost of an allocation is about the same as the cost of a
lookup. But that situation is not true for distributed filesystems.
On the other hand, keeping inactive nodes for a long time hold memory
in the file server process, and when the kernel runs out of vnodes, it
produce reclaim avalanches that increase lattency for other operations.

We do not reclaim inactive vnodes immediatly either, as they may be
looked up again shortly. Instead we introduce a grace time and we
reclaim nodes that have been inactive beyond the grace time.

- Fix lookup/reclaim race condition.

The above improvement undercovered a race condition between lookup and
reclaim. If we reclaimed a vnode associated with a userland cookie while
a lookup returning that same cookiewas inprogress, then the kernel ends
up with a vnode associated with a cookie that has been reclaimed in
userland. Next operation on the cookie will crash (or at least confuse)
the filesystem.

We fix this by introducing a lookup count in kernel and userland. On
reclaim, the kernel sends the count, which enable userland to detect
situation where it initiated a lookup that is not completed in kernel.
In such a situation, the reclaim must be ignored, as the node is about
to be looked up again.
2012-07-21 05:17:10 +00:00
wiz
4fe6953778 Whitespace fixes. 2012-07-20 20:48:59 +00:00
ginsbach
02704af418 - Add an ERRORS section rather than incompletely documenting the
possible errno values in the DESCRIPTION section.
2012-07-20 19:44:39 +00:00
ginsbach
507b3f0fc0 - Add ERRORS section covering errno values set by inet_ntop() and
inet_pton()
2012-07-20 19:18:08 +00:00
ginsbach
cf882f9583 - Use .Vt for variable types outside the SYNOPSIS section rather than .Ft
- Use .Fn for function names outside the NAME section rather than .Nm
2012-07-20 14:25:38 +00:00
ginsbach
d91627e978 - Use .Vt for variable types outside the SYNOPSIS section rather than .Ft
- Use .Fn for function names outside the NAME section rather than .Nm
- Mark NULL as a defined value (.Dv)
- New sentence new line
- Don't start sentences with an arugment name
- Use \- rather than a bare - for a minus sign
- Spelling: rightmost
- Stray whitespace
  (Most changes from FreeBSD)
2012-07-20 13:40:58 +00:00
wiz
dd347cecb9 Minus (one) needs a backslash before the minus. 2012-07-19 06:44:12 +00:00
joerg
d306702545 Match ARCHSUBDIR logic from libpthread. 2012-07-19 06:33:48 +00:00
joerg
527edfe136 Always initialize part to avoid triggering uninitialized variable
warnings.
2012-07-19 06:33:03 +00:00
christos
e24e95d4d8 Explain what's going on with fortify being disabled when the optimizer is off:
http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00174.html
2012-07-18 22:22:26 +00:00
christos
1f432e4501 From Kamil Dudka: fix crash of el_insertstr() on incomplete multi-byte 2012-07-18 17:12:39 +00:00
dholland
057a51dacf Note that when the mythical libc bump comes, one of the things we should
do is punt ruserok() and its related apparatus out to libcompat.
(Or perhaps just remove it entirely.)
2012-07-17 05:41:30 +00:00
rmind
a3b239f6f3 - Rework NPF tables and fix support for IPv6. Implement tree table type
using radix / Patricia tree.  Universal IPv4/IPv6 comparator for ptree(3)
  was contributed by Matt Thomas.
- NPF tables: update regression tests, improve npfctl(8) error messages.
- Fix few bugs when using kernel modules and handle module autounloader.
- Few other fixes and misc cleanups.
- Bump the version.
2012-07-15 00:22:58 +00:00
darrenr
3ec957d580 bin/46703: BSD r-commands use wrong source address for stderr
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46703
Bump libc minor for the addition of rresvport_af_addr()
2012-07-14 15:06:26 +00:00
christos
30afd8c6c5 don't mention the indirect libm dependency. 2012-07-12 20:14:44 +00:00
christos
1520387754 move atf down to fix the build 2012-07-12 19:11:06 +00:00
christos
c046613e5b PR/46678: Ian Wienand: Add stub implementation for rl_free_line_state() 2012-07-12 18:46:20 +00:00
christos
1f6b1e024b leave the roach motel 2012-07-11 19:02:18 +00:00
reinoud
228e4d05b8 On the libc/libgcc clashes cleanup that removed divsi3.o from libc, ARM/evbarm
was forgotten. This patch fixes it making static binaries possible again!
2012-07-11 18:24:27 +00:00
rmind
6461e5c133 Add weak symbol for murmurhash2. 2012-07-09 21:25:46 +00:00
jdf
156d32710f Add ENOTCONN to returned error codes, bump date.
Tip of asau.
2012-07-09 21:22:21 +00:00
christos
ac9e945799 fix cleanup on error 2012-07-09 03:11:59 +00:00
rmind
8b1b6a9a1f Add Makefile in libc for murmurhash, missed in previous commit. 2012-07-08 11:43:47 +00:00
rmind
ea196989a7 Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
The code is taken from the upstream and is in the public domain.

OK christos@
2012-07-08 01:21:11 +00:00
matt
90845bcc64 Slight optimization. 2012-07-08 00:59:34 +00:00
joerg
39c83c81bb One more reference to unimplemented shared semaphores. 2012-07-07 01:39:59 +00:00
joerg
cf1cc428c9 Shared semaphores have been supported since the initial version, so drop
obsolete restriction.
2012-07-07 01:37:12 +00:00
wiz
76576e4292 Sort description of flags. 2012-07-02 20:02:43 +00:00
rmind
33b678d7e0 NPF improvements:
- Add NPF_OPCODE_PROTO to match the address and/or protocol only.
- Update parser to support arbitrary "pass proto <name/number>".
- Fix IPv6 address and protocol handling (add a regression test).
- Fix few theorethical races in session handling module.
- Misc fixes, simplifications and some clean up.
2012-07-01 23:21:06 +00:00
jdf
6f43071798 Replace wrong variable type (s/ITEMS/ITEM). 2012-06-30 09:25:55 +00:00
yamt
b4228b70f2 implement descriptor passing. 2012-06-29 13:20:25 +00:00
blymn
74bbb55e87 * Size argument for memset when clearing cbuf was wrong, cbuf is an array
of char not int so memset was stomping memory past the end of the array.
  Use sizeof properly to correctly determine the amount of memory to clear.
2012-06-29 10:40:29 +00:00
abs
f8f196e8f9 Fix the build by adding (unused) flags argument to perfuse_node_setattr_ttl 2012-06-28 13:53:13 +00:00
jdf
dfc0f5280b Add manpage link entries for libmenu, reformat MAN entry.
On the way, sort the mi list for comp alphabetically.
2012-06-27 22:18:06 +00:00
wiz
db0ea5f9de Bump date for previous, remove trailing whitespace. 2012-06-27 20:30:52 +00:00
manu
d1056538cc Pass the FAF flag to handlers:
- setattr_ttl is updated to add a flag argument. Since it was not present in
  a previous release, we can change its API
- write2 is introduced, this is write with an extra flag for FAF.
- fsync already has the FAF information in a flag and needs no change
- for other operations, FAF is unconditional
2012-06-27 13:25:23 +00:00
blymn
c915e1430c * Corrected menu drawing when O_ROWMAJOR is not set
* Corrected menu item neighbour calculation so it works when O_ROWMAJOR
  is set and unset.  This corrects item navigation which was previously
  broken when O_ROWMAJOR was not set.

This resolves lib/46620.
2012-06-27 11:53:36 +00:00
blymn
e50cb73fff Extraneous whitespace removal. 2012-06-27 11:39:14 +00:00