CVS commit: src/sys/kern

2015-08-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Aug  2 03:29:22 UTC 2015

Modified Files:
src/sys/kern: vfs_mount.c

Log Message:
Do not VFS_SYNC before VFS_UNMOUNT on force unmount

VFS_SYNC does not consider whether we are performing a force unmount or not,
and therefore it can wait for a while if the filesytstem is misbehaving.
Removing VFS_SYNC before VFS_UNMOUNT on forced unmount fixes the problem.

This should not cause harm as the VFS_SYNC seems just useless.
As noted by Chuck Silvers in
http://mail-index.netbsd.org/tech-kern/2015/07/13/msg019156.html
- Nothing seems to prevent vnodes from getting dirty again after VFS_SYNC call.
- Filesystems do flush data through vflush() in VFS_UNMOUNT anyway.

As a consequence, the VFS_SYNC call in do_unmount() could probably be
completely removed. But since such a change is quite dangerous, we just
remove it in the case of forced unmounts, which are situations where
the risk of data loss is known to the operator.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/kern/vfs_mount.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-08-25 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug 25 07:16:00 UTC 2010

Added Files:
src/lib/libperfuse: Makefile debug.c fuse.h libperfuse.3 ops.c
perfuse.c perfuse.h perfuse_if.h perfuse_priv.h shlib_version
subr.c

Log Message:
libperfuse(3) is a PUFFS relay to FUSE. In order to use it,
FUSE filesystem must be patched to #include  in the source
files that open /dev/fuse and perform the mount(2) system call. The
FUSE filesystem must be linked with -lperfuse.

libperfuse(3) implements the FUSE kernel interface, on which libfuse or
any FUSE filesystem that opens /dev/fuse directly can be used.

For now, an external daemon called perfused(8) is used. This may change
in the future.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libperfuse/Makefile src/lib/libperfuse/debug.c \
src/lib/libperfuse/fuse.h src/lib/libperfuse/libperfuse.3 \
src/lib/libperfuse/ops.c src/lib/libperfuse/perfuse.c \
src/lib/libperfuse/perfuse.h src/lib/libperfuse/perfuse_if.h \
src/lib/libperfuse/perfuse_priv.h src/lib/libperfuse/shlib_version \
src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/perfused

2010-08-25 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug 25 07:18:01 UTC 2010

Added Files:
src/usr.sbin/perfused: Makefile debug.c msg.c perfused.8 perfused.c
perfused.h

Log Message:
perfused(8) creates a /dev/fuse socket and performs PUFFS to FUSE relaying.
This is still a work in progress.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/usr.sbin/perfused/Makefile \
src/usr.sbin/perfused/debug.c src/usr.sbin/perfused/msg.c \
src/usr.sbin/perfused/perfused.8 src/usr.sbin/perfused/perfused.c \
src/usr.sbin/perfused/perfused.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-08-26 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Aug 26 13:29:02 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_if.h perfuse_priv.h subr.c
src/usr.sbin/perfused: debug.c perfused.8 perfused.c

Log Message:
- open the file before doing fsync: glusterfs wants that.

- Automatically call fsync on close for files. If we just close, fsync
will come later and we will have to reopen

- Add a PND_DIRTY flag to keep track of files that really need a sync.
perfuse_node_fsync only calls the FUSE fsync method if there are data
to push.

- Add a PND_OPEN flag to keep track of open files. Checking non NULL
fh is not enough, as some filesystems will always set fh to 0.

- Add a sync diagnostic flag, to watch fsync and dirty flag activity.
Make the fh diagnostic flag more verbose

- Send the fh in setattr (it was hardcoded to 0)

I am now able to build libperfuse in a glusterfs mounted filesystem. Yeah!


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libperfuse/ops.c \
src/lib/libperfuse/perfuse_if.h src/lib/libperfuse/perfuse_priv.h \
src/lib/libperfuse/subr.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/perfused/debug.c \
src/usr.sbin/perfused/perfused.8 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-08-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Aug 27 09:58:17 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_if.h perfuse_priv.h
src/usr.sbin/perfused: msg.c perfused.8 perfused.c perfused.h

Log Message:
- if perfused is not already started (cannot connect to /dev/fuse),
FUSE filesystems will attempt to start it on their own, and will
communicate using a socketpair

- do not advertise NULL file handle as being valid when sending themback to the 
FUSE filesystem.

- unmount if we cannot talk to the FUSE process anymore

- set calling process gid properly

- debug message cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/ops.c \
src/lib/libperfuse/perfuse_if.h src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/perfused/msg.c \
src/usr.sbin/perfused/perfused.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/perfused/perfused.8 \
src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-08-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 28 03:46:21 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse.c

Log Message:
- set user/group ownership after object creation.

- enforce permissios checks. This needs to be  reviewed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-09-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Sep  1 14:57:24 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_if.h perfuse_priv.h subr.c
src/usr.sbin/perfused: msg.c perfused.c

Log Message:
Build fixes for LP64


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/perfuse_if.h \
src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/subr.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep  2 08:58:06 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
- only remove queued requests once they are executed, not when they
are set to be scheduled later
- remove an unused argument to make lint happy


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep  3 07:15:18 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_priv.h subr.c

Log Message:
- Postpone file close at reclaim time, since NetBSD sends fsync and
setattr(mtime, ctime) after close, while FUSE expects the file
to be open for these operations

- remove unused argument to node_mk_common()

- remove requeued requests when they are executed, not when they
are tagged for schedule

- try to make filehandle management simplier, by keeping track of only
one read and one write filehandle (the latter being really read/write).

