summaryrefslogtreecommitdiff
path: root/netfs/fuse.h
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-11-12 00:27:39 +0000
committerrandomdan <randomdan@localhost>2010-11-12 00:27:39 +0000
commitc5686d6fd71a8d760d782079dd4234a065e2b43a (patch)
treecac564d890f5f60be156117d930054413adf74db /netfs/fuse.h
parentReopen files and directories on reauthentication (diff)
downloadnetfs-c5686d6fd71a8d760d782079dd4234a065e2b43a.tar.bz2
netfs-c5686d6fd71a8d760d782079dd4234a065e2b43a.tar.xz
netfs-c5686d6fd71a8d760d782079dd4234a065e2b43a.zip
Add locking for safe multi-threaded use in client
Fix bug with symlink name Fix bug with stating symlinks
Diffstat (limited to 'netfs/fuse.h')
-rw-r--r--netfs/fuse.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/netfs/fuse.h b/netfs/fuse.h
index b16a67c..707e54a 100644
--- a/netfs/fuse.h
+++ b/netfs/fuse.h
@@ -1,6 +1,7 @@
#ifndef FUSE_H
#define FUSE_H
+#include <boost/thread/mutex.hpp>
#include <Ice/Ice.h>
#include "netfsComms.h"
#include "fuseapp.h"
@@ -8,6 +9,8 @@
#include "entCache.h"
#include "intrusivePtrBase.h"
+#define LOCK boost::unique_lock<boost::mutex> _lck(lock)
+
class NetFS : public FuseAppBase
{
private:
@@ -44,6 +47,7 @@ class NetFS : public FuseAppBase
void * init (struct fuse_conn_info * info);
int opt_parse(void *, const char * arg, int key, struct fuse_args *);
void connect();
+ void connect_nl();
// misc
int access(const char * p, int a);
int getattr(const char * p, struct stat * s);
@@ -75,7 +79,9 @@ class NetFS : public FuseAppBase
// stuff
int onError(const std::exception & err) throw();
int getNextFileID();
+ Ice::Int getRemoteIDforFile(int localID) const;
int getNextDirID();
+ Ice::Int getRemoteIDforDir(int localID) const;
ReqEnv reqEnv();
@@ -83,6 +89,7 @@ class NetFS : public FuseAppBase
char ** _argv;
Ice::CommunicatorPtr ic;
FuseConfigPtr fc;
+ mutable boost::mutex lock;
NetFSComms::FileSystemPrx filesystem;
NetFSComms::ServicePrx service;