CVS commit: src/lib/libperfuse

2019-02-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Feb  9 02:22:45 UTC 2019

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

Log Message:
Fix directory filehandle usage with libufse. Fix lookup count

libfuse does not use filehandle the same way for directories and other
objects. As a result, filehandles obtained by OPENDIR should not be
sent on non-directory related operations like READ/WRITE/GETATTR...

While there, fix the lookup count sent to the FORGET operation, which
led to leaked nodes.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 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

2019-01-23 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Wed Jan 23 19:43:49 UTC 2019

Modified Files:
src/lib/libperfuse: libperfuse.3

Log Message:
It's section 3 page, not section 2.  While here, xref puffs(3) in the
SEE ALSO section too.


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

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



CVS commit: src/lib/libperfuse

2018-11-15 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Nov 16 02:39:02 UTC 2018

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

Log Message:
Use reclaim2 to fix reclaim/lookup race conditions

The PUFFS reclaim operation had a race condition with lookups: we could
be asked to lookup a node, then to reclaim it before lookup completion.
At lookup completion, we would then create a leaked node.

Enter the PUFFS reclaim2 operation, which features a nlookup argument.
That let us count how many lookups are pending and avoid the above
described scenario. It also makes the codes simplier.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libperfuse/debug.c
cvs rdiff -u -r1.84 -r1.85 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.40 -r1.41 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.36 -r1.37 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

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 19 01:30:35 UTC 2016

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

Log Message:
make the env stuff visible.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.21 -r1.22 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

2016-10-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Oct 18 22:26:13 UTC 2016

Modified Files:
src/lib/libperfuse: libperfuse.3

Log Message:
Sort sections. new sentence, new line. Whitespace.


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

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



CVS commit: src/lib/libperfuse

2016-10-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 18 17:56:31 UTC 2016

Modified Files:
src/lib/libperfuse: fuse.h perfuse.c perfuse_if.h

Log Message:
make this compile again, and simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.38 -r1.39 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.20 -r1.21 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

2016-01-22 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Jan 22 22:25:50 UTC 2016

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

Log Message:
Needs sys/cdefs.h for __BEGIN_DECLS and sys/types.h for mode_t.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libperfuse/perfuse.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

2015-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jun 19 17:33:21 UTC 2015

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

Log Message:
Deal with limits properly.
Don't print strerror() 2ice.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 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

2015-06-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun  3 14:07:06 UTC 2015

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

Log Message:
Fix dot-lookup when readdir does not provide inodes

Some filesystems do not provide inode numbers through readdir (FUSE mounts
without -o use_ino). We therefore have to lookup each directory entry to
get the missing numbers.

dot and double-dot are exceptions, as we already know the values. Moreover,
the lookup code does not expect to get requests for dot and will abort
perfused(8) when it gets some. In order to fix that, we just check for
dot and double-dot special case and use the known values instead of sending
a lookup.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 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

2015-01-13 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jan 13 16:51:30 UTC 2015

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

Log Message:
Fix atime update

FUSE filesystems assume that SETATTR with atime is the result of utiimes()
being called. As a result, atime and mtime will be updated.  This happens
with MooseFS and glusterFS. atime is supposed to be updated by the
filesystem itself when it gets read operations.

We fix the problem in SETATTR operations by
1) do not create a mtime update when we have an atime update (and vice
   versa), just fill the fields to avoid the filesystem restting the
   missing field to Epoch, but do not pretend we want to update it.
2) If the change is limited to atime, iscard it, as updates should be
   done by READ operations
3) Kernel part of PUFFS has been fixed to make sure reads on empty file
   are sent to the filesystem:
   http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html

Thanks to Tom Ivar Helbekkmo for reporting this issue.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 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

2014-11-11 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Nov 12 05:08:44 UTC 2014

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

Log Message:
Allow setxattr to be called with a NULL value, instead of crashing.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 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

2014-11-04 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Nov  4 09:17:32 UTC 2014

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

Log Message:
Restore build with -DDEBUG, and avoid a spurious diagnostic error with -DDEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 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

2014-10-31 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 31 15:20:08 UTC 2014

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

Log Message:
Avoid deadlocks on write errors

On write errors, we failed to dequeue some operations, leading to
rare but unpleasant deadlocks


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 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

2014-10-31 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 31 15:12:15 UTC 2014

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

Log Message:
FUSE fallocate support
There seems to be no fdiscard FUSE operation at the moment, hence that one
is left unused.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.77 -r1.78 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.34 -r1.35 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.35 -r1.36 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

2014-10-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Oct 28 16:54:11 UTC 2014

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

Log Message:
Fix invalid free in deletextattr FUSE handler