- when CREATE is not available, we use the MKNOD/OPEN path. Fix a
bug here where we opened the parent directory instead of the node:
add the missing lookup of the mknod'ed node.

- lookup file we just created: glusterfs does not really see them
otherwise.

- open file when doing setattr(mtime, ctime) on non open files, as
some filesystems seems to require it.

- Do not flush pagecache for removed nodes

- Keep track of read/write operations in progress, and at reclaim
time, make sure they are over before closing and forgeting the file.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep  3 14:32:50 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Fix reference count bug introduced by previous commit


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Sep  5 06:49:13 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_priv.h

Log Message:
- correctly set flags for CREATE

- after a node is deleted, some operations should return ENOENT, some
should be ignored. Fixed it for ACCESS, SETATTR and GETATTR. Other
operation may also need a fix.

- At reclaim time, there is no need to wait for READDIR and READ
completion, since the caller will never close a file before getting
readir() and read() replies. Waiting for WRITE completion is still
mandatory, but we must ensure that no queued WRITE is awaiting to
be scheduled. Once the queue is drained, we must check that the
reclaim operation was not canceled by a new file LOOKUP.

- At reclaim time, fixed a mix up between read and write fh to close

- Fixed permission checks for RENAME (it tested the node itself
instead of the source)

- When seting file mode, only MKNOD needs the filetype (S_* fields).
It is probably a bug to set it for other operations.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/perfuse_priv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-05 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Sep  6 01:17:05 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_if.h perfuse_priv.h

Log Message:
build fixes for LP64


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/perfuse_priv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-09-05 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Sep  6 01:40:25 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_if.h perfuse_priv.h
src/usr.sbin/perfused: msg.c perfused.c

Log Message:
More LP64 fixes


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-09-06 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Sep  7 02:11:04 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_if.h
src/usr.sbin/perfused: msg.c perfused.c

Log Message:
- Do not checkfor peer credentials when perfused is autostarted and
therefore runs with filesystem privileges

- shut up warnings and debug messages when perfused is autostarted

- make perfused patch modifiable with CFLAGS for easier pkgsrc integration

- Fix build warnings


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Sep  7 16:58:14 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Mode argument must contain the file type (S_* items) for create and mknod


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep  9 09:12:35 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_priv.h

Log Message:
- call FSYNCDIR for directories
- directories can be open R/W (for FSYNCDIR)
- do not skip calls to FSYNC or FSYNCDIR if the filesystem returned ENOSYS:
it may change its mind, and it may also actually do something when retunring
ENOSYS
- When FSYNC and FSYNCDIR return ENOSYS, do not report it to kernel (silent
failure)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/perfuse_priv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-09-14 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Sep 15 01:51:44 UTC 2010

Modified Files:
src/lib/libperfuse: debug.c fuse.h ops.c perfuse.c perfuse_if.h
perfuse_priv.h
src/usr.sbin/perfused: debug.c msg.c perfused.c perfused.h

Log Message:
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to
assume datagram semantics: when using SOCK_STREAM, if perfused sends
frames faster than the filesystem consumes them, it will grab multiple
frames at once and discard anything beyond the first one. For now the
code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM
support will probably have to be removed for the sake of readability.

- Remeber to sync parent directories when moving a node

- In debug output, display the requeue type (readdir, write, etc...)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libperfuse/debug.c src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.14 -r1.15 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.9 -r1.10 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/perfused/debug.c \
src/usr.sbin/perfused/perfused.h
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/perfused

2010-09-19 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Sep 20 06:45:38 UTC 2010

Modified Files:
src/usr.sbin/perfused: msg.c perfused.c

Log Message:
- Add debug santity checks
- Do not request peer creds anymore once we have them.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-20 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Sep 20 07:00:22 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_priv.h subr.c

Log Message:
- performance improvement for read, readdir and write. Now we use
SOCK_DGRAM, we can send many pages at once without hitting any bug

- when creating a file, it is open for FUSE, but not for the kernel.
If the kernel does not do a subsequent open, we have a leak. We fight
against this by trying to close such file that the kernel left unopen
for some time.

- some code refactoring to make message exchange debug easier (more to come)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-09-23 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep 23 16:02:34 UTC 2010

Modified Files:
src/lib/libperfuse: debug.c ops.c perfuse.c perfuse_if.h perfuse_priv.h
subr.c
src/usr.sbin/perfused: perfused.c

Log Message:
== file close operations ==
- use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are
immediatly send to the filesystem, and we do not have anymore write
after inactive. As a consequence, we can close files at inactive
stage, and there is not any concern left with files opened at
create time. We also do not have anymore to open ourselves in readdir and
fsync.

- Fsync on close (inactive stage). That makes sure we will not need to
do these operations once the file is closed (FUSE want an open file).
short sircuit the request that come after the close, bu not fsinc'ing
closed files,

- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls

== Removed nodes ==
- more ENOENT retunred for operations on removed node (but there
are probably some still missing): getattr, ooen, setattr, fsync

- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid
races during UNLINK completion. Also set PND_REMOVED on node we overwirte
in rename

== Filehandle fixes ==
- queue open operation to avoid getting two fh for one file

- set FH in getattr, if the file is open

- Just requires a read FH for fsyncdir, as we always opendir in read
mode. Ok, this is misleading :-)

== Misc ==
- do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time

- short circuit nilpotent operations in setattr

- add a filename diagnostic flag to dump file names


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/debug.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/subr.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-09-29 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Sep 29 08:01:11 UTC 2010

Modified Files:
src/lib/libperfuse: debug.c ops.c perfuse.c perfuse_priv.h subr.c

Log Message:
= Open files =
- Restore open on our own in fsycn and readdir, as the node may not already
be open, and FUSE really wants it to be. No need to close immediatly, it
can be done at inactive time.

