Commit 58a6527c authored by Bernd Lietzow's avatar Bernd Lietzow 🐨

update to release 7.1.5

parent f009209a
......@@ -21,7 +21,11 @@ else
BEEGFS_EPOCH := 20
endif
BEEGFS_VERSION_DEB := $(BEEGFS_EPOCH):${BEEGFS_VERSION}
# sanitize version strings:
# rpm accepts underscores but not dashes
# deb accepts dashes but not underscores
BEEGFS_VERSION_RPM := $(subst -,_,$(BEEGFS_VERSION))
BEEGFS_VERSION_DEB := $(BEEGFS_EPOCH):$(subst _,-,$(BEEGFS_VERSION))
export BEEGFS_VERSION
PREFIX ?= /opt/beegfs
......@@ -169,10 +173,10 @@ package-rpm: clean
! [ -d '$(PACKAGE_DIR)' ] || { echo choose a new directory for PACKAGE_DIR, please >&2; false; }
mkdir -p $(PACKAGE_DIR)/SOURCES
tar --exclude $(PACKAGE_DIR) --exclude .git --exclude .ccache \
-cf $(PACKAGE_DIR)/SOURCES/beegfs-$(BEEGFS_VERSION).tar .
-cf $(PACKAGE_DIR)/SOURCES/beegfs-$(BEEGFS_VERSION_RPM).tar .
rpmbuild --clean -bb beegfs.spec \
--define '_topdir $(abspath $(PACKAGE_DIR))' \
--define 'EPOCH $(BEEGFS_EPOCH)' \
--define 'BEEGFS_VERSION $(BEEGFS_VERSION)' \
--define 'BEEGFS_VERSION $(BEEGFS_VERSION_RPM)' \
$(RPMBUILD_OPTS)
......@@ -361,6 +361,8 @@ make -C client_module/build %make_j \
RELEASE_PATH=${RPM_BUILD_ROOT}/opt/beegfs/src/client KDIR="%{KDIR}" V=1 \
prepare_release
cp client_module/build/dist/etc/*.conf ${RPM_BUILD_ROOT}/etc/beegfs/
cp client_module/build/dist/etc/beegfs-client-build.mk ${RPM_BUILD_ROOT}/etc/beegfs/beegfs-client-build.mk
# compat files
cp -a ${RPM_BUILD_ROOT}/%{CLIENT_DIR} ${RPM_BUILD_ROOT}/%{CLIENT_COMPAT_DIR}
......@@ -391,9 +393,18 @@ install -D client_module/build/dist/etc/beegfs-client-mount-hook.example \
##########
cp client_module/build/dist/etc/*.conf ${RPM_BUILD_ROOT}/etc/beegfs/
mkdir -p ${RPM_BUILD_ROOT}/usr/src/beegfs-%{VER}
cp -r client_module/build ${RPM_BUILD_ROOT}/usr/src/beegfs-%{VER}
cp -r client_module/source ${RPM_BUILD_ROOT}/usr/src/beegfs-%{VER}
rm -Rf ${RPM_BUILD_ROOT}/usr/src/beegfs-%{VER}/build/dist
install -D client_module/build/dist/sbin/beegfs-setup-client \
${RPM_BUILD_ROOT}/opt/beegfs/sbin/beegfs-setup-client
sed -e 's/__VERSION__/%{VER}/g' -e 's/__NAME__/beegfs/g' -e 's/__MODNAME__/beegfs/g' \
< client_module/dkms.conf.in \
> ${RPM_BUILD_ROOT}/usr/src/beegfs-%{VER}/dkms.conf
......@@ -765,6 +776,7 @@ touch /var/lib/beegfs/client/force-auto-build
%config(noreplace) /etc/beegfs/beegfs-client-autobuild.conf
%config(noreplace) /etc/beegfs/beegfs-client-mount-hook.example
%config(noreplace) /etc/beegfs/beegfs-client.conf
%config(noreplace) /etc/beegfs/beegfs-client-build.mk
%config(noreplace) /etc/beegfs/beegfs-mounts.conf
%dir /etc/beegfs/lib/
%config(noreplace) /etc/beegfs/lib/init-multi-mode.beegfs-client
......
......@@ -256,13 +256,12 @@ check_pdsh()
# execute cmd
test -e "${PDSH}" &&\
${PDSH} -R ${PDSH_RCMD} -S -w "${HOSTS}" \
"if [ -e ${BEEOND_STOPLOCAL} ]; then true; else return 2; fi"
"test \${SHELL} = '/bin/bash' || exit 2"
RES=$?
if [ $RES -eq 2 ]
then
print_error_and_exit "Unable to find BeeOND helper program on one or more nodes.
Please make sure BeeOND is installed on all machines."
print_error_and_exit "One or more hosts don't use /bin/bash as default shell."
elif [ $RES -ne 0 ]
then
print_info "pdsh does not seem to work on all nodes. Disabling pdsh and using ssh instead"
......@@ -275,7 +274,13 @@ Please make sure BeeOND is installed on all machines."
check_reachability "${HOST}"
done
unset IFS
return
fi
${PDSH} -R ${PDSH_RCMD} -S -w "${HOSTS}" \
"if [ -e ${BEEOND_STOPLOCAL} ]; then true; else exit 2; fi" || \
print_error_and_exit "Unable to find BeeOND helper program on one or more nodes.
Please make sure BeeOND is installed on all machines."
}
execute_ssh_cmd()
......@@ -341,19 +346,22 @@ check_reachability()
print_info "Checking reachability of host ${HOST}"
execute_ssh_cmd "${HOST}" "test -e ${BEEOND_STOPLOCAL}"
execute_ssh_cmd "${HOST}" "test \${SHELL} = '/bin/bash'"
RES=$?
if [ $RES -eq 255 ]
then
print_error_and_exit "Host is unreachable via ssh: ${HOST}"
elif [ $RES -eq 1 ]
then
print_error_and_exit "Could not find BeeOND helper program on host: ${HOST}
Please make sure BeeOND is installed on all machines."
print_error_and_exit "Host doesn't use /bin/bash as default shell: ${HOST}"
elif [ $RES -ne 0 ]
then
print_error_and_exit "Error contacting host: ${HOST}"
fi
execute_ssh_cmd "${HOST}" "test -e ${BEEOND_STOPLOCAL}" || \
print_error_and_exit "Could not find BeeOND helper program on host: ${HOST}
Please make sure BeeOND is installed on all machines."
}
check_hostfile()
......@@ -571,13 +579,9 @@ ${BEEGFS_BIN_PATH}/${META_BIN} \${PARAMS}"
ln -s ${DATAPATH}/${META_NUMID_FILE} ${PREFERRED_MDS_FILE}" "false"
fi
IFS=','
for HOST in ${HOSTS}
do
if [ "${HOST}" = "" ]; then continue; fi
add_to_status_file "${HOST}" "${META_BIN}" "${DATAPATH}" "${LOGFILE}" "${PIDFILE}"
done
unset IFS
execute_pdsh_cmd "${HOSTS}" "echo %h,${META_BIN},${DATAPATH},${LOGFILE},${PIDFILE} >> ${STATUSFILE}" "false"
else
# no pdsh => do it manually with ssh loop
print_info "Starting ${META_BIN} processes"
......@@ -679,13 +683,8 @@ needed parameters"
ln -s ${DATAPATH}/${TARGET_NUMID_FILE} ${PREFERRED_TARGET_FILE}" "false"
fi
IFS=','
for HOST in ${HOSTS}
do
if [ "${HOST}" = "" ]; then continue; fi
add_to_status_file "${HOST}" "${STORAGE_BIN}" "${DATAPATH}" "${LOGFILE}" "${PIDFILE}"
done
unset IFS
execute_pdsh_cmd "${HOSTS}" "echo %h,${STORAGE_BIN},${DATAPATH},${LOGFILE},${PIDFILE} >> ${STATUSFILE}" "false"
else
# no pdsh => do it manually with ssh loop
print_info "Starting ${STORAGE_BIN} processes"
......@@ -941,16 +940,8 @@ mkdir -p ${MOUNTPOINT} && ${MODPROBE_CMD} && mount -t beegfs beegfs_ondemand ${M
execute_pdsh_cmd "${HOSTS}" "${HELPERD_CMD}" "false"
IFS=','
for HOST in ${HOSTS}
do
if [ "${HOST}" = "" ]; then continue; fi
# NOTE : - is empty data path
add_to_status_file "${HOST}" "${HELPERD_BIN}" - "${LOGFILE}" "${PIDFILE}"
# NOTE : mountpoint as data path
add_to_status_file "${HOST}" "${CLIENT_BIN}" "${MOUNTPOINT}" "${LOGFILE}" -
done
unset IFS
execute_pdsh_cmd "${HOSTS}" "echo %h,${HELPERD_BIN},-,${LOGFILE},${PIDFILE} >> ${STATUSFILE}" "false"
execute_pdsh_cmd "${HOSTS}" "echo %h,${CLIENT_BIN},${MOUNTPOINT},${LOGFILE},- >> ${STATUSFILE}" "false"
execute_pdsh_cmd "${HOSTS}" "${MODPROBE_CMD} || ${REBUILD_CMD}" "false"
execute_pdsh_cmd "${HOSTS}" "${MOUNT_CMD}" "false"
......
......@@ -288,6 +288,9 @@ $(call define_if_matches, KERNEL_HAS_WQ_RESCUER, "WQ_RESCUER", workqueue.h)
$(call define_if_matches, KERNEL_HAS_WAIT_QUEUE_ENTRY_T, "wait_queue_entry_t", wait.h)
$(call define_if_matches, KERNEL_HAS_CURRENT_FS_TIME, "current_fs_time", fs.h)
$(call define_if_matches, KERNEL_HAS_64BIT_TIMESTAMPS, "struct timespec64[[:space:]]\+i_atime;", fs.h)
$(call define_if_matches, KERNEL_HAS_KTIME_GET, "ktime_get_real_ts64", timekeeping.h)
$(call define_if_matches, KERNEL_HAS_SB_NODIRATIME, "SB_NODIRATIME", fs.h)
$(call define_if_matches, KERNEL_IB_DESTROY_CQ_IS_VOID, "static inline void ib_destroy_cq", ../rdma/ib_verbs.h)
# inodeChangeRes was changed to setattr_prepare in vanilla 4.9
$(call define_if_matches, KERNEL_HAS_SETATTR_PREPARE, "int setattr_prepare", fs.h)
......@@ -298,3 +301,6 @@ KERNEL_FEATURE_DETECTION += $(shell \
grep -sA1 "(*rename) " $(KSRCDIR_PRUNED_HEAD)/include/linux/fs.h \
| grep -qsF "unsigned int" \
&& echo "-DKERNEL_HAS_RENAME_FLAGS")
$(call define_if_matches, KERNEL_ACCESS_OK_WANTS_TYPE, "define access_ok(type, addr, size)" \
$(KSRCDIR_PRUNED_HEAD)/include/asm-generic/uaccess.h)
......@@ -150,7 +150,7 @@ ifneq ($(OFED_INCLUDE_PATH),)
fi
endif
$(MAKE) -C $(KDIR_PRUNED_HEAD) "SUBDIRS=$(BEEGFS_BUILDDIR)/../source" \
$(MAKE) -C $(KDIR_PRUNED_HEAD) "M=$(BEEGFS_BUILDDIR)/../source" \
"EXTRA_CFLAGS=$(BEEGFS_CFLAGS) $(EXTRA_CFLAGS)" modules
@cp ../source/$(TARGET).ko .
......@@ -158,7 +158,7 @@ endif
@ ${STRIP} --strip-debug ${TARGET}.ko;
coccicheck:
$(MAKE) -C $(KDIR_PRUNED_HEAD) "SUBDIRS=$(BEEGFS_BUILDDIR)" coccicheck MODE=report \
$(MAKE) -C $(KDIR_PRUNED_HEAD) "M=$(BEEGFS_BUILDDIR)" coccicheck MODE=report \
M=$(BEEGFS_BUILDDIR)/../source KBUILD_EXTMOD="$(BEEGFS_BUILDDIR)/../source"
......
......@@ -134,7 +134,7 @@ ifneq ($(OFED_INCLUDE_PATH),)
endif
@echo "Building beegfs client module"
$(MAKE) -C $(KDIR_PRUNED_HEAD) SUBDIRS=$(BEEGFS_BUILDDIR)/../source \
$(MAKE) -C $(KDIR_PRUNED_HEAD) M=$(BEEGFS_BUILDDIR)/../source \
"EXTRA_CFLAGS=$(BEEGFS_CFLAGS)" modules
@cp ../source/$(TARGET).ko .
......
# BeeGFS client module DKMS build configuration
# This file is only used when building via DKMS.
# The module needs to be rebuilt after this file has been changed.
# If using thirdparty OFED specify the path to the installation here.
# Examples:
#OFED_INCLUDE_PATH=/usr/src/ofa_kernel/default/include
#OFED_INCLUDE_PATH=/usr/src/openib/include
......@@ -154,7 +154,12 @@
#if defined(KERNEL_HAS_64BIT_TIMESTAMPS)
static inline struct timespec64 current_fs_time(struct super_block *sb)
{
#if defined(KERNEL_HAS_KTIME_GET)
struct timespec64 now;
ktime_get_real_ts64(&now);
#else
struct timespec64 now = current_kernel_time64();
#endif /* KERNEL_HAS_KTIME_GET */
return timespec64_trunc(now, sb->s_time_gran);
}
#elif !defined(KERNEL_HAS_CURRENT_FS_TIME)
......
......@@ -707,6 +707,9 @@ void __IBVSocket_cleanupCommContext(struct rdma_cm_id* cm_id, IBVCommContext* co
if(commContext->sendCQ)
#ifdef KERNEL_IB_DESTROY_CQ_IS_VOID
ib_destroy_cq(commContext->sendCQ);
#else
{
int destroyRes = ib_destroy_cq(commContext->sendCQ);
if (unlikely(destroyRes) )
......@@ -715,8 +718,12 @@ void __IBVSocket_cleanupCommContext(struct rdma_cm_id* cm_id, IBVCommContext* co
dump_stack();
}
}
#endif
if(commContext->recvCQ)
#ifdef KERNEL_IB_DESTROY_CQ_IS_VOID
ib_destroy_cq(commContext->recvCQ);
#else
{
int destroyRes = ib_destroy_cq(commContext->recvCQ);
if (unlikely(destroyRes) )
......@@ -725,6 +732,7 @@ void __IBVSocket_cleanupCommContext(struct rdma_cm_id* cm_id, IBVCommContext* co
dump_stack();
}
}
#endif
IBVBuffer_free(&commContext->checkConBuffer, commContext);
......
......@@ -11,7 +11,7 @@ void FileEvent_init(struct FileEvent* event, enum FileEventType eventType, struc
if (!dentry)
return;
event->pathPagePFN = __get_free_page(GFP_NOFS);
event->pathPagePFN = (unsigned long) kmalloc(4096, GFP_NOFS);
if (!event->pathPagePFN)
return;
......@@ -23,7 +23,7 @@ void FileEvent_init(struct FileEvent* event, enum FileEventType eventType, struc
void FileEvent_uninit(struct FileEvent* event)
{
if (event->pathPagePFN)
free_page(event->pathPagePFN);
kfree((void *)event->pathPagePFN);
FileEvent_setTargetStr(event, NULL);
}
......@@ -35,7 +35,7 @@ void FileEvent_setTargetDentry(struct FileEvent* event, struct dentry* dentry)
if (!dentry)
return;
event->targetPagePFN = __get_free_page(GFP_NOFS);
event->targetPagePFN = (unsigned long) kmalloc(4096, GFP_NOFS);
if (!event->targetPagePFN)
return;
......
......@@ -37,7 +37,7 @@ void FileEvent_uninit(struct FileEvent* event);
static inline void FileEvent_setTargetStr(struct FileEvent* event, const char* target)
{
if (event->targetPagePFN)
free_page(event->targetPagePFN);
kfree((void *)event->targetPagePFN);
else
kfree(event->target);
......
......@@ -5,7 +5,11 @@
void TimeAbs_init(TimeAbs* this)
{
struct timeval now;
#if defined(KERNEL_HAS_KTIME_GET)
now = ktime_to_timeval(ktime_get_real());
#else
do_gettimeofday(&now);
#endif
this->now.tv_sec = now.tv_sec;
this->now.tv_usec = now.tv_usec;
......
......@@ -301,7 +301,7 @@ int FhgfsOps_readlink(struct dentry* dentry, char __user* buf, int size)
FhgfsOpsHelper_logOp(5, app, dentry, inode, logContext);
// check user buffer
if(unlikely(!access_ok(VERIFY_WRITE, buf, size) ) )
if(unlikely(!os_access_ok(VERIFY_WRITE, buf, size) ) )
return -EFAULT;
FhgfsInode_entryInfoReadLock(fhgfsInode); // LOCK EntryInfo
......
......@@ -194,7 +194,7 @@ static long FhgfsOpsIoctl_getCfgFile(struct file *file, void __user *argp)
return -EINVAL;
}
if(!access_ok(VERIFY_WRITE, confFile, sizeof(*confFile) ) )
if(!os_access_ok(VERIFY_WRITE, confFile, sizeof(*confFile) ) )
{
Logger_logFormatted(log, Log_DEBUG, logContext, "access_ok() denied to write to conf_file");
return -EINVAL;
......@@ -230,7 +230,7 @@ static long FhgfsOpsIoctl_getRuntimeCfgFile(struct file *file, void __user *argp
int cpRes;
int cfgFileStrLen;
if(!access_ok(VERIFY_WRITE, confFile, sizeof(*confFile) ) )
if(!os_access_ok(VERIFY_WRITE, confFile, sizeof(*confFile) ) )
{
Logger_logFormatted(log, Log_DEBUG, logContext, "access_ok() denied to write to conf_file");
vfree(fileName);
......
......@@ -281,7 +281,11 @@ int FhgfsOps_fillSuper(struct super_block* sb, void* rawMountOptions, int silent
sb->s_magic = BEEGFS_MAGIC;
sb->s_op = &fhgfs_super_ops;
sb->s_time_gran = 1000000000; // granularity of c/m/atime in ns
#ifdef KERNEL_HAS_SB_NODIRATIME
sb->s_flags |= SB_NODIRATIME;
#else
sb->s_flags |= MS_NODIRATIME;
#endif
if (Config_getSysXAttrsEnabled(cfg ) )
sb->s_xattr = fhgfs_xattr_handlers_noacl; // handle only user xattrs
......
......@@ -465,7 +465,7 @@ ssize_t __ProcFs_writeV2_connRetriesEnabled(struct file *file, const char __user
App* app = __ProcFs_getProcParentDirEntryDataField(procInode); // (app is ->data in parent dir)
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_connRetriesEnabled(buf, count, app);
......@@ -478,7 +478,7 @@ int ProcFs_write_connRetriesEnabled(struct file* file, const char __user *buf,
unsigned long count, void* data)
{
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_connRetriesEnabled(buf, count, (App*)data);
......@@ -507,7 +507,7 @@ ssize_t __ProcFs_writeV2_netBenchModeEnabled(struct file *file, const char __use
App* app = __ProcFs_getProcParentDirEntryDataField(procInode); // (app is ->data in parent dir)
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_netBenchModeEnabled(buf, count, app);
......@@ -520,7 +520,7 @@ int ProcFs_write_netBenchModeEnabled(struct file* file, const char __user *buf,
unsigned long count, void* data)
{
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_netBenchModeEnabled(buf, count, (App*)data);
......@@ -533,7 +533,7 @@ ssize_t __ProcFs_writeV2_dropConns(struct file *file, const char __user *buf,
App* app = __ProcFs_getProcParentDirEntryDataField(procInode); // (app is ->data in parent dir)
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_dropConns(buf, count, app);
......@@ -546,7 +546,7 @@ int ProcFs_write_dropConns(struct file* file, const char __user *buf,
unsigned long count, void* data)
{
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_dropConns(buf, count, (App*)data);
......@@ -575,7 +575,7 @@ ssize_t __ProcFs_writeV2_logLevels(struct file *file, const char __user *buf,
App* app = __ProcFs_getProcParentDirEntryDataField(procInode); // (app is ->data in parent dir)
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_logLevels(buf, count, app);
......@@ -588,7 +588,7 @@ int ProcFs_write_logLevels(struct file* file, const char __user *buf,
unsigned long count, void* data)
{
// check user buffer
if(unlikely(!access_ok(VERIFY_READ, buf, count) ) )
if(unlikely(!os_access_ok(VERIFY_READ, buf, count) ) )
return -EFAULT;
return ProcFsHelper_write_logLevels(buf, count, (App*)data);
......
......@@ -299,4 +299,12 @@ static inline void os_inode_unlock(struct inode* inode)
}
#endif
#if defined(KERNEL_ACCESS_OK_WANTS_TYPE)
# define os_access_ok(type, addr, size) access_ok(type, addr, size)
#else
# define os_access_ok(type, addr, size) access_ok(addr, size)
#endif
#endif /* OSCOMPAT_H_ */
......@@ -19,7 +19,10 @@
#ifdef BEEGFS_DEBUG
#if defined CONFIG_STACKTRACE // kernel has stacktrace support
// Significant parts of the kernel code around struct stack_trace are removed
// when CONFIG_ARCH_STACKWALK is set. Code below needs to be rewritten to work
// with newer kernels that have CONFIG_ARCH_STACKWALK enabled.
#if defined CONFIG_STACKTRACE && !defined CONFIG_ARCH_STACKWALK
/**
* Save a given trace. NOTE: Allocated memory has to be freed later on!
......@@ -80,7 +83,7 @@ void os_printStackTrace(void* trace, int spaces)
}
#else // no CONFIG_STACKTRACE => nothing to do at all
#else // no CONFIG_STACKTRACE or CONFIG_ARCH_STACKWALK enabled => nothing to do at all
void* os_saveStackTrace(void)
{
......@@ -98,7 +101,7 @@ void os_freeStackTrace(void* trace)
return;
}
#endif // CONFIG_STACKTRACE
#endif // CONFIG_STACKTRACE && !CONFIG_ARCH_STACKWALK
#endif // BEEGFS_DEBUG
......
......@@ -98,3 +98,4 @@ MODULE_LICENSE(BEEGFS_LICENSE);
MODULE_DESCRIPTION("BeeGFS parallel file system client (http://www.beegfs.com)");
MODULE_AUTHOR("Fraunhofer ITWM, CC-HPC");
MODULE_ALIAS("fs-" BEEGFS_MODULE_NAME_STR);
MODULE_VERSION(BEEGFS_VERSION);
......@@ -402,7 +402,7 @@ std::string MsgHelperGenericDebug::processOpListTargetStates(std::istringstream&
for (ZipConstIterRange<UInt16List, UInt8List, UInt8List>
iter(targetIDs, targetReachabilityStates, targetConsistencyStates);
iter.empty(); ++iter)
!iter.empty(); ++iter)
{
returnStream << *iter()->first << " "
<< TargetStateStore::stateToStr( (TargetReachabilityState)*iter()->second) << " "
......
......@@ -7,18 +7,19 @@
#include <common/storage/Metadata.h>
#include <common/toolkit/MessagingTk.h>
void DisposalCleaner::run(NodeStore& nodes, const std::function<OnItemFn>& onItem,
const std::function<OnErrorFn>& onError)
void DisposalCleaner::run(const std::vector<NodeHandle>& nodes, const std::function<OnItemFn>& onItem,
const std::function<OnErrorFn>& onError, const std::function<bool()>& abortCondition)
{
for (const auto& node : nodes.referenceAllNodes())
for (const auto& node : nodes)
{
FhgfsOpsErr walkRes = walkNode(*node, onItem);
FhgfsOpsErr walkRes = walkNode(*node, onItem, abortCondition);
if (walkRes != FhgfsOpsErr_SUCCESS)
onError(*node, walkRes);
}
}
FhgfsOpsErr DisposalCleaner::walkNode(Node& node, const std::function<OnItemFn>& onItem)
FhgfsOpsErr DisposalCleaner::walkNode(Node& node, const std::function<OnItemFn>& onItem,
const std::function<bool()>& abortCondition)
{
FhgfsOpsErr retVal = FhgfsOpsErr_SUCCESS;
......@@ -32,7 +33,7 @@ FhgfsOpsErr DisposalCleaner::walkNode(Node& node, const std::function<OnItemFn>&
do
{
for (int i = 0; i <= 1; i++)
for (int i = (onlyMirrored ? 1 : 0); i <= 1; i++)
{
// i == 0 -> non-mirrored metadata
// i == 1 -> mirrored metadata
......@@ -82,6 +83,9 @@ FhgfsOpsErr DisposalCleaner::walkNode(Node& node, const std::function<OnItemFn>&
if (retVal != FhgfsOpsErr_SUCCESS)
break;
}
if (abortCondition())
return retVal;
}
} while (retVal == FhgfsOpsErr_SUCCESS && numEntriesThisRound == maxOutNames);
......
......@@ -3,8 +3,6 @@
#include <common/nodes/MirrorBuddyGroupMapper.h>
#include <common/nodes/Node.h>
#include <common/nodes/NodeStore.h>
#include <functional>
class DisposalCleaner
......@@ -14,20 +12,24 @@ class DisposalCleaner
const bool isMirrored);
typedef void (OnErrorFn)(Node& node, FhgfsOpsErr err);
DisposalCleaner(MirrorBuddyGroupMapper& bgm):
bgm(&bgm)
DisposalCleaner(MirrorBuddyGroupMapper& bgm, bool onlyMirrored=false):
bgm(&bgm), onlyMirrored(onlyMirrored)
{
}
void run(NodeStore& nodes, const std::function<OnItemFn>& onItem,
const std::function<OnErrorFn>& onError);
void run(const std::vector<NodeHandle>& nodes, const std::function<OnItemFn>& onItem,
const std::function<OnErrorFn>& onError,
const std::function<bool()>& abortCondition = [] () { return false; });
static FhgfsOpsErr unlinkFile(Node& node, std::string entryName, const bool isMirrored);
private:
MirrorBuddyGroupMapper* bgm;
FhgfsOpsErr walkNode(Node& node, const std::function<OnItemFn>& onItem);
FhgfsOpsErr walkNode(Node& node, const std::function<OnItemFn>& onItem,
const std::function<bool()>& abortCondition);
const bool onlyMirrored;
};
#endif
......@@ -181,7 +181,7 @@ void ModeDisposeUnusedFiles::handleNodes(NodeStoreServers* metaNodes)
DisposalCleaner dc(*Program::getApp()->getMetaMirrorBuddyGroupMapper());
dc.run(*metaNodes,
dc.run(metaNodes->referenceAllNodes(),
std::bind(&ModeDisposeUnusedFiles::handleItem, this, _1, _2, _3),
std::bind(&ModeDisposeUnusedFiles::handleError, this, _1, _2));
......
......@@ -15,7 +15,6 @@
#define MODEGETNODES_ARG_PRINTDETAILS "--details"
#define MODEGETNODES_ARG_PRINTNICDETAILS "--nicdetails"
#define MODEGETNODES_ARG_PRINTFHGFSVERSION "--showversion"
#define MODEGETNODES_ARG_CHECKREACHABILITY "--reachable"
#define MODEGETNODES_ARG_ERRORCODES "--errorcodes"
#define MODEGETNODES_ARG_REACHABILITYRETRIES "--reachretries"
......@@ -49,13 +48,6 @@ int ModeGetNodes::execute()
cfg->erase(iter);
}
iter = cfg->find(MODEGETNODES_ARG_PRINTFHGFSVERSION);
if(iter != cfg->end() )
{
cfgPrintFhgfsVersion = true;
cfg->erase(iter);
}
iter = cfg->find(MODEGETNODES_ARG_CHECKREACHABILITY);
if(iter != cfg->end() )
{
......@@ -176,7 +168,6 @@ void ModeGetNodes::printHelp()
std::cout << " and interface order." << std::endl;
std::cout << " --nicdetails Print additional network interconnect details, such as" << std::endl;
std::cout << " IP address of each node interface." << std::endl;
std::cout << " --showversion Print node version code." << std::endl;
std::cout << " --reachable Check node reachability (from localhost)." << std::endl;
std::cout << " --errorcodes Exit code reports an error if a node is not reachable," << std::endl;
std::cout << " requires the option --reachable." << std::endl;
......@@ -205,9 +196,6 @@ void ModeGetNodes::printNodes(const std::vector<NodeHandle>& nodes,
// print only string ID for clients, but numeric & string ID for servers
std::cout << node.getTypedNodeID() << std::endl;
if(cfgPrintFhgfsVersion)
std::cout << NODEINFO_INDENTATION_STR << "Version code: " BEEGFS_VERSION << std::endl;
if(cfgPrintDetails)
{
printPorts(node);
......
......@@ -14,7 +14,6 @@ class ModeGetNodes : public Mode
// unreachable nodes later.
cfgPrintDetails(false),
cfgPrintNicDetails(false),
cfgPrintFhgfsVersion(false),
cfgCheckReachability(false),
cfgNotReachableAsError(false),
cfgReachabilityNumRetries(6), // (>= 1)
......@@ -35,7 +34,6 @@ class ModeGetNodes : public Mode
private:
bool cfgPrintDetails;
bool cfgPrintNicDetails;
bool cfgPrintFhgfsVersion;
bool cfgCheckReachability;
bool cfgNotReachableAsError;
unsigned cfgReachabilityNumRetries; // (>= 1)
......
......@@ -194,7 +194,8 @@ Depends: ${misc:Depends}, beeond-thirdparty-gpl (= ${binary:Version}),
beegfs-utils (= ${binary:Version}), beegfs-mgmtd (= ${binary:Version}), beegfs-meta (= ${binary:Version}),
beegfs-storage (= ${binary:Version}),
beegfs-client (= ${binary:Version}) | beegfs-client-dkms (= ${binary:Version}),
beegfs-helperd (= ${binary:Version})
beegfs-helperd (= ${binary:Version}),
psmisc
Description: BeeOND
This package contains BeeOND.
......
......@@ -187,6 +187,8 @@ override_dh_install:
debian/beegfs-client.default
install -D -m644 client_module/build/dist/etc/beegfs-client.conf \
debian/beegfs-client/etc/beegfs/beegfs-client.conf
install -D -m644 client_module/build/dist/etc/beegfs-client-build.mk \
debian/beegfs-client/etc/beegfs/beegfs-client-build.mk
install -D -m644 client_module/build/dist/etc/beegfs-client-autobuild.conf \
debian/beegfs-client/etc/beegfs/beegfs-client-autobuild.conf
install -D -m644 client_module/build/dist/etc/beegfs-mounts.conf \
......@@ -201,17 +203,18 @@ override_dh_install:
mkdir -p debian/beegfs-client-dkms/usr/src/beegfs-$(BEEGFS_VERSION)
cp -r client_module/build debian/beegfs-client-dkms/usr/src/beegfs-$(BEEGFS_VERSION)
cp -r client_module/source debian/beegfs-client-dkms/usr/src/beegfs-$(BEEGFS_VERSION)
rm -Rf debian/beegfs-client-dkms/usr/src/beegfs-$(BEEGFS_VERSION)/build/dist
sed -e 's/__VERSION__/$(BEEGFS_VERSION)/g' -e 's/__NAME__/beegfs/g' -e 's/__MODNAME__/beegfs/g' \
< client_module/dkms.conf.in \
> debian/beegfs-client-dkms.dkms
install -D -m644 client_module/build/dist/etc/beegfs-client.conf \
debian/beegfs-client-dkms/etc/beegfs/beegfs-client.conf
@# client-devel
mkdir -p debian/beegfs-client-devel/usr/include
cp -a client_devel/include/beegfs debian/beegfs-client-devel/usr/include/
mkdir -p debian/beegfs-client-devel/usr/share/doc/beegfs-client-devel/examples/
@# client-dev
mkdir -p debian/beegfs-client-dev/usr/include
cp -a client_devel/include/beegfs debian/beegfs-client-dev/usr/include/
mkdir -p debian/beegfs-client-dev/usr/share/doc/beegfs-client-dev/examples/
cp -a client_devel/build/dist/usr/share/doc/beegfs-client-devel/examples/* \
debian/beegfs-client-devel/usr/share/doc/beegfs-client-devel/examples/
debian/beegfs-client-dev/usr/share/doc/beegfs-client-dev/examples/
# automatic stripping works only with debhelper >= 9.20160114 (since deb9).
# until that's the oldest version we support, strip manually. also remove the -dbg packages
......
......@@ -440,7 +440,7 @@ void ModeCheckFS::disposeUnusedFiles()
uint64_t errors = 0;
DisposalCleaner dc(*Program::getApp()->getMetaMirrorBuddyGroupMapper());
dc.run(*Program::getApp()->getMetaNodes(),
dc.run(Program::getApp()->getMetaNodes()->referenceAllNodes(),
handleDisposalItem,
[&] (const auto&, const auto&) { errors += 1; });
......
......@@ -492,6 +492,11 @@ tuneUsePerUserMsgQueues = false
# has occured. Disabling timestamp mirroring gives a slight performance boost.
# Default: true
# [tuneDisposalGCPeriod]
# If > 0, disposal files will not be removed instantly. Insead a garbage collector
# will run on each meta node. This sets the Wait time in seconds between runs.
# Default: 0
# [quotaEarlyChownResponse]
# Respond to client chown() requests before chunk files have been changed.
# Quota relies on chunk files having the owner and group information stored in
......
......@@ -11,6 +11,7 @@
#include <common/toolkit/NodesTk.h>
#include <components/FileEventLogger.h>
#include <components/ModificationEventFlusher.h>
#include <components/DisposalGarbageCollector.h>
#include <program/Program.h>
#include <session/SessionStore.h>
#include <storage/MetadataEx.h>
......@@ -78,6 +79,7 @@ App::App(int argc, char** argv)
this->internodeSyncer = NULL;
this->modificationEventFlusher = NULL;
this->timerQueue = new TimerQueue(1, 1);
this->gcQueue = new TimerQueue(1, 1);
this->buddyResyncer = NULL;
this->nextNumaBindTarget = 0;
......@@ -848,6 +850,7 @@ void App::startComponents()
PThread::blockInterruptSignals();
timerQueue->start();
gcQueue->start