Do not free FUSE message on error as it was not allocated.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 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

2014-10-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Oct 11 04:19:38 UTC 2014

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

Log Message:
Report allocated bytes on FS correctly, instead of using file size
(which is wrong for sparse files)


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 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

2014-09-29 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Sep 30 00:06:19 UTC 2014

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

Log Message:
Do not trust the filesystem's readdir to give us nul-terminated file names


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 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

2014-09-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep 11 04:05:52 UTC 2014

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

Log Message:
Avoid a file resize serialization deadlock when writing with
PUFFS_IO_APPEND flag. The symptom was a hang when appending to
a file with a null size.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 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

2014-09-05 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Sep  5 15:20:17 UTC 2014

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

Log Message:
rmdir dir/.. must return an error. Use ENOTEMPRY like FFS does.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 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

2014-09-03 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Wed Sep  3 23:59:58 UTC 2014

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

Log Message:
Fix build failure on amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.34 -r1.35 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

2014-09-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Sep  3 16:01:45 UTC 2014

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

Log Message:
Improve POSIX compliance of FUSE filesystems through PERUSE
- access denied is EPERM and not EACCES
- access to file owned by someone else in a sticy-bit directory should
  be allowed for the sticy-bit directory owner
- setting sticky-bit on a non directory should produce EFTYPE
- implement PATHCONF method as much as we can.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.33 -r1.34 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

2014-08-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Aug 29 04:58:40 UTC 2014

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

Log Message:
We used to remove the trailing zeros in FUSE readlink replies, but
it seems it does not always happen. Just remove them if present.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 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

2014-08-19 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug 19 15:29:14 UTC 2014

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

Log Message:
Remove usless warning that happens often with direct IO


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 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

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:31:16 UTC 2014

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

Log Message:
Removed unimplemented mmap and seek method. seek's declaration caused
seek request to be passed backand forth between kernel and userland
while we did nothing about them.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.33 -r1.34 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

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:28:43 UTC 2014

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

Log Message:
Use just introduced open2 PUFFS method and its PUFFS_OPEN_IO_DIRECT oflag
to implement FUSE's OPEN_IO_DIRECT, by which the filesystem tells the kernel
that read/write to the file should bypass the page cache.

Remove a warning about read beyond EOF which will now normally appear when
page cache is bypassed.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.32 -r1.33 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

2014-08-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Aug 10 03:22:33 UTC 2014

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

Log Message:
- Make sure non root users cannot access system namespace attributes
- honour namespace specification when listing attributes
- Also fix message memory leak introduced by previous commit


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.19 -r1.20 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

2014-08-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug  9 19:06:50 UTC 2014

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

Log Message:
getextattr: fix attribute length being reported to caller. If buffer
is too small, return ENORANGE.

Caught by glusterFS regression tests


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 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

2014-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug  9 03:17:11 UTC 2014

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

Log Message:
Send GETATTR to filesystem for removed but still-open files, as
it is the expected behavior (bug caught by glusterFS regression tests)


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 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

2014-01-06 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Jan  6 08:56:34 UTC 2014

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

Log Message:
For filesystems mounted without -o use_ino, readdir is not
able to fetch inode number. We perfom an addtional lookup
on each file to get it.

In that case, do not lookup .. from root, as it breaks
out of the filesystem and hits NULL pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 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

2013-07-19 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Jul 19 07:32:35 UTC 2013

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

Log Message:
Catch open without FREAD|FWRITE (it should not happen)


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 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

2013-07-18 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jul 18 09:01:20 UTC 2013

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

Log Message:
One more explicit error log, and two bug fixes
1) with recent FUSE, when lookup returns a null ino, it means ENOENT
2) odd corner case that caused a bug on dd if=test of=test conv=notrunc
   This caused the file to be open first ro, then rw. A logic bug in
   perfuse_node_open caused it to skip the second operation, whereas
   it should open for writing, and store the write FH without touching
   the read FH.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 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

2012-11-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Nov  3 15:43:20 UTC 2012

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

Log Message:
When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 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

2012-09-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Sep 10 13:56:18 UTC 2012

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

Log Message:
Turn a fatal error into a warning.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 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

2012-06-28 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Thu Jun 28 13:53:13 UTC 2012

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

Log Message:
Fix the build by adding (unused) flags argument to perfuse_node_setattr_ttl


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.29 -r1.30 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

2012-06-13 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Jun 14 05:58:22 UTC 2012

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

Log Message:
Fix memory leak when we discard a voided setattr operation


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 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

2012-06-12 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Jun 13 01:45:56 UTC 2012

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

Log Message:
Fix memory leak on setattr


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 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

2012-05-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May 28 02:13:33 UTC 2012

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