= Write operations =
- fix a nasty bug that corrupted files on write (written added twice)
- Keep track of file size in order to honour PUFFS_IO_APPEND

= many fixes in rename =
- handler overwritten nodes correctly
- wait for all operations on the node to drain before doing rename, as
filesystems may not cope with operations on a moving file.
- setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore
miss the inactive time for an overwritten node. This bounds us to give up
PUFFS_KFLAG_IAONDEMAND.

= Removed files =
- forbid most operations on a removed node, return ENOENT
- setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed
file reclaim

= Misc =
- Update outdated ARGSUSED for lint
- Fix a memory leak (puffs_pn_remove instead of puffs_pn_put)
- Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the
lookup code much simplier.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/debug.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-10-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Oct  3 05:46:48 UTC 2010

Modified Files:
src/lib/libperfuse: debug.c ops.c perfuse.c perfuse_priv.h subr.c

Log Message:
- Correctly handle rename whith overwritten destination
- Keep track of file name to avoid lookups when we can. This makes sure we
  do not have two cookies for the same inode, a situation that cause wreak
  havoc when we come to remove or rename a node.
- Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names
- In open, queue requests after checking for access, as there is no merit
  to queue a will-be-denied request while we can deny it immediatly
- request reclaim of removed nodes at inactive stage


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/debug.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-10-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct  4 03:56:24 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
- delete an obsoelte comment about inactive
- remove a test for getattr return field that was never filled
- correctly send filehandle and filehandle flags for getaattr


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-10-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct 11 01:08:27 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse_priv.h subr.c

Log Message:
- fix access control: pcn->pcn_cred is not user credentials
- Keep track of file generation
- remove size tracking in pnd_size, we have it in pn_va.va_size


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/perfused

2010-10-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct 11 01:12:26 UTC 2010

Modified Files:
src/usr.sbin/perfused: msg.c

Log Message:
Interm hack raising buffers for /dev/fuse socket used in the filesystem.
This works around read(2) system callsfailing with ENOBUFS.

This is a hack bedause there is no way to know that 4 * FUSE_BUFSIZE
will be enough to hold queued FUSE frames. It seems good enough at
mine.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/perfused/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2010-10-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct 11 01:52:05 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
FUSE filesystems' readlink returns a resolved link with a NUL trailing
character, and PUFFS do not want it. This fixes this bug, that returned
stat the informations for x instead of reporting ENOENT:
mkdir x && ln x z && stat -x z/whatever/you/want


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2010-10-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct 11 05:37:59 UTC 2010

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_if.h perfuse_priv.h subr.c
src/usr.sbin/perfused: msg.c perfused.c

Log Message:
Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libperfuse/perfuse_if.h \
src/lib/libperfuse/subr.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libpuffs

2011-04-19 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Apr 19 10:35:24 UTC 2011

Modified Files:
src/lib/libpuffs: puffs_ops.3

Log Message:
In node_lookup() ops, pcn->pcn_nameiop contains a NAMEI_* constant, not
PUFFSLOOKUP_*


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libpuffs/puffs_ops.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/perfused

2011-04-24 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Apr 25 04:30:59 UTC 2011

Modified Files:
src/usr.sbin/perfused: msg.c perfused.c

Log Message:
- fix warnings
- try to handle ENOBUFS in a nicer way
- use errx() for usage message, not err(), as we do not waht strerror(errno)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/perfused/msg.c
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-04-24 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Apr 25 04:54:53 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_priv.h subr.c

Log Message:
- Implement proper unprivilegied user permission verifications
Verification is now done in the lookup method, as it is the way to
go. Of course there are corner cases, such as the sticky bit which
need special handling in the remove method.

- Set full fsidx in vftstat method

- Do not pass O_APPEND to the filesystem. FUSE always sends the
write offset, so setting O_APPEND is useless. If the filesystem
uses it in an open(2) system call, it will even cause file
corruptions, since offsets given to pwrite(2) will be ignored.
This fix allows glusterfs to host a NetBSD ./build.sh -o build

- Do not use the FUSE access method, use getattr and check for
permission on our own. The problem is that a FUSE filesystem will
typically use the Linux-specific setfsuid() to perform access
control. If that is missing, any chack is likely to occur on
behalf of the user running the filesystem (typically root), causing
access method to return wrong information.

- When possible, avoid performing a getattr method call and use
cached value in puffs_node instead. We still retreive the latest
value by calling getattr when performing append write operation,
to minimize the chances that another writer appended since the
last time we did.

- Update puffs_node cached file size in write method

- Remove unused argument to perfuse_destroy_pn()


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.10 -r1.11 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2011-05-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May  2 14:00:09 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs pucdata.c

Log Message:
Add new PCI vendor Id for Sunix, and the corresponding device Id.


To generate a diff of this commit:
cvs rdiff -u -r1.1071 -r1.1072 src/sys/dev/pci/pcidevs
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/pucdata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2011-05-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May  2 14:06:50 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Don't conflict SUNIX new vendor Id with the previous one


To generate a diff of this commit:
cvs rdiff -u -r1.1072 -r1.1073 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2011-05-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May  2 14:23:25 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h pucdata.c

Log Message:
Add support for new SUNIX PCI seriel and/or parallel adapters, with new
SUNIX vendor Id 0x1fd4 and product Id 0x1999. Constants were taken from
Linux open source driver distributed by SUNIX.

