aboutsummaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-05 07:41:50 +0200
committerMax Kellermann <max@duempel.org>2014-10-05 07:41:50 +0200
commitb1a252a64d39d17618d2d00ac341684b6f290ef6 (patch)
tree10eff9b871e5bf9a6a7b8934ada5cf8a23920218 /src/storage
parentfb90b64bac49d6efadc2db021cf0fbf65c9d66a6 (diff)
downloadmpd-b1a252a64d39d17618d2d00ac341684b6f290ef6.tar.gz
mpd-b1a252a64d39d17618d2d00ac341684b6f290ef6.tar.xz
mpd-b1a252a64d39d17618d2d00ac341684b6f290ef6.zip
lib/nfs/Base: kludge to reduce number of NFS mounts
Creating a NfsStorage sets its own export_name as the "base". Now NfsFileReader can use this information to derive the export_name to be mounted, instead of guessing. This solves the "too many connection" problem on the NFS server while updating the database.
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/plugins/NfsStorage.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx
index 1c712f68f..40625fc9a 100644
--- a/src/storage/plugins/NfsStorage.cxx
+++ b/src/storage/plugins/NfsStorage.cxx
@@ -23,6 +23,7 @@
#include "storage/StorageInterface.hxx"
#include "storage/FileInfo.hxx"
#include "lib/nfs/Domain.hxx"
+#include "lib/nfs/Base.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Error.hxx"
#include "thread/Mutex.hxx"
@@ -256,6 +257,8 @@ CreateNfsStorageURI(const char *base, Error &error)
return nullptr;
}
+ nfs_set_base(server.c_str(), mount);
+
return new NfsStorage(base, ctx);
}