Log Message:
Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt
to set atime and mtime at the same time. Detect that situation just
like we detected ftruncate(2) and wipe atime and mtime if it occurs.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 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

2012-04-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Apr  8 15:13:06 UTC 2012

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

Log Message:
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.

PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.27 -r1.28 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

2012-03-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Mar  8 14:58:58 UTC 2012

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

Log Message:
The kernel can lookup the same node multiple time and will reclaim as
many times it looked up. All reclaims but the last one must be ignored,
otherwise we discard a node which will still get operations. We therefore
have to keep track of lookup/reclaim count and hnour reclaims only when
the count reaches zero.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.15 -r1.16 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

2012-01-29 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jan 29 09:01:31 UTC 2012

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

Log Message:
Fix 32-bit build


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libperfuse/debug.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-12-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Dec 29 04:25:49 UTC 2011

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

Log Message:
Redo previous;  remove all the casts I added, and use PRI* macros instead.
(by popular demand - makes sense, too)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/debug.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-12-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Dec 29 01:40:32 UTC 2011

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

Log Message:
Cast time_t to intmax_t for printf purposes, and format with %j.  Fixes
build on amd64 and probably i386 as well.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/debug.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-12-15 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Dec 16 05:34:54 UTC 2011

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

Log Message:
Rework puffs_framebuf management toremove leaks and abusive reuses. On
exchange error, the puffs_framebuf is now freed immediatly, before
requeuing outstanding requests.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 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-11-27 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Nov 28 05:33:33 UTC 2011

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

Log Message:
- Add missing ENOENT or ESTALL when accessing deleted node
- Fix a warning, fix style (80 chars for a line)


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 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-11-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 17 02:28:21 UTC 2011

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

Log Message:
Copy node expiration date before comparing it, otherwise the comparison
does not work (no idea why) and cached node is never used.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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-11-15 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Wed Nov 16 04:52:40 UTC 2011

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

Log Message:
Correctly pass the advlock owner id from kernel to filesystem, instead of
using process PID.

Allow the usage of the read filehandle for advlock, in order to support
shared locks on read-only files


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 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-11-10 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Nov 10 16:21:10 UTC 2011

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

Log Message:
Return EISDIR for read/write to directories. NetBSD directory read should
instead return a getent(2) output, but is that really used?


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 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-10-29 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sun Oct 30 05:11:37 UTC 2011

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

Log Message:
- Fix the confusion between fileno (opaque FUSE reference) and inode
  numbers. fileno must be used when exchanging FUSE messages.
- Do not use kernel name cache anymore, as it caused modification from
  other machines to be invisible.
- Honour name and attribute cache directive from FUSE filesystem


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libperfuse/perfuse.c \
src/lib/libperfuse/perfuse_priv.h
cvs rdiff -u -r1.16 -r1.17 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.13 -r1.14 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

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.



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/lib/libperfuse

2011-09-10 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Sep 10 10:06:10 UTC 2011

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

Log Message:
Avoid comparison between signed and unsigned integer expressions by
casting the offset to a unsigned type. This fixes the NetBSD/i386
and hopefully the NetBSD/amd64 build.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 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-09-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep  9 22:51:44 UTC 2011

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

Log Message:
make this build on amd64 and remove redundant and unused code.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.19 -r1.20 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-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/lib/libperfuse

2011-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 14 08:19:04 UTC 2011

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

Log Message:
simplify and eliminate non literal string formats.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/Makefile
cvs rdiff -u -r1.14 -r1.15 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-08-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 13 23:12:15 UTC 2011

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

Log Message:
- fix warn/err confusiog
- fix debugging printf
- add func arguments to simple formats


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libperfuse/Makefile
cvs rdiff -u -r1.38 -r1.39 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.12 -r1.13 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

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/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/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/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/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-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-06-28 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Jun 28 20:28:49 UTC 2011

Modified Files:
src/lib/libperfuse: Makefile

Log Message:
Don't hardcode the libpuffs path to /usr/src/lib/libpuffs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 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/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/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/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-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/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: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-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-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed May 11 14:52:48 UTC 2011

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

Log Message:
Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/fuse.h
cvs rdiff -u -r1.25 -r1.26 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.10 -r1.11 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-10 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue May 10 12:14:37 UTC 2011

Modified Files:
src/lib/libperfuse: libperfuse.3

Log Message:
Small typo in macro (Xd -> Xr).


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

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/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/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/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/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/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-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-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-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/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/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-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/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-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-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-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-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Sep  1 13:04:11 UTC 2010

Modified Files:
src/lib/libperfuse: libperfuse.3

Log Message:
Some fixes. Comment out ERRORS section until it has content.


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

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/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.