The following models should be supported now:
5008 1 parallel port
5016 16 serial ports, only 8 supported right now (PUC_MAX_PORTS limit)
5027 1 serial port
5037 2 serial ports
5056 4 serial ports
5066 8 serial ports, this model is the only one that was actually tested.
5069 1 serial port and 1 parallel port
5079 2 serial ports and 1 parallel port
5099 4 serial ports and 1 parallel port


To generate a diff of this commit:
cvs rdiff -u -r1.1068 -r1.1069 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1067 -r1.1068 src/sys/dev/pci/pcidevs_data.h
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/pucdata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-05-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue May  3 13:14:10 UTC 2011

Modified Files:
src/lib/libperfuse: Makefile

Log Message:
Fix build (libperfuse is still not built by default, but time is coming)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libperfuse/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-05-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue May  3 13:16:47 UTC 2011

Modified Files:
src/lib/libpuffs: puffs.c
src/sys/fs/puffs: puffs_vnops.c

Log Message:
Call advlock method if supplied


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/lib/libpuffs/puffs.c
cvs rdiff -u -r1.150 -r1.151 src/sys/fs/puffs/puffs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-05-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue May  3 13:19:50 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Fixes for the advlock method. It can now sustain pkgsrc/devel/locktests
with glusterfs as backend


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/perfused

2011-05-06 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri May  6 13:45:35 UTC 2011

Modified Files:
src/usr.sbin/perfused: msg.c

Log Message:
Display actual error from FUSE on failures


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/perfused/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-05-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May  9 08:51:18 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi
src/distrib/sets/lists/man: mi
src/doc: CHANGES
src/lib: Makefile
src/lib/libperfuse: Makefile
src/usr.sbin: Makefile
src/usr.sbin/perfused: Makefile msg.c

Log Message:
Enable the build of perfused and libperfuse


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.119 -r1.120 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.936 -r1.937 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.581 -r1.582 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.29 -r1.30 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.111 -r1.112 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.1620 -r1.1621 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.168 -r1.169 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.1314 -r1.1315 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1544 -r1.1545 src/doc/CHANGES
cvs rdiff -u -r1.166 -r1.167 src/lib/Makefile
cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/Makefile
cvs rdiff -u -r1.255 -r1.256 src/usr.sbin/Makefile
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/perfused/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/perfused/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists

2011-05-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May  9 17:13:21 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi
src/distrib/sets/lists/man: mi

Log Message:
Attempt to fix build after perfuse addition (there is no MKPERFUSE)


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.120 -r1.121 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.113 -r1.114 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.937 -r1.938 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.582 -r1.583 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.1622 -r1.1623 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.169 -r1.170 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.1315 -r1.1316 src/distrib/sets/lists/man/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/ufs/ufs

2011-05-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue May 10 08:29:32 UTC 2011

Modified Files:
src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Fix filesystem root leaked lock when using UFS_EXTATTR_AUTOSTART.
This way, statvfs(2) calls obtained by df(1) or umount(8) will no
longer sleep forever in the kernel to acquire the lock.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/ufs/ufs/ufs_extattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-05-12 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu May 12 10:32:41 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse.c

Log Message:
Mont FUSE filesystem with proprer source and fstype so that df and mount
display something that makes sense


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-05-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed May 18 15:22:54 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse_if.h

Log Message:
typos


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/perfuse_if.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-05-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed May 18 15:25:19 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse.c

Log Message:
Set buffer size as big in nomal mode as we do in debug mode, when
perfused stays in foreground. The difference is a mistake and was not
intended.

There is still a bug ready to bite here, since SOCK_STREAM is not reliable.
We just hope that buffers are big enough to hold all packets, but if they
are overflown, we loose a packet and a file operation gets stuck.

We really nee SOCk_SEQPACKET here, but unfortunately it is very broken at
that time.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-05-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed May 18 15:28:12 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
- Proper permission checks when doing directory traversal. e.g.: run
rm dir/file while dir was never looked up since the mount. In that
situation, we get lookup with pcn_nameiop NAMEI_DELETE for dir before
we get it for file. But for dir we are just looking for PUFFS_VEXEC.
This is solved by honouring NAMEI_ISLASTCN, which is set for the last
element only

- do not send O_EXCL to FUSE as documentation forbids it.

- fix warning


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/ufs/ufs

2011-05-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu May 19 03:25:11 UTC 2011

Modified Files:
src/sys/ufs/ufs: ufs_inode.c

Log Message:
Call ufs_extattr_vnode_inactive before UFS_WAPBL_BEGIN, as the latter will
leave the vnode locked, and ufs_extattr_vnode_inactive does lock/unlock


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/ufs/ufs/ufs_inode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2011-05-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun May 29 03:32:46 UTC 2011

Modified Files:
src/sys/kern: uipc_domain.c uipc_proto.c uipc_usrreq.c

Log Message:
Add SOCK_SEQPACKET to PL_LOCAL sockets. Based on patch from Jesse Off,
submitted 8 years ago:
http://mail-index.netbsd.org/tech-kern/2003/04/14/0006.html


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/kern/uipc_domain.c
cvs rdiff -u -r1.21 -r1.22 src/sys/kern/uipc_proto.c
cvs rdiff -u -r1.133 -r1.134 src/sys/kern/uipc_usrreq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2011-05-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun May 29 03:34:33 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
Add SOCK_SEQPACKET for local sockets


To generate a diff of this commit:
cvs rdiff -u -r1.1549 -r1.1550 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin

2011-05-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun May 29 04:45:08 UTC 2011

Modified Files:
src/usr.bin/netstat: unix.c
src/usr.bin/sockstat: sockstat.c

Log Message:
Display SOCK_SEQPACKET local sockets in sockstat and netstat


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/netstat/unix.c
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/sockstat/sockstat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2011-05-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun May 29 04:51:15 UTC 2011

