summaryrefslogtreecommitdiff
path: root/lib/libperfuse/perfuse.c
diff options
context:
space:
mode:
authormanu <manu@NetBSD.org>2010-09-23 16:02:34 +0000
committermanu <manu@NetBSD.org>2010-09-23 16:02:34 +0000
commitbcf6f2f32ad4eef651cc2c5fee7725276659eea4 (patch)
treed3e8e5a731a72b7550254bed4a88ab0743847a37 /lib/libperfuse/perfuse.c
parent11fdf81f840d5f20cb44904fa821c9dcf75435a9 (diff)
== 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
Diffstat (limited to 'lib/libperfuse/perfuse.c')
-rw-r--r--lib/libperfuse/perfuse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libperfuse/perfuse.c b/lib/libperfuse/perfuse.c
index 9a85676cf1f..9755dc1bf13 100644
--- a/lib/libperfuse/perfuse.c
+++ b/lib/libperfuse/perfuse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perfuse.c,v 1.7 2010/09/20 07:00:21 manu Exp $ */
+/* $NetBSD: perfuse.c,v 1.8 2010/09/23 16:02:34 manu Exp $ */
/*-
* Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -406,7 +406,8 @@ perfuse_init(pc, pmi)
PUFFSOP_SET(pops, perfuse, node, read);
PUFFSOP_SET(pops, perfuse, node, write);
- puffs_flags = PUFFS_FLAG_BUILDPATH | PUFFS_FLAG_HASHPATH;
+ puffs_flags = PUFFS_FLAG_BUILDPATH | PUFFS_FLAG_HASHPATH |
+ PUFFS_KFLAG_WTCACHE | PUFFS_KFLAG_IAONDEMAND;
if (perfuse_diagflags & PDF_PUFFS)
puffs_flags |= PUFFS_FLAG_OPDUMP;