summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Siegl <stesie@brokenpipe.de>2005-04-02 16:24:08 +0000
committerStefan Siegl <stesie@brokenpipe.de>2005-04-02 16:24:08 +0000
commitbf4e16145cc469a2eee8a4e7af5df865a08dccbf (patch)
tree3876d22c256432cc9b19563ab788b5f9862317ff
parentc84da29110ef8bc3be491e1118b58611c0126692 (diff)
In fuse_sync_filesystem emit debug messages if a netnode has a node
attached to it.
-rw-r--r--netnode.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/netnode.c b/netnode.c
index bbb857b10..21de2010b 100644
--- a/netnode.c
+++ b/netnode.c
@@ -137,7 +137,7 @@ fuse_sync_filesystem(void)
int i;
error_t err = 0;
- if(! fuse_ops->fsync)
+ if(! FUSE_OP_HAVE(fsync))
return err; /* success */
/* make sure, nobody tries to confuse us */
@@ -147,19 +147,25 @@ fuse_sync_filesystem(void)
{
struct hash_element *he = &fuse_netnodes[i];
- if(he)
+ if(he->nn)
do
- if(he->nn->may_need_sync)
- {
- err = -(fuse_ops ?
- fuse_ops->fsync(he->nn->path, 0, &he->nn->info) :
- fuse_ops_compat->fsync(he->nn->path, 0));
-
- if(err)
- goto out;
- else
- he->nn->may_need_sync = 0;
- }
+ {
+ if(he->nn->may_need_sync)
+ {
+ err = -(fuse_ops ?
+ fuse_ops->fsync(he->nn->path, 0, &he->nn->info) :
+ fuse_ops_compat->fsync(he->nn->path, 0));
+
+ if(err)
+ goto out;
+ else
+ he->nn->may_need_sync = 0;
+ }
+
+ if(he->nn->node)
+ DEBUG("netnode-scan", "netnode=%s has attached node\n",
+ he->nn->path);
+ }
while((he = he->next));
}