Modified Files:
src/share/man/man4: unix.4

Log Message:
Document that SOCK_SEQPACKET is supported


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/unix.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/sockstat

2011-05-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun May 29 04:54:45 UTC 2011

Modified Files:
src/usr.bin/sockstat: sockstat.1

Log Message:
Document that localsocket may be of type SOCK_SEQPACKET


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/sockstat/sockstat.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-05-30 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May 30 14:50:08 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_if.h perfuse_priv.h
src/usr.sbin/perfused: msg.c perfused.c perfused.h

Log Message:
Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs
where the FUSE filesyste replied to an operation and got an ENOBUFS it did
not handle.

We now are also able to cleanly unmount


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.17 -r1.18 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/perfused/msg.c \
src/usr.sbin/perfused/perfused.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/perfused/perfused.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-06-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun  1 07:57:24 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Remove outdated comment about a fixed bug


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-06-01 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun  1 15:54:10 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Fix race conditions between write and getattr/setattr, which lead to
inconsitencies between kernel and filesystem idea of file size during
writes with IO_APPEND.

At mine, this resulted in a configure script producing config.status
with ": clr\n" lines stripped (not 100% reproductible, but always this
specific string. That is of little interest except for my own future
reference).

When a write is in progress, getattr/setattr get/set the maximum size
among kernel idea (grown by write) and filesystem idea (not yet grown).


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/ufs/ufs

2011-06-15 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun 15 12:54:32 UTC 2011

Modified Files:
src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Improve UFS1 extended attributes usability
- autocreate attribute backing file for new attributes
- autoload attributes when issuing extattrctl start
- when autoloading attributes, do not display garbage warning when looking
up entries that got ENOENT


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/ufs/ufs/ufs_extattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-06-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Jun 17 14:23:52 UTC 2011

Modified Files:
src/include: mntopts.h
src/lib/libc/sys: mount.2
src/sbin/mount: mount.8
src/sbin/mount_ffs: mount_ffs.c
src/share/man/man4: options.4
src/sys/kern: vfs_syscalls.c
src/sys/sys: extattr.h fstypes.h statvfs.h
src/sys/ufs/ffs: ffs_extern.h ffs_vfsops.c
src/sys/ufs/ufs: extattr.h ufs_extattr.c
src/usr.sbin/extattrctl: extattrctl.8

