Commit Graph

19 Commits

Author SHA1 Message Date
manu 26381d518d 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
2011-05-30 14:50:08 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
njoly 1199515b5b Fix prologue macros order. 2011-05-10 12:16:18 +00:00
manu 73963ae9de Enable the build of perfused and libperfuse 2011-05-09 08:51:08 +00:00
manu dfdc5ae18f Display actual error from FUSE on failures 2011-05-06 13:45:35 +00:00
manu 33c1bbe9da - fix warnings
- try to handle ENOBUFS in a nicer way
- use errx() for usage message, not err(), as we do not waht strerror(errno)
2011-04-25 04:30:59 +00:00
manu f4f951a0c1 Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine 2010-10-11 05:37:58 +00:00
manu 160a586559 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.
2010-10-11 01:12:25 +00:00
manu bcf6f2f32a == 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
2010-09-23 16:02:34 +00:00
manu 7ba588b3fb - Add debug santity checks
- Do not request peer creds anymore once we have them.
2010-09-20 06:45:38 +00:00
manu e9a8a6acc0 - 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...)
2010-09-15 01:51:43 +00:00
manu 1e672db8d2 - 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
2010-09-07 02:11:04 +00:00
wiz 95b8a1f9e8 Fix some typos in messages. Make usage match manpage. 2010-09-06 13:15:29 +00:00
manu 5536686b23 More LP64 fixes 2010-09-06 01:40:24 +00:00
manu ef7e1877ae Build fixes for LP64 2010-09-01 14:57:24 +00:00
wiz cd9eb5b6d8 Various fixes and improvements. 2010-08-27 18:12:51 +00:00
manu 1326029781 - 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
2010-08-27 09:58:17 +00:00
manu 516b1c9016 - 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!
2010-08-26 13:29:01 +00:00
manu a18d4c5a69 perfused(8) creates a /dev/fuse socket and performs PUFFS to FUSE relaying.
This is still a work in progress.
2010-08-25 07:18:01 +00:00