diff options
-rw-r--r-- | netfs/daemon/daemonDirectory.h | 2 | ||||
-rw-r--r-- | netfs/daemon/daemonVolume.cpp | 4 | ||||
-rw-r--r-- | netfs/fuse/fuseApp.h | 1 | ||||
-rw-r--r-- | netfs/fuse/fuseConfig.ice | 3 | ||||
-rw-r--r-- | netfs/fuse/fuseDirs.cpp | 5 | ||||
-rw-r--r-- | netfs/ice/directory.ice | 2 | ||||
-rw-r--r-- | netfs/unittests/Jamfile.jam | 1 | ||||
-rw-r--r-- | netfs/unittests/altFuse.xml | 16 | ||||
-rw-r--r-- | netfs/unittests/testCore.cpp | 8 |
9 files changed, 9 insertions, 33 deletions
diff --git a/netfs/daemon/daemonDirectory.h b/netfs/daemon/daemonDirectory.h index b4da8f2..d0f4e9d 100644 --- a/netfs/daemon/daemonDirectory.h +++ b/netfs/daemon/daemonDirectory.h @@ -5,7 +5,7 @@ #include <dirent.h> #include <typeConverter.h> -class DirectoryServer : public NetFS::DirectoryV2, EntryTypeConverter { +class DirectoryServer : public NetFS::Directory, EntryTypeConverter { public: DirectoryServer(DIR * od, EntryTypeConverter &); diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp index 6a3c7fe..096d748 100644 --- a/netfs/daemon/daemonVolume.cpp +++ b/netfs/daemon/daemonVolume.cpp @@ -270,8 +270,8 @@ VolumeServer::opendir(const NetFS::ReqEnv re, std::string path, const Ice::Curre if (!od) { throw NetFS::SystemError(errno); } - return Ice::uncheckedCast<NetFS::DirectoryPrx>(ice.adapter->addFacetWithUUID( - std::make_shared<DirectoryServer>(od, converter), "v02")); + return Ice::uncheckedCast<NetFS::DirectoryPrx>(ice.adapter->addWithUUID( + std::make_shared<DirectoryServer>(od, converter))); } void diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h index d2b645e..ca3e631 100644 --- a/netfs/fuse/fuseApp.h +++ b/netfs/fuse/fuseApp.h @@ -23,7 +23,6 @@ namespace NetFS { OpenDir(DirectoryPrxPtr remote, std::string path); DirectoryPrxPtr remote; - DirectoryV2PrxPtr remoteV2; const std::string path; }; typedef std::shared_ptr<OpenDir> OpenDirPtr; diff --git a/netfs/fuse/fuseConfig.ice b/netfs/fuse/fuseConfig.ice index e425c21..52116ea 100644 --- a/netfs/fuse/fuseConfig.ice +++ b/netfs/fuse/fuseConfig.ice @@ -20,9 +20,6 @@ module NetFS { ["slicer:name:async"] bool Async = false; - - ["slicer:name:listdir"] - bool ListDir = true; }; ["slicer:key:name","slicer:value:resource","slicer:item:resource"] diff --git a/netfs/fuse/fuseDirs.cpp b/netfs/fuse/fuseDirs.cpp index 490a4bb..d2597f8 100644 --- a/netfs/fuse/fuseDirs.cpp +++ b/netfs/fuse/fuseDirs.cpp @@ -5,7 +5,6 @@ namespace NetFS { FuseApp::OpenDir::OpenDir(DirectoryPrxPtr r, std::string p) : remote(std::move(r)), - remoteV2(remote->ice_getFacet() >= "v02" ? Ice::uncheckedCast<DirectoryV2Prx>(remote) : nullptr), path(std::move(p)) { } @@ -52,8 +51,8 @@ FuseApp::readdir(const char * p, void * buf, fuse_fill_dir_t filler, off_t, stru auto od = getProxy<OpenDirPtr>(fi->fh); std::string path(p); auto expiry = time(nullptr) + 2; - if (flags == FUSE_READDIR_PLUS && fcr->ListDir && od->remoteV2) { - for (const auto & e : od->remoteV2->listdir()) { + if (flags == FUSE_READDIR_PLUS) { + for (const auto & e : od->remote->listdir()) { filler(buf, e.first.c_str(), nullptr, 0, FUSE_FILL_DIR_PLUS); std::string k(path + e.first); statCache.remove(k); diff --git a/netfs/ice/directory.ice b/netfs/ice/directory.ice index 3718f69..4424d3f 100644 --- a/netfs/ice/directory.ice +++ b/netfs/ice/directory.ice @@ -9,8 +9,6 @@ module NetFS { void close() throws AuthError, SystemError; idempotent NameList readdir() throws AuthError, SystemError; - }; - interface DirectoryV2 extends Directory { idempotent DirectoryContents listdir() throws AuthError, SystemError; }; }; diff --git a/netfs/unittests/Jamfile.jam b/netfs/unittests/Jamfile.jam index 20c15c7..f27a3e5 100644 --- a/netfs/unittests/Jamfile.jam +++ b/netfs/unittests/Jamfile.jam @@ -36,7 +36,6 @@ lib testMocks : run testCore.cpp : -- : altDaemon.xml - altFuse.xml defaultDaemon.xml defaultFuse.xml secureDaemon.xml diff --git a/netfs/unittests/altFuse.xml b/netfs/unittests/altFuse.xml deleted file mode 100644 index 22b791a..0000000 --- a/netfs/unittests/altFuse.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="ascii"?> -<config> - <resources> - <resource> - <name>testvol</name> - <resource> - <export>testvol</export> - <listdir>false</listdir> - <endpoints> - <endpoint>overridden</endpoint> - </endpoints> - </resource> - </resource> - </resources> -</config> - diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp index f0f7980..0f87b02 100644 --- a/netfs/unittests/testCore.cpp +++ b/netfs/unittests/testCore.cpp @@ -87,7 +87,7 @@ class Core { class AltCore : public Core { public: - AltCore() : Core("altDaemon.xml", "altFuse.xml") { } + AltCore() : Core("altDaemon.xml", "defaultFuse.xml") { } }; BOOST_FIXTURE_TEST_SUITE( NetfsCore, Core ); @@ -518,7 +518,7 @@ BOOST_AUTO_TEST_CASE( noListDir ) BOOST_REQUIRE_EQUAL(fuse->opendir("/test", &fi), 0); NetFS::NameList nl; - BOOST_REQUIRE_EQUAL(fuse->readdir("/test", &nl, &nameListAdd, 0, &fi, FUSE_READDIR_PLUS), 0); + BOOST_REQUIRE_EQUAL(fuse->readdir("/test", &nl, &nameListAdd, 0, &fi, (fuse_readdir_flags)0), 0); BOOST_REQUIRE_EQUAL(nl.size(), 2); std::sort(nl.begin(), nl.end()); BOOST_REQUIRE_EQUAL(nl[0], "."); @@ -528,7 +528,7 @@ BOOST_AUTO_TEST_CASE( noListDir ) BOOST_REQUIRE_EQUAL(fuse->mkdir("/test/sub", 0700), 0); BOOST_REQUIRE_EQUAL(fuse->opendir("/test", &fi), 0); - BOOST_REQUIRE_EQUAL(fuse->readdir("/test", &nl, &nameListAdd, 0, &fi, FUSE_READDIR_PLUS), 0); + BOOST_REQUIRE_EQUAL(fuse->readdir("/test", &nl, &nameListAdd, 0, &fi, (fuse_readdir_flags)0), 0); BOOST_REQUIRE_EQUAL(nl.size(), 3); std::sort(nl.begin(), nl.end()); BOOST_REQUIRE_EQUAL(nl[0], "."); @@ -537,7 +537,7 @@ BOOST_AUTO_TEST_CASE( noListDir ) BOOST_REQUIRE_EQUAL(fuse->releasedir("/test", &fi), 0); nl.clear(); - BOOST_REQUIRE_EQUAL(fuse->readdir("/test", &nl, &nameListAdd, 0, &fi, FUSE_READDIR_PLUS), -EBADF); + BOOST_REQUIRE_EQUAL(fuse->readdir("/test", &nl, &nameListAdd, 0, &fi, (fuse_readdir_flags)0), -EBADF); BOOST_REQUIRE_EQUAL(fuse->releasedir("/test", &fi), -EBADF); BOOST_REQUIRE_EQUAL(fuse->rmdir("/test"), -ENOTEMPTY); |