Log Message:
Add mount -o extattr option to enable extended attributs (corrently only
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/mntopts.h
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/sys/mount.2
cvs rdiff -u -r1.70 -r1.71 src/sbin/mount/mount.8
cvs rdiff -u -r1.25 -r1.26 src/sbin/mount_ffs/mount_ffs.c
cvs rdiff -u -r1.406 -r1.407 src/share/man/man4/options.4
cvs rdiff -u -r1.429 -r1.430 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.4 -r1.5 src/sys/sys/extattr.h
cvs rdiff -u -r1.28 -r1.29 src/sys/sys/fstypes.h
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/statvfs.h
cvs rdiff -u -r1.77 -r1.78 src/sys/ufs/ffs/ffs_extern.h
cvs rdiff -u -r1.267 -r1.268 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.8 -r1.9 src/sys/ufs/ufs/extattr.h
cvs rdiff -u -r1.31 -r1.32 src/sys/ufs/ufs/ufs_extattr.c
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/extattrctl/extattrctl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libpuffs

2011-06-24 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Jun 24 16:59:29 UTC 2011

Modified Files:
src/lib/libpuffs: null.c

Log Message:
Commit fix for misc/45029.
Approved by pooka@


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libpuffs/null.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libpuffs

2011-06-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jun 27 12:06:20 UTC 2011

Modified Files:
src/lib/libpuffs: null.c

Log Message:
>From Evgeniy Ivanov: puffs_node_readdir() should set eofflag to one, when
end-of-directory is reached.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libpuffs/null.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-06-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jun 27 16:34:48 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_vnops.c
src/sys/ufs/ufs: ufs_extattr.c
src/usr.bin/extattr: getextattr.c

Log Message:
Implement extended attribute listing for UFS1.

Modify lsextattr(8) so that it does not expect each attribute name to be
prefixed by its length. This enable extattr_list_(file|link|fd) to
return a buffer matching its documentation. This also makes the interface
similar to what Linux and FUSE do, which is nice for interoperability.

Note that since we had no EA implementation supporting listing, we do
not break anything.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/ufs/ffs/ffs_vnops.c
cvs rdiff -u -r1.32 -r1.33 src/sys/ufs/ufs/ufs_extattr.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/extattr/getextattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-06-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jun 27 16:39:44 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/sys: Makefile.inc
src/sys/kern: vfs_xattr.c
src/sys/sys: Makefile

Log Message:
Fix multiple non compliances in our Linux-like extattr API, and make it
public so that it can be used.


To generate a diff of this commit:
cvs rdiff -u -r1.1633 -r1.1634 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.206 -r1.207 src/lib/libc/sys/Makefile.inc
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/vfs_xattr.c
cvs rdiff -u -r1.132 -r1.133 src/sys/sys/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/extattr

2011-06-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun 28 07:24:15 UTC 2011

Modified Files:
src/usr.bin/extattr: getextattr.c

Log Message:
Fix previous broken commit for extended attribute listing.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/extattr/getextattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2011-06-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun 28 07:50:03 UTC 2011

Modified Files:
src/sys/kern: vfs_xattr.c

Log Message:
Improve a bit listxattr(2). It attemps to list both system and user
extended attributes, and it faled if calling user did not have privilege
for reading system EA. Now we just lise user EA and skip system EA in
reading them is not allowed.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/vfs_xattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-06-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun 28 16:19:16 UTC 2011

Modified Files:
src/lib/libperfuse: Makefile fuse.h ops.c perfuse.c perfuse_priv.h
subr.c

Log Message:
Add support for extended attributes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libperfuse/Makefile
cvs rdiff -u -r1.3 -r1.4 src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.30 -r1.31 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2011-06-29 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun 29 08:01:14 UTC 2011

Modified Files:
src/sys/kern: vfs_xattr.c

Log Message:
Fix bug introduced in previous commuit: Do not vrele() a vnode we did not
obtained.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/vfs_xattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-07-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jul  4 07:54:38 UTC 2011

Modified Files:
src/include/rpc: xdr.h
src/lib/libc/include: namespace.h
src/lib/libc/rpc: Makefile.inc
Added Files:
src/lib/libc/rpc: xdr_sizeof.c

Log Message:
Import xdr_sizeof() from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/include/rpc/xdr.h
cvs rdiff -u -r1.148 -r1.149 src/lib/libc/include/namespace.h
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/rpc/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/rpc/xdr_sizeof.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-07-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jul  4 08:07:32 UTC 2011

Modified Files:
src/lib/libp2k: p2k.c
src/lib/libperfuse: ops.c perfuse_priv.h
src/lib/libpuffs: dispatcher.c puffs.h puffs_ops.3
src/sys/fs/puffs: puffs_msgif.h puffs_vnops.c
src/sys/kern: vfs_xattr.c vnode_if.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: extattr.h vnode_if.h
src/sys/ufs/ufs: ufs_extattr.c
src/usr.bin/extattr: getextattr.c

Log Message:
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libp2k/p2k.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.35 -r1.36 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.117 -r1.118 src/lib/libpuffs/puffs.h
cvs rdiff -u -r1.28 -r1.29 src/lib/libpuffs/puffs_ops.3
cvs rdiff -u -r1.75 -r1.76 src/sys/fs/puffs/puffs_msgif.h
cvs rdiff -u -r1.153 -r1.154 src/sys/fs/puffs/puffs_vnops.c
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/vfs_xattr.c
cvs rdiff -u -r1.86 -r1.87 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/extattr.h
cvs rdiff -u -r1.80 -r1.81 src/sys/sys/vnode_if.h
cvs rdiff -u -r1.33 -r1.34 src/sys/ufs/ufs/ufs_extattr.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/extattr/getextattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libc/rpc

2011-07-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jul  4 08:19:51 UTC 2011

Modified Files:
src/lib/libc/rpc: xdr.3

Log Message:
Document newly imported xdr_sizeof()


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/rpc/xdr.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-07-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jul  4 12:05:02 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/rpc: Makefile.inc

Log Message:
Add documentation link xdr_sizeof(3) -> xdr(3)


To generate a diff of this commit:
cvs rdiff -u -r1.1637 -r1.1638 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/rpc/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/ufs/ufs

2011-07-07 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jul  7 14:56:45 UTC 2011

Modified Files:
src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Fix locking protocol to avoid a panic on extattrctl stop and on umount.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/ufs/ufs/ufs_extattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/extattr

2011-07-14 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jul 14 15:25:27 UTC 2011

Modified Files:
src/usr.bin/extattr: getextattr.1 getextattr.c

Log Message:
Improve extended attribute commands:
- allow namespace to be omitted when using a namespace-prefixed attribute
  name, a la Linux.
- Improve hexdump for getextattr -x
- Add more display option for binary attributes, using vis(3)
- Add a -i option to setextattr to get the attribute value from file, so
  that we can set binary values


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/extattr/getextattr.1
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/extattr/getextattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-07-14 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jul 14 15:37:32 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c perfuse_priv.h

Log Message:
FUSE struct dirent's off is not the offset in the buffer, it is an opaque
cookie that the filesystem passes us, and that we need to send back on
the next READDIR. Most filesystem just ignore the value and send the
next chunk of buffer, but not all of them. Fixing this allows glusterfs
distributed volume to work.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.20 -r1.21 src/lib/libperfuse/perfuse_priv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-07-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jul 18 02:14:01 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
ftruncate(2) cause a SETATTR with only va_size set, and some filesystems
(e.g.: glusterfs) will do a custom handling in such a situation. This
breaks because libpuffs folds a metadata (va_atime and va_mtime) update
in each SETATTR. We try to identify SETATTR caused by ftruncate(2) and
remove va_atime and va_mtime in such situation.

This fixes a bug with glusterfs, where parts of a file downloaded by
FTP was filled with zeros because of a ftruncate(2) sent out of order
with write(2) requests. glusterfs behavior depends on the undocumented
FUSE rule that ftruncate(2) will only set va_size in SETATTR.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-07-19 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jul 19 07:29:39 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Make sure libperfuse still builds on netbsd-5.1


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2011-07-22 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Jul 22 12:46:19 UTC 2011

Modified Files:
src/sys/kern: vfs_xattr.c

Log Message:
Add tracepoints for extended attribute names and values, so that
we can figure what is going on when looking at a ktrace output.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/vfs_xattr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-08-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  2 14:53:38 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c
src/usr.sbin/perfused: msg.c

Log Message:
Fix creds passed to FUSE when requests are done on behalf of the kernel.
We previously sent uid/gid set to -1, we now set it to 0.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/perfused/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-08-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  2 16:57:17 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Do not reject reads on directory, it raises a useless EBADFD while the
thing can just fail silently.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-08-02 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug  3 04:11:17 UTC 2011

Modified Files:
src/bin/cp: cp.c utils.c
src/bin/mv: mv.c
src/distrib/sets/lists/comp: mi
src/lib/libc/gen: Makefile.inc extattr.3 extattr.c
src/lib/libc/sys: extattr_get_file.2
src/sys/sys: extattr.h

Log Message:
Make cp -p and mv preverve extended attributes, and complain if they cannot.

Also introduce library functions for copying extended attributes from one
file to another:
- extattr_copy_file, extattr_copy_fd, extattr_copy_link, with FreeBSD style,
  where a namespace is to be supplied
- cpxattr, fcpxattr, lcpxattr, with Linux style, where all namespaces
  accessible to the caller are copied, and the others are silently ignored.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/bin/cp/cp.c
cvs rdiff -u -r1.39 -r1.40 src/bin/cp/utils.c
cvs rdiff -u -r1.41 -r1.42 src/bin/mv/mv.c
cvs rdiff -u -r1.1651 -r1.1652 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.178 -r1.179 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/gen/extattr.3
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/extattr.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/extattr_get_file.2
cvs rdiff -u -r1.6 -r1.7 src/sys/sys/extattr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/cp

2011-08-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug  3 12:55:03 UTC 2011

Modified Files:
src/bin/cp: cp.1

Log Message:
iExplain what happens to extended attriutes when -p is used.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/bin/cp/cp.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Aug  8 12:08:54 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi
src/include: unistd.h
src/lib/libc/sys: Makefile.inc link.2
src/sys/kern: kern_exec.c syscalls.master vfs_syscalls.c
src/sys/sys: fcntl.h stat.h

Log Message:
First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.


To generate a diff of this commit:
cvs rdiff -u -r1.1658 -r1.1659 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.126 -r1.127 src/include/unistd.h
cvs rdiff -u -r1.207 -r1.208 src/lib/libc/sys/Makefile.inc
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/link.2
cvs rdiff -u -r1.316 -r1.317 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.250 -r1.251 src/sys/kern/syscalls.master
cvs rdiff -u -r1.432 -r1.433 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/fcntl.h
cvs rdiff -u -r1.60 -r1.61 src/sys/sys/stat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Aug  8 12:17:29 UTC 2011

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/rump/include/rump: rump_syscalls.h rumpvnode_if.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: syscall.h syscallargs.h vnode_if.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.256 -r1.257 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.247 -r1.248 src/sys/kern/syscalls.c
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.73 -r1.74 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.243 -r1.244 src/sys/sys/syscall.h
cvs rdiff -u -r1.226 -r1.227 src/sys/sys/syscallargs.h
cvs rdiff -u -r1.82 -r1.83 src/sys/sys/vnode_if.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  9 04:19:18 UTC 2011

Modified Files:
src/sys/sys: fcntl.h

Log Message:
improve comment about AT_* defines: they are not only used by linkat(2)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/sys/fcntl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  9 06:58:33 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse.c

Log Message:
Remove PUFFS_KFLAG_WTCACHE, which caused data corruption and slowdown


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/perfused

2011-08-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  9 07:00:13 UTC 2011

Modified Files:
src/usr.sbin/perfused: msg.c

Log Message:
Fix warning


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/perfused/msg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-08-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  9 09:06:52 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
Fix uninitiaized variable usage (never though lint would miss that when
used by return statement) that caused unprivilegied user to fail on
unlink(2) and rename(2) operations.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/lib/libperfuse/ops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2011-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug 16 07:55:29 UTC 2011

Modified Files:
src/include: limits.h

Log Message:
Add macros to hide OpenGroup extened API set 2 from GNU configure. This
is a temporary  workaround until the implementation is completed.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/include/limits.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-08-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug 17 07:22:35 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libc/sys: Makefile.inc utimes.2
src/sys/kern: syscalls.master vfs_syscalls.c

Log Message:
Add futimens(2) and part of utimnsat(2)


To generate a diff of this commit:
cvs rdiff -u -r1.1662 -r1.1663 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.208 -r1.209 src/lib/libc/sys/Makefile.inc
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/utimes.2
cvs rdiff -u -r1.251 -r1.252 src/sys/kern/syscalls.master
cvs rdiff -u -r1.433 -r1.434 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2011-08-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug 17 07:25:30 UTC 2011

Modified Files:
src/sys/sys: stat.h

Log Message:
Add futimens(2) and part utimensat(2)
(missing bit from previous commit)


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/sys/stat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2011-08-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug 17 07:26:17 UTC 2011

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.248 -r1.249 src/sys/kern/syscalls.c
cvs rdiff -u -r1.244 -r1.245 src/sys/sys/syscall.h
cvs rdiff -u -r1.227 -r1.228 src/sys/sys/syscallargs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2011-08-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Aug 17 09:29:59 UTC 2011

Modified Files:
src/sys/kern: vfs_syscalls.c
src/sys/sys: vfs_syscalls.h

Log Message:
Missing bit in previous commit: do_sys_utimens prototype in the right
place.


To generate a diff of this commit:
cvs rdiff -u -r1.435 -r1.436 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/vfs_syscalls.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/cp

2011-08-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Aug 18 08:11:59 UTC 2011

Modified Files:
src/bin/cp: cp.c

Log Message:
Remove warning about system extended attributes that cannot be copied, since
it will always be displayed when an unprivilegied user moves files across
filesystems (mv(1) uses cp -p in that case). After all, there is no warning
that we loose a setuid bit during a move or copy, so this makes sense.

Fixes bin/45259


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/bin/cp/cp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2011-08-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Aug 18 19:34:48 UTC 2011

Modified Files:
src/sys/kern: vfs_syscalls.c

Log Message:
Fix utimes/futimes after utimensat/futimens addition


To generate a diff of this commit:
cvs rdiff -u -r1.436 -r1.437 src/sys/kern/vfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/puffs

2011-08-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Aug 29 04:12:46 UTC 2011

Modified Files:
src/sys/fs/puffs: puffs_node.c puffs_sys.h puffs_vnops.c

Log Message:
Add a mutex for operations that touch size (setattr, getattr, write, fsync).

This is required to avoid data corruption bugs, where a getattr slices
itself within a setattr operation, and sets the size to the stall value
it got from the filesystem. That value is smaller than the one set by
setattr, and the call to uvm_vnp_setsize() trigged a spurious truncate.
The result is a chunk of zeroed data in the file.

Such a situation can easily happen when the ioflush thread issue a
VOP_FSYNC/puffs_vnop_sync/flushvncache/dosetattrn while andother process
do a sys_stat/VOP_GETATTR/puffs_vnop_getattr.

This mutex on size operation can be removed the day we decide VOP_GETATTR
has to operated on a locked vnode, since the other operations that touch
size already require that.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/fs/puffs/puffs_node.c
cvs rdiff -u -r1.77 -r1.78 src/sys/fs/puffs/puffs_sys.h
cvs rdiff -u -r1.154 -r1.155 src/sys/fs/puffs/puffs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-09-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep  9 15:35:22 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse.c

Log Message:
Make sure perfused remains locked in memory, otherwise we can get
deadlocks in low memory situations, where ioflush waits for perfused
to fsync vnodes, and perfused waits for memory to be freed.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2011-09-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep  9 15:45:28 UTC 2011

Modified Files:
src/lib/libperfuse: ops.c perfuse_if.h perfuse_priv.h
src/usr.sbin/perfused: Makefile perfused.c

Log Message:
Serialize access to file size. We already have such a thing in the
kernel, where it fixes race for PUFFS filesystems, but we need it again
in perfused since FUSE filesystems are allowed to reorder requests.

The huge issue is in the asyncrhonous SETATTR sent by fsync. It is
followed by a syncrhnous FSYNC, so if the filesystem does not reorder
requests, once the FSYNC returns, we are confident the SETATTR is done.
But since FUSE can reorder, we need to implement sync in perfused.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.21 -r1.22 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/perfused/Makefile
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/perfused/perfused.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/puffs

2011-09-21 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Sep 21 15:36:33 UTC 2011

Modified Files:
src/sys/fs/puffs: puffs_vfsops.c puffs_vnops.c

Log Message:
Make sure ioflush does not sleep in PUFFS code path, waiting for a mutex,
a memory allocation, or a response from the filesystem.

This avoids deadlocks in the following situations:
1) when memory is low: ioflush waits the fileystem, the fielsystem waits
   for memory
