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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user