Commit 76cf67e6 authored by Christian Mohrbacher's avatar Christian Mohrbacher

updated to release 6.12

parent 82d984ab
......@@ -20,6 +20,8 @@ PACKAGEDIR="/tmp/beegfs_packages-${DATE}/"
DO_CLEAN=true
LANG=en # make sure language is english, as we grep for certain strings
# print usage information
print_usage()
{
......
......@@ -4,13 +4,27 @@ set -e
CFLAGS="-D__KERNEL__ $LINUXINCLUDE $KBUILD_CFLAGS $KBUILD_CPPFLAGS -DKBUILD_BASENAME=\"beegfs\""
_generate_includes() {
for i in "$@"; do
echo "#include <$i>"
done
}
_marker_if_compiles() {
local marker=$1
shift
if $CC $CFLAGS -x c -o /dev/null -c - 2>/dev/null
then
echo -D$marker
fi
}
_check_struct_field_input() {
local field=$1
shift 1
for i in "$@"; do
echo "#include <$i>"
done
_generate_includes "$@"
cat <<EOF
void want_symbol(void) {
......@@ -25,19 +39,76 @@ check_struct_field() {
local marker=$2
shift 2
if _check_struct_field_input "$field" "$@" | $CC $CFLAGS -x c -o /dev/null -c - 2>/dev/null
then
echo -D$marker
fi
_check_struct_field_input "$field" "$@" | _marker_if_compiles "$marker"
}
cd $srctree
_check_function_input() {
local name=$1
local signature=$2
shift 2
_generate_includes "$@"
cat <<EOF
void want_fn(void) {
char predicate[
2 * __builtin_types_compatible_p(__typeof($name), $signature) - 1
];
}
EOF
}
check_function() {
local name=$1
local signature=$2
local marker=$3
shift 3
_check_function_input "$name" "$signature" "$@" | _marker_if_compiles "$marker"
}
check_header() {
local header=$1
local marker=$2
shift 2
_generate_includes "$header" | _marker_if_compiles "$marker"
}
check_struct_field \
address_space_operations::launder_page \
KERNEL_HAS_LAUNDER_PAGE \
linux/fs.h
check_function \
generic_readlink "int (struct dentry *, char __user *, int)" \
KERNEL_HAS_GENERIC_READLINK \
linux/fs.h
check_header \
linux/sched/signal.h \
KERNEL_HAS_SCHED_SIG_H
# older kernels (RHEL5) don't have linux/cred.h
check_header \
linux/cred.h \
KERNEL_HAS_CRED_H
# cryptohash does not include linux/types.h, so the type comparison fails
check_function \
half_md4_transform "__u32 (__u32[4], __u32 const in[8])" \
KERNEL_HAS_HALF_MD4_TRANSFORM \
linux/types.h linux/cryptohash.h
check_function \
vfs_getattr "int (const struct path *, struct kstat *, u32, unsigned int)" \
KERNEL_HAS_STATX \
linux/fs.h
check_function \
kref_read "unsigned int (const struct kref*)" \
KERNEL_HAS_KREF_READ \
linux/kref.h
# we have to communicate with the calling makefile somehow. since we can't really use the return
# code of this script, we'll echo a special string at the end of our output for the caller to
# detect and remove again.
......
......@@ -176,6 +176,6 @@ $(src)/common/net/sock/ibv/IBVSocket.o: CC+=-include $(OFED_INCLUDE_PATH)/linux/
$(src)/common/net/sock/ibv/IBVBuffer.o: CC+=-include $(OFED_INCLUDE_PATH)/linux/compat-2.6.h
endif
$(src)/common/net/sock/ibv/IBVSocket.o: CC+=-I$(OFED_INCLUDE_PATH)
$(src)/common/net/sock/ibv/IBVBuffer.o: CC+=-I$(OFED_INCLUDE_PATH)
$(src)/common/net/sock/ibv/IBVSocket.o: CC+=-I$(OFED_INCLUDE_PATH) -I$(OFED_INCLUDE_PATH)/uapi
$(src)/common/net/sock/ibv/IBVBuffer.o: CC+=-I$(OFED_INCLUDE_PATH) -I$(OFED_INCLUDE_PATH)/uapi
endif
......@@ -324,6 +324,13 @@ bool __App_initDataObjects(App* this, MountConfig* mountConfig)
if(strlen(interfacesFilename) &&
!Config_loadStringListFile(interfacesFilename, &this->allowedInterfaces) )
{
// if loading of file failed, we need to set LogType Syslog as fallback here, because
// helperd can't be used for error logging. helperd would need a valid NicList to connect,
// but that's initialized later.
// Of course, using printk could be another option here, but the code calling this function
// proceeds with some more log messages, that should be logged to log file if possible, but
// need to be redirected to syslog in this case here as well
Config_setLogTypeNum(this->cfg, LOGTYPE_Syslog);
Logger_logErrFormatted(this->logger, logContext,
"Unable to load configured interfaces file: %s", interfacesFilename);
return false;
......@@ -334,6 +341,13 @@ bool __App_initDataObjects(App* this, MountConfig* mountConfig)
if(strlen(preferredMetaFile) &&
!Config_loadUInt16ListFile(this->cfg, preferredMetaFile, &this->preferredMetaNodes) )
{
// if loading of file failed, we need to set LogType Syslog as fallback here, because
// helperd can't be used for error logging. helperd would need a valid NicList to connect,
// but that's initialized later.
// Of course, using printk could be another option here, but the code calling this function
// proceeds with some more log messages, that should be logged to log file if possible, but
// need to be redirected to syslog in this case here as well
Config_setLogTypeNum(this->cfg, LOGTYPE_Syslog);
Logger_logErrFormatted(this->logger, logContext,
"Unable to load configured preferred meta nodes file: %s", preferredMetaFile);
return false;
......@@ -343,6 +357,13 @@ bool __App_initDataObjects(App* this, MountConfig* mountConfig)
if(strlen(preferredStorageFile) &&
!Config_loadUInt16ListFile(this->cfg, preferredStorageFile, &this->preferredStorageTargets) )
{
// if loading of file failed, we need to set LogType Syslog as fallback here, because
// helperd can't be used for error logging. helperd would need a valid NicList to connect,
// but that's initialized later.
// Of course, using printk could be another option here, but the code calling this function
// proceeds with some more log messages, that should be logged to log file if possible, but
// need to be redirected to syslog in this case here as well
Config_setLogTypeNum(this->cfg, LOGTYPE_Syslog);
Logger_logErrFormatted(this->logger, logContext,
"Unable to load configured preferred storage nodes file: %s", preferredStorageFile);
return false;
......@@ -443,7 +464,9 @@ bool __App_initInodeOperations(App* this)
this->fileInodeOps->permission = FhgfsOps_permission;
this->fileInodeOps->setattr = FhgfsOps_setattr;
#ifdef KERNEL_HAS_GENERIC_READLINK
this->symlinkInodeOps->readlink = generic_readlink; // default is fine for us currently
#endif
#ifdef KERNEL_HAS_GET_LINK
this->symlinkInodeOps->get_link = FhgfsOps_get_link;
#else
......
......@@ -60,6 +60,7 @@ const char* Config_logTypeNumToStr(LogType logType);
static inline char* Config_getCfgFile(Config* this);
static inline int Config_getLogLevel(Config* this);
static inline LogType Config_getLogTypeNum(Config* this);
static inline void Config_setLogTypeNum(Config* this, LogType logType);
static inline bool Config_getLogClientID(Config* this);
static inline char* Config_getLogHelperdIP(Config* this);
static inline bool Config_getConnUseSDP(Config* this);
......@@ -256,6 +257,11 @@ LogType Config_getLogTypeNum(Config* this)
return this->logTypeNum;
}
void Config_setLogTypeNum(Config* this, LogType logType)
{
this->logTypeNum = logType;
}
bool Config_getLogClientID(Config* this)
{
return this->logClientID;
......
......@@ -16,9 +16,16 @@
#include <stdarg.h>
#include <linux/types.h>
#include <linux/stddef.h>
#ifdef KERNEL_HAS_CRED_H
#include <linux/cred.h>
#endif
//#include <linux/compiler.h>
#include <asm/div64.h>
#ifdef KERNEL_HAS_SCHED_SIG_H
#include <linux/sched/signal.h>
#endif
#include <common/FhgfsTypes.h>
#include <os/OsDeps.h>
......
......@@ -110,6 +110,71 @@ uint32_t HashTk_HsiehHash32(const char* data, int len)
return hash;
}
/* half_md4_transform and macros taken from lib/halfmd4.c */
#ifndef KERNEL_HAS_HALF_MD4_TRANSFORM
/* F, G and H are basic MD4 functions: selection, majority, parity */
#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
#define G(x, y, z) (((x) & (y)) + (((x) ^ (y)) & (z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
/*
* The generic round function. The application is so specific that
* we don't bother protecting all the arguments with parens, as is generally
* good macro practice, in favor of extra legibility.
* Rotation is separate from addition to prevent recomputation
*/
#define ROUND(f, a, b, c, d, x, s) \
(a += f(b, c, d) + x, a = rol32(a, s))
#define K1 0
#define K2 013240474631UL
#define K3 015666365641UL
/*
* Basic cut-down MD4 transform. Returns only 32 bits of result.
*/
static __u32 half_md4_transform(__u32 buf[4], __u32 const in[8])
{
__u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
/* Round 1 */
ROUND(F, a, b, c, d, in[0] + K1, 3);
ROUND(F, d, a, b, c, in[1] + K1, 7);
ROUND(F, c, d, a, b, in[2] + K1, 11);
ROUND(F, b, c, d, a, in[3] + K1, 19);
ROUND(F, a, b, c, d, in[4] + K1, 3);
ROUND(F, d, a, b, c, in[5] + K1, 7);
ROUND(F, c, d, a, b, in[6] + K1, 11);
ROUND(F, b, c, d, a, in[7] + K1, 19);
/* Round 2 */
ROUND(G, a, b, c, d, in[1] + K2, 3);
ROUND(G, d, a, b, c, in[3] + K2, 5);
ROUND(G, c, d, a, b, in[5] + K2, 9);
ROUND(G, b, c, d, a, in[7] + K2, 13);
ROUND(G, a, b, c, d, in[0] + K2, 3);
ROUND(G, d, a, b, c, in[2] + K2, 5);
ROUND(G, c, d, a, b, in[4] + K2, 9);
ROUND(G, b, c, d, a, in[6] + K2, 13);
/* Round 3 */
ROUND(H, a, b, c, d, in[3] + K3, 3);
ROUND(H, d, a, b, c, in[7] + K3, 9);
ROUND(H, c, d, a, b, in[2] + K3, 11);
ROUND(H, b, c, d, a, in[6] + K3, 15);
ROUND(H, a, b, c, d, in[1] + K3, 3);
ROUND(H, d, a, b, c, in[5] + K3, 9);
ROUND(H, c, d, a, b, in[0] + K3, 11);
ROUND(H, b, c, d, a, in[4] + K3, 15);
buf[0] += a;
buf[1] += b;
buf[2] += c;
buf[3] += d;
return buf[1]; /* "most hashed" word */
}
#endif
/**
* Do the halfMD4 hash computation.
* Note: OutBuf must be an array of size HashTk_HALFMD4_OUT_BUF_SIZE
......
......@@ -359,7 +359,7 @@ FhgfsOpsErr __MessagingTk_requestResponseNodeRetry(App* app, RequestResponseNode
// check target state
if(rrNode->targetStates)
if (rrNode->peer.isMirrorGroup && rrNode->targetStates)
{
CombinedTargetState state;
bool getStateRes = TargetStateStore_getState(rrNode->targetStates, nodeID.value,
......
......@@ -79,18 +79,7 @@ int FhgfsOps_revalidateIntent(struct dentry* dentry, unsigned flags)
FhgfsOpsHelper_logOp(Log_SPAM, app, dentry, inode, logContext);
if(!inode || !parentInode || is_bad_inode(inode) )
{
if(inode && S_ISDIR(inode->i_mode) )
{
if(have_submounts(dentry) )
goto cleanup_put_parent;
shrink_dcache_parent(dentry);
}
d_drop(dentry);
goto cleanup_put_parent;
}
// active dentry => remote-stat and local-compare
......@@ -132,8 +121,6 @@ int __FhgfsOps_revalidateIntent(struct dentry* parentDentry, struct dentry* dent
FhgfsInode* fhgfsInode = BEEGFS_INODE(inode);
bool cacheValid = FhgfsInode_isCacheValid(fhgfsInode, inode->i_mode, cfg);
int isValid = 0; // quasi-boolean (return value)
bool needDrop = false;
FhgfsIsizeHints iSizeHints;
......@@ -142,10 +129,7 @@ int __FhgfsOps_revalidateIntent(struct dentry* parentDentry, struct dentry* dent
if (cacheValid)
{
isValid = 1;
return isValid;
}
return 1;
if(IS_ROOT(dentry) )
fhgfsStatPtr = NULL;
......@@ -181,10 +165,7 @@ int __FhgfsOps_revalidateIntent(struct dentry* parentDentry, struct dentry* dent
FhgfsInode_entryInfoReadUnlock(parentFhgfsInode); // UNLOCK parentInfo
if (unlikely(remotingRes != FhgfsOpsErr_SUCCESS) )
{
needDrop = true;
goto out;
}
return 0;
if (outInfo.revalidateRes != FhgfsOpsErr_SUCCESS)
{
......@@ -192,8 +173,7 @@ int __FhgfsOps_revalidateIntent(struct dentry* parentDentry, struct dentry* dent
Logger_logErrFormatted(log, logContext, "Unexpected revalidate info missing: %s",
entryInfo->fileName);
needDrop = true;
goto out;
return 0;
}
// check the stat result here and set fhgfsStatPtr accordingly
......@@ -209,21 +189,11 @@ int __FhgfsOps_revalidateIntent(struct dentry* parentDentry, struct dentry* dent
entryInfo->fileName);
// now its getting difficult as there is an unexpected error
needDrop = true;
goto out;
return 0;
}
}
if (!__FhgfsOps_refreshInode(app, inode, fhgfsStatPtr, &iSizeHints) )
isValid = 1;
else
isValid = 0;
out:
if (needDrop)
d_drop(dentry);
return isValid;
return !__FhgfsOps_refreshInode(app, inode, fhgfsStatPtr, &iSizeHints);
}
/**
......
......@@ -32,13 +32,14 @@ static struct kmem_cache* FhgfsInodeCache = NULL;
static void FhgfsOps_newAttrToInode(struct iattr* iAttr, struct inode* outInode);
static __always_inline int maybeRefreshInode(struct inode* inode, bool whenCacheInvalid,
bool withFileSize)
bool withFileSize, bool force)
{
App* app = FhgfsOps_getApp(inode->i_sb);
Config* cfg = app->cfg;
if(unlikely(!FhgfsOps_getIsRootInited(inode->i_sb) && inode->i_ino == BEEGFS_INODE_ROOT_INO)
|| (!FhgfsInode_isCacheValid(BEEGFS_INODE(inode), inode->i_mode, cfg) && whenCacheInvalid) )
|| (!FhgfsInode_isCacheValid(BEEGFS_INODE(inode), inode->i_mode, cfg) && whenCacheInvalid)
|| unlikely(force))
{
FhgfsIsizeHints iSizeHints;
int refreshRes;
......@@ -101,7 +102,7 @@ struct dentry* FhgfsOps_lookupIntent(struct inode* parentDir, struct dentry* den
(because the kernel doesn't do lookup/revalidate for the root inode) */
{
int refreshRes = maybeRefreshInode(parentDir, true, false);
int refreshRes = maybeRefreshInode(parentDir, true, false, false);
// root permissions might have changed now => recheck permissions
if (!refreshRes)
......@@ -233,8 +234,21 @@ struct dentry* FhgfsOps_lookupIntent(struct inode* parentDir, struct dentry* den
}
#ifdef KERNEL_HAS_STATX
int FhgfsOps_getattr(const struct path* path, struct kstat* kstat, u32 request_mask,
unsigned int query_flags)
{
struct vfsmount* mnt = path->mnt;
struct dentry* dentry = path->dentry;
bool mustQuery = (query_flags & AT_STATX_SYNC_TYPE) == AT_STATX_FORCE_SYNC;
#else
int FhgfsOps_getattr(struct vfsmount* mnt, struct dentry* dentry, struct kstat* kstat)
{
const bool mustQuery = false;
#endif
App* app = FhgfsOps_getApp(dentry->d_sb);
Config* cfg = App_getConfig(app);
const char* logContext = "FhgfsOps_getattr";
......@@ -262,7 +276,7 @@ int FhgfsOps_getattr(struct vfsmount* mnt, struct dentry* dentry, struct kstat*
can never be up-to-date, so that would also be quite useless. */
retVal = maybeRefreshInode(inode,
isRoot || FhgfsInode_getIsFileOpen(fhgfsInode) || refreshOnGetAttr, true);
isRoot || FhgfsInode_getIsFileOpen(fhgfsInode) || refreshOnGetAttr, true, mustQuery);
if(!retVal)
{
......@@ -299,7 +313,7 @@ ssize_t FhgfsOps_listxattr(struct dentry* dentry, char* value, size_t size)
FhgfsInode* fhgfsInode = BEEGFS_INODE(dentry->d_inode);
int refreshRes = maybeRefreshInode(dentry->d_inode, true, false);
int refreshRes = maybeRefreshInode(dentry->d_inode, true, false, false);
if (refreshRes)
return refreshRes;
......@@ -344,7 +358,7 @@ ssize_t FhgfsOps_getxattr(struct inode* inode, const char* name, void* value, si
FhgfsOpsErr remotingRes;
ssize_t resSize;
int refreshRes = maybeRefreshInode(inode, true, false);
int refreshRes = maybeRefreshInode(inode, true, false, false);
if (refreshRes)
return refreshRes;
......@@ -386,7 +400,7 @@ int FhgfsOps_removexattrInode(struct inode* inode, const char* name)
FhgfsInode* fhgfsInode = BEEGFS_INODE(inode);
int refreshRes = maybeRefreshInode(inode, true, false);
int refreshRes = maybeRefreshInode(inode, true, false, false);
if (refreshRes)
return refreshRes;
......@@ -420,7 +434,7 @@ int FhgfsOps_setxattr(struct inode* inode, const char* name, const void* value,
FhgfsInode* fhgfsInode = BEEGFS_INODE(inode);
FhgfsOpsErr remotingRes;
int refreshRes = maybeRefreshInode(inode, true, false);
int refreshRes = maybeRefreshInode(inode, true, false, false);
if (refreshRes)
return refreshRes;
......@@ -451,7 +465,7 @@ struct posix_acl* FhgfsOps_get_acl(struct inode* inode, int type)
FhgfsInode* fhgfsInode = BEEGFS_INODE(inode);
const EntryInfo* entryInfo = FhgfsInode_getEntryInfo(fhgfsInode);
int refreshRes = maybeRefreshInode(inode, true, false);
int refreshRes = maybeRefreshInode(inode, true, false, false);
if (refreshRes)
return ERR_PTR(refreshRes);
......@@ -520,7 +534,7 @@ int FhgfsOps_set_acl(struct inode* inode, struct posix_acl* acl, int type)
FhgfsInode* fhgfsInode = BEEGFS_INODE(inode);
const EntryInfo* entryInfo = FhgfsInode_getEntryInfo(fhgfsInode);
int refreshRes = maybeRefreshInode(inode, true, false);
int refreshRes = maybeRefreshInode(inode, true, false, false);
if (refreshRes)
return refreshRes;
......
......@@ -31,7 +31,12 @@ typedef struct FhgfsInodeComparisonInfo FhgfsInodeComparisonInfo;
unsigned flags);
#endif // KERNEL_HAS_ATOMIC_OPEN
#ifdef KERNEL_HAS_STATX
extern int FhgfsOps_getattr(const struct path* path, struct kstat* kstat, u32 request_mask,
unsigned int query_flags);
#else
extern int FhgfsOps_getattr(struct vfsmount* mnt, struct dentry* dentry, struct kstat* kstat);
#endif
extern int FhgfsOps_setattr(struct dentry* dentry, struct iattr* iattr);
extern ssize_t FhgfsOps_listxattr(struct dentry* dentry, char* value, size_t size);
......
......@@ -162,17 +162,21 @@ Node* NodeStoreEx_referenceNode(NodeStoreEx* this, NumNodeID id)
RWLock_readLock(&this->rwLock); // L O C K
node = NodeTree_find(&this->nodeTree, id);
if(likely(node) )
if (likely(node))
{ // found it
Node_get(node);
// check for unusually high reference count
#ifdef BEEGFS_DEBUG
#ifdef BEEGFS_DEBUG
# ifdef KERNEL_HAS_KREF_READ
if (kref_read(&node->references) > NODESTORE_WARN_REFNUM)
# else
if(atomic_read(&node->references.refcount) > NODESTORE_WARN_REFNUM)
#endif
Logger_logFormatted(log, Log_CRITICAL, __func__,
"WARNING: Lots of references to node (=> leak?): %s %s; ref count: %d",
Node_getNodeTypeStr(node), Node_getID(node), node->references);
#endif // BEEGFS_DEBUG
#endif // BEEGFS_DEBUG
}
RWLock_readUnlock(&this->rwLock); // U N L O C K
......
......@@ -33,6 +33,7 @@ class AcknowledgeableMsg : public NetMessage
// setters & getters
const char* getAckID() const { return ackID; }
bool wantsAck() const { return ackIDLen != 0; }
/**
* @param ackID just a reference
......
......@@ -91,6 +91,15 @@ class TargetStateStore
safeLock.unlock(); // U N L O C K
}
void setReachabilityState(uint16_t id, TargetReachabilityState state)
{
SafeRWLock safeLock(&rwlock, SafeRWLock_WRITE);
statesMap[id].reachabilityState = state;
safeLock.unlock();
}
protected:
......
......@@ -27,7 +27,10 @@
#define STORAGETK_TARGETID_FILENAME "targetID" /* contains first-run targetID */
#define STORAGETK_TARGETNUMID_FILENAME "targetNumID" /* contains first-run targetNumID */
#define STORAGETK_SESSIONS_BACKUP_FILE_NAME "sessions" /* contains session backup information */
#define STORAGETK_MSESSIONS_BACKUP_FILE_NAME "msessions" /* mirror session backup information */
/* mirror session backup information */
#define STORAGETK_MSESSIONS_BACKUP_FILE_NAME "mirroredSessions"
/* old file name for mirror session backup information, for compatibility */
#define STORAGETK_MSESSIONS_OLD_BACKUP_FILE_NAME "msessions"
#define STORAGETK_FILEID_TIMESTAMP_SHIFTBITS 32 /* timestamp is shifted by this number of bits */
......
......@@ -1620,10 +1620,14 @@ bool App::restoreSessions()
std::string path = this->metaPathStr + "/" + std::string(STORAGETK_SESSIONS_BACKUP_FILE_NAME);
std::string mpath = this->metaPathStr + "/" + std::string(STORAGETK_MSESSIONS_BACKUP_FILE_NAME);
std::string oldMpath = this->metaPathStr + "/"
+ std::string(STORAGETK_MSESSIONS_OLD_BACKUP_FILE_NAME);
bool pathRes = StorageTk::pathExists(path);
bool mpathRes = StorageTk::pathExists(mpath);
if (!pathRes && !mpathRes)
bool oldMpathRes = StorageTk::pathExists(oldMpath);
if (!pathRes && !mpathRes && !oldMpathRes)
return false;
if (pathRes)
......@@ -1631,24 +1635,44 @@ bool App::restoreSessions()
bool loadRes = this->sessions->loadFromFile(path, *metaStore);
if (!loadRes)
{
log->logErr("Could not restore all sessions");
LOG_TOP(GENERAL, CRITICAL, "Could not restore all sessions.");
retVal = false;
}
}
if (mpathRes)
if(mpathRes && oldMpathRes)
{
bool loadRes = this->mirroredSessions->loadFromFile(mpath, *metaStore);
if (!loadRes)
// if both the old and the new file exists, log and exit
throw ComponentInitException("Found both msessions (old) and "
"mirroredSessions files. One of them needs to be deleted before proceeding. Aborting.");
}
else if(oldMpathRes)
{
LOG_TOP(GENERAL, NOTICE, "Old mirrored sessions file (msessions) found. Renaming.");
if(rename(oldMpath.c_str(),mpath.c_str()) == -1)
{
LOG_TOP(GENERAL, WARNING, "Couldn't rename msessions file.");
}
mpathRes = StorageTk::pathExists(mpath);
}
if(mpathRes)
{
bool loadRes = false;
loadRes = this->mirroredSessions->loadFromFile(mpath, *metaStore);
if(!loadRes)
{
log->logErr("Could not restore all mirrored sessions");
log->logErr("Could not restore all mirrored sessions.");
retVal = false;
}
}
log->log(Log_NOTICE, "Restored "
LOG_TOP(GENERAL, NOTICE, "Restored "
+ StringTk::uintToStr(sessions->getSize()) + " sessions and "
+ StringTk::uintToStr(mirroredSessions->getSize()) + " mirrored sessions");
+ StringTk::uintToStr(mirroredSessions->getSize()) + " mirrored sessions.");
return retVal;
}
......
......@@ -861,7 +861,7 @@ FhgfsOpsErr DirEntry::storeInitialDirEntry(const std::string& dirEntryPath)
std::string namePath = dirEntryPath + '/' + this->name;
FhgfsOpsErr result = this->storeInitialDirEntryName(logContext, idPath, namePath, isDir);
if (getIsBuddyMirrored())
if (result == FhgfsOpsErr_SUCCESS && getIsBuddyMirrored())
if (auto* resync = BuddyResyncer::getSyncChangeset())
{
if (!isDir)
......
......@@ -142,7 +142,7 @@ quotaEnableEnforcement = false
# may be used for communication. One interface per line. The line number also
# defines the priority of the interface.
# Example: "ib0" in the first line, "eth0" in the second line.
# Values: This setting is optional. If unspecified, all available interfaces
# Values: This setting is optional. If unspecified, all available interfaces
# will be used and priorities will be assigned automatically.
# Note: This has no influence on outgoing connections. The information is sent
# to other hosts to inform them about possible communication paths.
......@@ -158,14 +158,14 @@ quotaEnableEnforcement = false
# address and number of significant bits).
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
# line.
# Values: This setting is optional. If unspecified, all addresses are allowed
# Values: This setting is optional. If unspecified, all addresses are allowed
# for outgoing communication.
# Default: <none>
# [connPortShift]
# Shifts all following UDP and TCP ports according to the specified value.
# Intended to make port configuration easier in case you do not want to
# configure each port individually.
# configure each port individually.
# Default: 0
......@@ -246,9 +246,9 @@ quotaEnableEnforcement = false
# the user and group IDs from the local system which may be connected to an
# LDAP or some other user management system. The second valid value is "range"
# which must be specified in quotaQueryUIDRange and quotaQueryGIDRange. In this
# case all IDs of user ID range and the group ID range will be queried. The third
# valid value is "file" which reads the UIDs and GIDs from files. The path to the
# files must be specified in quotaQueryUIDFile and quotaQueryGIDFile.
# case all IDs of user ID range and the group ID range will be queried. The
# third valid value is "file" which reads the UIDs and GIDs from files. The path
# to the files must be specified in quotaQueryUIDFile and quotaQueryGIDFile.
# Note: When the user management system is slow it can decrease the performance.
# Note: Do not define ranges too big because this will decrease the performance.
# Default: system
......@@ -283,6 +283,9 @@ quotaEnableEnforcement = false
# target state are received from that server.
# Note: Too low values might lead to false positive detection of offline
# servers.
# Note: Raising this might cause systemd to kill the mgmtd service prematurely.
# If this value is raised above 240, and systemd is being used, the
# TimeoutStopSec value in the service file should be adapted accordingly.
# Values: time in seconds
# Default: 180
......@@ -307,7 +310,8 @@ quotaEnableEnforcement = false
# Default: 4
# [tuneNumQuotaWorkers]
# The number of worker threads used for retrieval of quota information from storage servers.
# The number of worker threads used for retrieval of quota information from
# storage servers.