2) when the filesystem does not respond (e.g.: network outage ona
   distributed filesystem)


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.155 -r1.156 src/sys/fs/puffs/puffs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2011-09-22 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep 23 01:57:32 UTC 2011

Modified Files:
src/sys/fs/puffs: puffs_vnops.c
src/sys/miscfs/syncfs: sync_subr.c

Log Message:
Fix the build that was broken by struct lwp *updateproc reference in
RUMP-visible code. Instead of checking that updateproc (aka ioflush,
aka syncer) will not sleep in PUFFS code, I check for any kernel thread:
after all none of them are designed to hang awaiting for a remote filesystem
operation to complete.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/fs/puffs/puffs_vnops.c
cvs rdiff -u -r1.46 -r1.47 src/sys/miscfs/syncfs/sync_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/puffs

2011-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Oct 17 23:54:01 UTC 2011

Modified Files:
src/sys/fs/puffs: puffs_vnops.c

Log Message:
Roll back the change that forced kernel threads to not sleep in PUFFS.
The change does not make consensus, since only pagedaemon should need it.
Other threads will tolerate sleeping, and problems here are only symptoms
that something is going wrong in memory management. The cause, not the
symptoms, need to be fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/fs/puffs/puffs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/puffs

2011-10-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Oct 18 15:39:09 UTC 2011

Modified Files:
src/sys/fs/puffs: puffs_msgif.c puffs_node.c puffs_vfsops.c
puffs_vnops.c

Log Message:
Make sure pagedaemon does not sleep for memory in puffs_vnop_sleep.
Add KASSERT on any sleeping memory allocation to check it cannot happen again.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.20 -r1.21 src/sys/fs/puffs/puffs_node.c
cvs rdiff -u -r1.98 -r1.99 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.158 -r1.159 src/sys/fs/puffs/puffs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-10-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Oct 18 15:47:32 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse.c

Log Message:
mlockall is not necessary after all, once we have fixed a kernel bug involving
agedaemon sleeping form memory


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/fs/puffs

2011-10-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Oct 19 01:39:29 UTC 2011

Modified Files:
src/sys/fs/puffs: puffs_msgif.c puffs_node.c puffs_vfsops.c
puffs_vnops.c

Log Message:
Remove #ifdef DIAGNOSTIC guards around KASSERT, as the macro contains them


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.21 -r1.22 src/sys/fs/puffs/puffs_node.c
cvs rdiff -u -r1.99 -r1.100 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.159 -r1.160 src/sys/fs/puffs/puffs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libperfuse

2011-10-22 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Oct 23 05:01:00 UTC 2011

Modified Files:
src/lib/libperfuse: perfuse.c

Log Message:
perfuse memory usage can grow quite large when using a lot of vnodes,
and the amount of data memory involved is not easy to forcast. We therefore
raise the limit to the maximum.

Patch from Manuel Bouyer. It helps completing a cvs update on a glusterfs
colume.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libperfuse/perfuse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   3   >