Commit 366ed243 authored by Christian Mohrbacher's avatar Christian Mohrbacher

updated to release 6.8

parent f27b145b
......@@ -163,10 +163,13 @@ mkdir -p ${RPM_BUILD_ROOT}/var/lib/beegfs/www
%post
if [ "$1" = 1 ]
then
initType=$(pidof systemd >/dev/null && echo "systemd" || echo "sysvinit")
if [ "$initType" = "systemd" ]
output=$(systemctl is-system-running 2> /dev/null)
if [ "$?" == 127 ]
then
systemctl enable %NAME%.service
chkconfig %NAME% on
elif [ "$?" == 0 ] || ( [ "$output" != "offline" ] && [ "$output" != "unknown" ] )
then
systemctl enable %NAME%.service
else
chkconfig %NAME% on
fi
......@@ -176,8 +179,11 @@ hostname > /opt/beegfs/setup/info/management
%preun
if [ "$1" = 0 ]
then
initType=$(pidof systemd >/dev/null && echo "systemd" || echo "sysvinit")
if [ "$initType" = "systemd" ]
output=$(systemctl is-system-running 2> /dev/null)
if [ "$?" == 127 ]
then
chkconfig %NAME% off
elif [ "$?" == 0 ] || ( [ "$output" != "offline" ] && [ "$output" != "unknown" ] )
then
systemctl disable %NAME%.service
else
......
......@@ -8,48 +8,8 @@
TARGET ?= beegfs
ifneq ($(KERNELRELEASE),)
#
# --- kbuild part [START] ---
#
BEEGFS_FEATURE_DETECTION := $(shell $(dir $(lastword $(MAKEFILE_LIST)))/feature-detect.sh)
ifneq ($(lastword $(BEEGFS_FEATURE_DETECTION)),--~~success~~--)
$(error feature detection reported an error)
else
BEEGFS_FEATURE_DETECTION := $(filter-out --~~success~~--,$(BEEGFS_FEATURE_DETECTION))
endif
# ccflags-y was introduced in 2.6.24, earlier kernels use EXTRA_CFLAGS for the same purpose
ifeq ($(origin ccflags-y),file)
ccflags-y += $(BEEGFS_FEATURE_DETECTION)
else
# the client makefile sets this already
override EXTRA_CFLAGS += $(BEEGFS_FEATURE_DETECTION)
endif
# Auto-selection of source files and corresponding target objects
BEEGFS_SOURCES := $(shell find $(obj)/../source -name '*.c')
BEEGFS_SOURCES_STRIPPED := $(subst $(obj)/, , $(BEEGFS_SOURCES) )
BEEGFS_OBJECTS := $(BEEGFS_SOURCES_STRIPPED:.c=.o)
obj-m += ${TARGET}.o
${TARGET}-y := $(BEEGFS_OBJECTS)
#
# --- kbuild part [END] ---
#
else
#
# --- Normal make part [START] ---
#
export TARGET
export OFED_INCLUDE_PATH
ifeq ($(obj),)
BEEGFS_BUILDDIR := $(shell pwd)
......@@ -57,10 +17,6 @@ else
BEEGFS_BUILDDIR := $(obj)
endif
BEEGFS_AUTOCONF_REL_PATH=source/common/net/sock/rdma_autoconf.h
BEEGFS_AUTOCONF_BUILD_REL_PATH=../$(BEEGFS_AUTOCONF_REL_PATH)
BEEGFS_AUTOCONF_BUILD_PATH=$(BEEGFS_BUILDDIR)/$(BEEGFS_AUTOCONF_BUILD_REL_PATH)
# The following section deals with the auto-detection of the kernel
# build directory (KDIR)
......@@ -69,7 +25,8 @@ BEEGFS_AUTOCONF_BUILD_PATH=$(BEEGFS_BUILDDIR)/$(BEEGFS_AUTOCONF_BUILD_REL_PATH)
# (This is usually /lib/modules/<kernelversion>/build, but you can specify
# multiple directories here as a space-separated list)
ifeq ($(KDIR),)
KDIR = /lib/modules/$(shell uname -r)/build /usr/src/linux-headers-$(shell uname -r)
KDIR = /lib/modules/$(shell uname -r)/build /usr/src/linux-headers-$(shell uname -r) \
/usr/src/kernels/$(shell uname -r)
endif
# Prune the KDIR list down to paths that exist and have an
......@@ -122,7 +79,7 @@ KMOD_INST_DIR=$(DESTDIR)/lib/modules/$(shell uname -r)/updates/fs/beegfs
# includes.)
BEEGFS_CFLAGS := $(BUILD_ARCH) $(KERNEL_FEATURE_DETECTION) \
-I$(BEEGFS_BUILDDIR)/../source \
-Wextra -Wno-unused-parameter \
-Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
-DBEEGFS_MODULE_NAME_STR='\"$(TARGET)\"'
ifeq ($(shell echo | gcc -Wtype-limits -E - >/dev/null 2>&1 && echo 1),1)
......@@ -150,17 +107,6 @@ ifneq ($(BEEGFS_OFED_1_2_API),)
BEEGFS_CFLAGS += "-DBEEGFS_OFED_1_2_API=$(BEEGFS_OFED_1_2_API)"
endif
# Note: Make sure we include OFED_INCLUDE_PATH files before the standard kernel
# include files.
ifneq ($(OFED_INCLUDE_PATH),)
BEEGFS_CFLAGS += -I$(OFED_INCLUDE_PATH)
endif
ifneq ($(OFED_LIB_PATH),)
BEEGFS_LDFLAGS += -L$(OFED_LIB_PATH)
endif
# if path to strip command was not given, use default
# (alternative strip is important when cross-compiling)
......@@ -208,26 +154,14 @@ module: $(TARGET_ALL_DEPS)
ifneq ($(OFED_INCLUDE_PATH),)
if [ -f $(OFED_INCLUDE_PATH)/../Module.symvers ]; then \
cp $(OFED_INCLUDE_PATH)/../Module.symvers . ; \
cp $(OFED_INCLUDE_PATH)/../Module.symvers Modules.symvers ; \
cp $(OFED_INCLUDE_PATH)/../Module.symvers ../source ; \
fi
endif
@ cp $(BEEGFS_AUTOCONF_BUILD_PATH).in \
$(BEEGFS_AUTOCONF_BUILD_PATH)
@ # note the "/" in ${OFED_INCLUDE_PATH}/! Therefore the if-condition.
@ if [ -n "${OFED_INCLUDE_PATH}" ]; then \
sed -i -e 's#__OFED_INCLUDE_PATH__#${OFED_INCLUDE_PATH}/#g' \
$(BEEGFS_AUTOCONF_BUILD_PATH); \
else \
sed -i -e 's#__OFED_INCLUDE_PATH__##g' \
$(BEEGFS_AUTOCONF_BUILD_PATH); \
fi
$(MAKE) -C $(KDIR_PRUNED_HEAD) "SUBDIRS=$(BEEGFS_BUILDDIR)" \
"EXTRA_CFLAGS=$(BEEGFS_CFLAGS) $(EXTRA_CFLAGS)" modules
$(MAKE) -C $(KDIR_PRUNED_HEAD) "SUBDIRS=$(BEEGFS_BUILDDIR)/../source" \
"EXTRA_CFLAGS=$(BEEGFS_CFLAGS) $(EXTRA_CFLAGS)" modules
@cp ../source/$(TARGET).ko .
@ cp ${TARGET}.ko ${TARGET}-unstripped.ko
@ ${STRIP} --strip-debug ${TARGET}.ko;
......@@ -253,7 +187,7 @@ ifeq ($(BEEGFS_VERSION_CODE),)
endif
@ echo "Creating release directory:" $(RELEASE_PATH_CLIENT)
mkdir --parents $(RELEASE_PATH_CLIENT)/build
mkdir --parents $(RELEASE_PATH_CLIENT)/build $(RELEASE_PATH_CLIENT)/source
@ echo "Storing beegfs version:" $(BEEGFS_VERSION)
echo "BEEGFS_VERSION =" $(BEEGFS_VERSION) > $(RELEASE_PATH_CLIENT)/build/Version.mk
......@@ -264,13 +198,7 @@ endif
cp KernelFeatureDetection.mk $(RELEASE_PATH_CLIENT)/build/
cp AutoRebuild.mk $(RELEASE_PATH_CLIENT)/build/
cp feature-detect.sh $(RELEASE_PATH_CLIENT)/build/
mkdir --parents $(RELEASE_PATH_CLIENT)/source/common/net/sock
cp $(BEEGFS_AUTOCONF_BUILD_PATH).in \
$(RELEASE_PATH_CLIENT)/$(BEEGFS_AUTOCONF_REL_PATH).in
# make sure we don't add autoconf.h to packages
rm -f $(BEEGFS_AUTOCONF_BUILD_PATH)
cp ../source/Makefile $(RELEASE_PATH_CLIENT)/source/
find ../source -mount -name '*.h' -type f | \
xargs -I ’{}’ cp --parents ’{}’ $(RELEASE_PATH_CLIENT)/build
......@@ -284,14 +212,13 @@ install:
clean:
rm -f *~ .${TARGET}??*
rm -f .*.cmd *.mod.c *.mod.o *.o *.ko *.ko.unsigned
rm -f Module*.symvers modules.order Module.markers
rm -f ../source/Module*.symvers ../source/modules.order ../source/Module.markers
rm -f $(AUTO_REBUILD_KVER_FILE)
rm -rf .tmp_versions/
find ../source/ -mount -name '*.o' -type f -delete
find ../source/ -mount -name '.*.o.cmd' -type f -delete
find ../source/ -mount -name '.*.o.d' -type f -delete
find ../source/ -mount -name '*.gcno' -type f -delete
rm -f $(BEEGFS_AUTOCONF_BUILD_REL_PATH)
rpm:
./make-rpm
......@@ -334,9 +261,3 @@ help:
@echo ' prepare_release - build and copy files into the RELEASE_PATH directory'
@echo ' rpm - create a rpm package file'
@echo ' deb - build debian package file'
#
# --- Normal make part [END] ---
#
endif
......@@ -5,49 +5,8 @@
TARGET ?= beegfs
ifneq ($(KERNELRELEASE),)
#
# --- kbuild part [START] ---
#
BEEGFS_FEATURE_DETECTION := $(shell $(dir $(lastword $(MAKEFILE_LIST)))/feature-detect.sh)
ifneq ($(lastword $(BEEGFS_FEATURE_DETECTION)),--~~success~~--)
$(error feature detection reported an error)
else
BEEGFS_FEATURE_DETECTION := $(filter-out --~~success~~--,$(BEEGFS_FEATURE_DETECTION))
endif
# ccflags-y was introduced in 2.6.24, earlier kernels use EXTRA_CFLAGS for the same purpose
ifeq ($(origin ccflags-y),file)
ccflags-y += $(BEEGFS_FEATURE_DETECTION)
else
# the client makefile sets this already
override EXTRA_CFLAGS += $(BEEGFS_FEATURE_DETECTION)
endif
# Auto-selection of source files and corresponding target objects
BEEGFS_SOURCES := $(shell find $(obj)/../source -name '*.c')
BEEGFS_SOURCES_STRIPPED := $(subst $(obj)/, , $(BEEGFS_SOURCES) )
BEEGFS_OBJECTS := $(BEEGFS_SOURCES_STRIPPED:.c=.o)
obj-m += ${TARGET}.o
${TARGET}-y := $(BEEGFS_OBJECTS)
#
# --- kbuild part [END] ---
#
else
#
# --- Normal make part [START] ---
#
export TARGET
export OFED_INCLUDE_PATH
ifeq ($(obj),)
BEEGFS_BUILDDIR := $(shell pwd)
......@@ -55,10 +14,6 @@ else
BEEGFS_BUILDDIR := $(obj)
endif
BEEGFS_AUTOCONF_REL_PATH=source/common/net/sock/rdma_autoconf.h
BEEGFS_AUTOCONF_BUILD_REL_PATH=../$(BEEGFS_AUTOCONF_REL_PATH)
BEEGFS_AUTOCONF_BUILD_PATH=$(BEEGFS_BUILDDIR)/$(BEEGFS_AUTOCONF_BUILD_REL_PATH)
# The following section deals with the auto-detection of the kernel
# build directory (KDIR)
......@@ -67,7 +22,8 @@ BEEGFS_AUTOCONF_BUILD_PATH=$(BEEGFS_BUILDDIR)/$(BEEGFS_AUTOCONF_BUILD_REL_PATH)
# (This is usually /lib/modules/<kernelversion>/build, but you can specify
# multiple directories here as a space-separated list)
ifeq ($(KDIR),)
KDIR = /lib/modules/$(shell uname -r)/build /usr/src/linux-headers-$(shell uname -r)
KDIR = /lib/modules/$(shell uname -r)/build /usr/src/linux-headers-$(shell uname -r) \
/usr/src/kernels/$(shell uname -r)
endif
# Prune the KDIR list down to paths that exist and have an
......@@ -145,17 +101,6 @@ ifneq ($(BEEGFS_OFED_1_2_API),)
BEEGFS_CFLAGS += "-DBEEGFS_OFED_1_2_API=$(BEEGFS_OFED_1_2_API)"
endif
# Note: Make sure we include OFED_INCLUDE_PATH files before the standard kernel
# include files.
ifneq ($(OFED_INCLUDE_PATH),)
BEEGFS_CFLAGS += -I$(OFED_INCLUDE_PATH)
endif
ifneq ($(OFED_LIB_PATH),)
BEEGFS_LDFLAGS += -L$(OFED_LIB_PATH)
endif
# if path to strip command was not given, use default
# (alternative strip is important when cross-compiling)
......@@ -184,28 +129,15 @@ endif
ifneq ($(OFED_INCLUDE_PATH),)
if [ -f $(OFED_INCLUDE_PATH)/../Module.symvers ]; then \
cp $(OFED_INCLUDE_PATH)/../Module.symvers . ; \
cp $(OFED_INCLUDE_PATH)/../Module.symvers Modules.symvers ; \
cp $(OFED_INCLUDE_PATH)/../Module.symvers ../source ; \
fi
endif
@ cp $(BEEGFS_AUTOCONF_BUILD_PATH).in \
$(BEEGFS_AUTOCONF_BUILD_PATH)
@ # note the "/" in ${OFED_INCLUDE_PATH}/! Therefore the if-condition.
@ if [ -n "${OFED_INCLUDE_PATH}" ]; then \
sed -i -e 's#__OFED_INCLUDE_PATH__#${OFED_INCLUDE_PATH}/#g' \
$(BEEGFS_AUTOCONF_BUILD_PATH); \
else \
sed -i -e 's#__OFED_INCLUDE_PATH__##g' \
$(BEEGFS_AUTOCONF_BUILD_PATH); \
fi
@echo "Building beegfs client module"
$(MAKE) -C $(KDIR_PRUNED_HEAD) SUBDIRS=$(BEEGFS_BUILDDIR) \
$(MAKE) -C $(KDIR_PRUNED_HEAD) SUBDIRS=$(BEEGFS_BUILDDIR)/../source \
"EXTRA_CFLAGS=$(BEEGFS_CFLAGS)" modules
@cp ../source/$(TARGET).ko .
@ cp ${TARGET}.ko ${TARGET}-unstripped.ko
@ ${STRIP} --strip-debug ${TARGET}.ko
......@@ -253,9 +185,3 @@ help:
@echo ' BEEGFS_OFED_1_2_API={1,2}:'
@echo ' Defining this enables OFED 1.2.0 ibverbs API compatibility.'
@echo ' (If not defined, OFED 1.2.5 or higher API will be used.)'
#
# --- Normal make part [END] ---
#
endif
......@@ -123,8 +123,11 @@ install -D dist/sbin/beegfs-setup-client \
%post
if [ "$1" = 1 ]
then
initType=$(pidof systemd >/dev/null && echo "systemd" || echo "sysvinit")
if [ "$initType" = "systemd" ]
output=$(systemctl is-system-running 2> /dev/null)
if [ "$?" == 127 ]
then
chkconfig %NAME% on
elif [ "$?" == 0 ] || ( [ "$output" != "offline" ] && [ "$output" != "unknown" ] )
then
systemctl enable %NAME%.service
else
......@@ -144,8 +147,11 @@ make -C %{CLIENT_DIR}/build/ clean --silent || true
# (package removal and not upgrade)
if [ "$1" = 0 ]
then
initType=$(pidof systemd >/dev/null && echo "systemd" || echo "sysvinit")
if [ "$initType" = "systemd" ]
output=$(systemctl is-system-running 2> /dev/null)
if [ "$?" == 127 ]
then
chkconfig %NAME% off
elif [ "$?" == 0 ] || ( [ "$output" != "offline" ] && [ "$output" != "unknown" ] )
then
systemctl disable %NAME%.service
else
......
......@@ -19,14 +19,17 @@
# $ make help -C /opt/beegfs/src/client/beegfs_client_module_2015.03/build
# Infiniband Notes
# ================
# If you want to build with native Infiniband support, add
# RDMA Support Notes
# ==================
# If you want to build BeeGFS with RDMA support based on ibverbs for InfiniBand,
# RDMA over converged Ethernet (RoCE) or Omni-Path, add
# "BEEGFS_OPENTK_IBVERBS=1" to the "buildArgs" below.
#
# If you installed IB kernel modules from OFED, then also define the
# correspsonding include path by adding "OFED_INCLUDE_PATH=<path>" to the
# "buildArgs" (where <path> is usually "/usr/src/openib/include").
# If you installed InfiniBand kernel modules from OpenFabrics OFED, then also
# define the correspsonding header include path by adding
# "OFED_INCLUDE_PATH=<path>" to the "buildArgs", where <path> usually is
# "/usr/src/openib/include" or "/usr/src/ofa_kernel/default/include" for
# Mellanox OFED.
#
......@@ -43,7 +46,7 @@
# Example1:
# buildArgs=-j8 BEEGFS_OPENTK_IBVERBS=1
#
# Example2 (see Infiniband notes above):
# Example2 (see "RDMA Support Notes" above):
# buildArgs=-j8 BEEGFS_OPENTK_IBVERBS=1 OFED_INCLUDE_PATH=/usr/src/openib/include
#
# Default:
......
BEEGFS_FEATURE_DETECTION := $(shell $(dir $(lastword $(MAKEFILE_LIST)))/../build/feature-detect.sh)
ifneq ($(lastword $(BEEGFS_FEATURE_DETECTION)),--~~success~~--)
$(error feature detection reported an error)
else
BEEGFS_FEATURE_DETECTION := $(filter-out --~~success~~--,$(BEEGFS_FEATURE_DETECTION))
endif
# ccflags-y was introduced in 2.6.24, earlier kernels use EXTRA_CFLAGS for the same purpose
ifeq ($(origin ccflags-y),file)
ccflags-y += $(BEEGFS_FEATURE_DETECTION)
else
# the client makefile sets this already
override EXTRA_CFLAGS += $(BEEGFS_FEATURE_DETECTION)
endif
obj-m += ${TARGET}.o
SOURCES := \
fault-inject/fault-inject.c \
os/atomic64.c \
os/OsCompat.c \
os/OsDeps.c \
net/message/NetMessageFactory.c \
net/filesystem/FhgfsOpsCommKit.c \
net/filesystem/FhgfsOpsRemoting.c \
net/filesystem/FhgfsOpsCommKitVec.c \
common/system/System.c \
common/net/sock/Socket.c \
common/net/sock/NicAddress.c \
common/net/sock/NetworkInterfaceCard.c \
common/net/sock/RDMASocket.c \
common/net/sock/ibv/IBVSocket.c \
common/net/sock/ibv/IBVBuffer.c \
common/net/sock/ibv/No_IBVSocket.c \
common/net/sock/StandardSocket.c \
common/net/message/control/PeerInfoMsg.c \
common/net/message/control/AckMsgEx.c \
common/net/message/helperd/GetHostByNameMsg.c \
common/net/message/helperd/LogMsg.c \
common/net/message/helperd/GetHostByNameRespMsg.c \
common/net/message/SimpleIntMsg.c \
common/net/message/NetMessage.c \
common/net/message/session/locking/FLockEntryMsg.c \
common/net/message/session/locking/FLockAppendMsg.c \
common/net/message/session/locking/LockGrantedMsgEx.c \
common/net/message/session/locking/FLockRangeMsg.c \
common/net/message/session/GetFileVersionRespMsg.c \
common/net/message/session/rw/ReadLocalFileV2Msg.c \
common/net/message/session/rw/WriteLocalFileMsg.c \
common/net/message/session/FSyncLocalFileMsg.c \
common/net/message/session/GetFileVersionMsg.c \
common/net/message/session/opening/OpenFileMsg.c \
common/net/message/session/opening/OpenFileRespMsg.c \
common/net/message/session/opening/CloseFileMsg.c \
common/net/message/session/BumpFileVersion.c \
common/net/message/SimpleInt64Msg.c \
common/net/message/SimpleUInt16Msg.c \
common/net/message/SimpleStringMsg.c \
common/net/message/SimpleIntStringMsg.c \
common/net/message/nodes/RegisterNodeMsg.c \
common/net/message/nodes/RegisterNodeRespMsg.c \
common/net/message/nodes/HeartbeatRequestMsgEx.c \
common/net/message/nodes/MapTargetsMsgEx.c \
common/net/message/nodes/GetMirrorBuddyGroupsRespMsg.c \
common/net/message/nodes/GetTargetMappingsRespMsg.c \
common/net/message/nodes/HeartbeatMsgEx.c \
common/net/message/nodes/RemoveNodeMsgEx.c \
common/net/message/nodes/GetStatesAndBuddyGroupsRespMsg.c \
common/net/message/nodes/GetTargetStatesRespMsg.c \
common/net/message/nodes/RefreshTargetStatesMsgEx.c \
common/net/message/nodes/GetNodesRespMsg.c \
common/net/message/nodes/SetMirrorBuddyGroupMsgEx.c \
common/net/message/SimpleMsg.c \
common/net/message/storage/moving/RenameMsg.c \
common/net/message/storage/StatStoragePathRespMsg.c \
common/net/message/storage/creating/HardlinkMsg.c \
common/net/message/storage/creating/MkFileMsg.c \
common/net/message/storage/creating/MkDirMsg.c \
common/net/message/storage/creating/UnlinkFileMsg.c \
common/net/message/storage/creating/MkDirRespMsg.c \
common/net/message/storage/creating/RmDirMsg.c \
common/net/message/storage/creating/MkFileRespMsg.c \
common/net/message/storage/attribs/StatRespMsg.c \
common/net/message/storage/attribs/ListXAttrRespMsg.c \
common/net/message/storage/attribs/SetAttrMsg.c \
common/net/message/storage/attribs/ListXAttrMsg.c \
common/net/message/storage/attribs/RefreshEntryInfoMsg.c \
common/net/message/storage/attribs/StatMsg.c \
common/net/message/storage/attribs/GetXAttrRespMsg.c \
common/net/message/storage/attribs/GetXAttrMsg.c \
common/net/message/storage/attribs/RemoveXAttrMsg.c \
common/net/message/storage/attribs/SetXAttrMsg.c \
common/net/message/storage/lookup/LookupIntentRespMsg.c \
common/net/message/storage/lookup/LookupIntentMsg.c \
common/net/message/storage/TruncFileMsg.c \
common/net/message/storage/listing/ListDirFromOffsetRespMsg.c \
common/net/message/storage/listing/ListDirFromOffsetMsg.c \
common/threading/Thread.c \
common/toolkit/Serialization.c \
common/toolkit/MessagingTk.c \
common/toolkit/HashTk.c \
common/toolkit/ackstore/WaitAckMap.c \
common/toolkit/ackstore/AcknowledgmentStore.c \
common/toolkit/ackstore/AckStoreMap.c \
common/toolkit/Random.c \
common/toolkit/tree/IntMap.c \
common/toolkit/tree/StrCpyMap.c \
common/toolkit/tree/TargetStateInfoMap.c \
common/toolkit/tree/TargetNodeMap.c \
common/toolkit/tree/PointerRBTree.c \
common/toolkit/tree/MirrorBuddyGroupMap.c \
common/toolkit/tree/UInt16Map.c \
common/toolkit/NodesTk.c \
common/toolkit/SocketTk.c \
common/toolkit/MetadataTk.c \
common/toolkit/TimeAbs.c \
common/toolkit/StringTk.c \
common/toolkit/ListTk.c \
common/nodes/Node.c \
common/nodes/TargetMapper.c \
common/nodes/MirrorBuddyGroup.c \
common/nodes/NumNodeID.c \
common/nodes/TargetStateStore.c \
common/nodes/NodeTree.c \
common/nodes/MirrorBuddyGroupMapper.c \
common/nodes/NodeConnPool.c \
common/storage/StorageErrors.c \
common/storage/StatData.c \
common/storage/striping/BuddyMirrorPattern.c \
common/storage/striping/SimplePattern.c \
common/storage/striping/StripePattern.c \
common/storage/striping/Raid10Pattern.c \
common/storage/striping/Raid0Pattern.c \
common/storage/PathInfo.c \
common/storage/EntryInfo.c \
program/Main.c \
toolkit/FhgfsChunkPageVec.c \
toolkit/StatFsCache.c \
toolkit/NoAllocBufferStore.c \
toolkit/InodeRefStore.c \
toolkit/ExternalHelperd.c \
toolkit/BitStore.c \
components/DatagramListener.c \
components/InternodeSyncer.c \
components/Flusher.c \
components/worker/RWPagesWork.c \
components/AckManager.c \
nodes/NodeStoreEx.c \
filesystem/ProcFs.c \
filesystem/FhgfsOpsPages.c \
filesystem/FhgfsOpsFile.c \
filesystem/FhgfsOpsInode.c \
filesystem/FhgfsOpsFileNative.c \
filesystem/FhgfsInode.c \
filesystem/helper/IoctlHelper.c \
filesystem/FsFileInfo.c \
filesystem/ProcFsHelper.c \
filesystem/FhgfsOpsSuper.c \
filesystem/FhgfsOps_versions.c \
filesystem/FhgfsXAttrHandlers.c \
filesystem/FhgfsOpsDir.c \
filesystem/FhgfsOpsIoctl.c \
filesystem/FhgfsOpsExport.c \
filesystem/FhgfsOpsHelper.c \
app/App.c \
app/log/Logger.c \
app/config/MountConfig.c \
app/config/Config.c
${TARGET}-y := $(patsubst %.c,%.o,$(SOURCES))
ifneq ($(OFED_INCLUDE_PATH),)
ifeq ($(shell [ -f $(OFED_INCLUDE_PATH)/linux/compat-2.6.h ] && echo 1),1)
$(src)/common/net/sock/ibv/IBVSocket.o: CC+=-include $(OFED_INCLUDE_PATH)/linux/compat-2.6.h
$(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)
endif
......@@ -12,4 +12,5 @@ const struct NetMessageOps BumpFileVersionMsg_Ops = {
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
.supportsSequenceNumbers = true,
};
......@@ -6,6 +6,7 @@ const struct NetMessageOps FLockEntryMsg_Ops = {
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
.supportsSequenceNumbers = true,
};
void FLockEntryMsg_serializePayload(NetMessage* this, SerializeCtx* ctx)
......
......@@ -6,6 +6,7 @@ const struct NetMessageOps FLockRangeMsg_Ops = {
.deserializePayload = _NetMessage_deserializeDummy,
.processIncoming = NetMessage_processIncoming,
.getSupportedHeaderFeatureFlagsMask = NetMessage_getSupportedHeaderFeatureFlagsMask,
.supportsSequenceNumbers = true,
};
void FLockRangeMsg_serializePayload(NetMessage* this, SerializeCtx* ctx)
......
#ifndef IBVBuffer_h_aMQFNfzrjbEHDOcv216fi
#define IBVBuffer_h_aMQFNfzrjbEHDOcv216fi
#include <common/net/sock/rdma_autoconf.h>
#ifdef BEEGFS_OPENTK_IBVERBS
#include <rdma/ib_verbs.h>
#include <rdma/rdma_cm.h>
#include <rdma/ib_cm.h>
#include <common/Common.h>
#include <os/iov_iter.h>
......
......@@ -13,6 +13,8 @@
#include <linux/poll.h>
#include <linux/socket.h>
#include <rdma/ib_verbs.h>
#include <rdma/rdma_cm.h>
#include <rdma/ib_cm.h>
#define IBVSOCKET_CONN_TIMEOUT_MS 5000
......
#ifndef OPENTK_IBVSOCKET_H_
#define OPENTK_IBVSOCKET_H_
#include <common/net/sock/rdma_autoconf.h>
#include <common/net/sock/ibv/IBVBuffer.h>
#include <common/Common.h>
......
/*
* __OFED_INCLUDE_PATH__ is replaced in Makefile by sed
* by the given OFED_INCLUDE_PATH (shell).
*/
#ifdef BEEGFS_OPENTK_IBVERBS
#include <__OFED_INCLUDE_PATH__rdma/ib_verbs.h>
#include <__OFED_INCLUDE_PATH__rdma/rdma_cm.h>
#include <__OFED_INCLUDE_PATH__rdma/ib_cm.h>
#endif // BEEGFS_OPENTK_IBVERBS
......@@ -134,9 +134,6 @@ Socket* NodeConnPool_acquireStreamSocketEx(NodeConnPool* this, bool allowWaiting
bool isPrimaryInterface = true; // used to set expiration for non-primary interfaces;
// "primary" means: first interface in the list that is supported by client and server
if(unlikely(Thread_isSignalPending() ) )
return NULL; // no need to try if a signal is pending
Mutex_lock(&this->mutex); // L O C K
if(!this->availableConns && (this->establishedConns == this->maxConns) )
......
......@@ -695,6 +695,15 @@ FhgfsOpsErr __MessagingTk_requestResponseWithRRArgsComm(App* app,
// got response => deserialize it
rrArgs->outRespMsg = NetMessageFactory_createFromBuf(app, rrArgs->outRespBuf, respRes);
if (unlikely(rrArgs->outRespMsg->msgHeader.msgType == NETMSGTYPE_AckNotifyResp))
{
/* a failover happened before the primary could send a negative response to us, and the
* secondary has already received word about the failed operation. treat this case like a
* communication error and retry the message with a new sequence number. */
*wasIndirectCommErr = true;
goto socket_invalidate;
}
if(unlikely(NetMessage_getMsgType(rrArgs->outRespMsg) == NETMSGTYPE_GenericResponse) )
{ // special control msg received
retVal = __MessagingTk_handleGenericResponse(app, rrArgs, group, wasIndirectCommErr);
......
......@@ -1539,7 +1539,8 @@ int FhgfsOps_link(struct dentry* fromFileDentry, struct inode* toDirInode,
"From: %s; To: %s", fromFileName, toFileName);
FhgfsInode_entryInfoReadLock(fhgfsFromDirInode); // LOCK EntryInfo
FhgfsInode_entryInfoReadLock(fhgfsToDirInode); // LOCK EntryInfo
if (fhgfsFromDirInode != fhgfsToDirInode)
FhgfsInode_entryInfoReadLock(fhgfsToDirInode); // LOCK EntryInfo
FhgfsInode_entryInfoReadLock(fhgfsFileInode); // LOCK EntryInfo
fromDirInfo = FhgfsInode_getEntryInfo(fhgfsFromDirInode);
......@@ -1596,7 +1597,8 @@ int FhgfsOps_link(struct dentry* fromFileDentry, struct inode* toDirInode,
}
FhgfsInode_entryInfoReadUnlock(fhgfsFileInode); // UNLOCK fromFileInfo
FhgfsInode_entryInfoReadUnlock(fhgfsToDirInode); // UNLOCK toDirInfo
if (fhgfsFromDirInode != fhgfsToDirInode)
FhgfsInode_entryInfoReadUnlock(fhgfsToDirInode); // UNLOCK toDirInfo
FhgfsInode_entryInfoReadUnlock(fhgfsFromDirInode); // UNLOCK fromDirInfo
#if 0 // TODO: Re-add here once we support inter directory hard-links
......@@ -1612,7 +1614,8 @@ int FhgfsOps_link(struct dentry* fromFileDentry, struct inode* toDirInode,
#endif
FhgfsInode_invalidateCache(fhgfsFileInode);
FhgfsInode_invalidateCache(fhgfsToDirInode);
if (fhgfsFromDirInode != fhgfsToDirInode)
FhgfsInode_invalidateCache(fhgfsToDirInode);
FhgfsInode_invalidateCache(fhgfsFromDirInode);
return retVal;
......
......@@ -216,6 +216,7 @@ static long FhgfsOpsIoctl_getRuntimeCfgFile(struct file *file, void __user *argp
if(!access_ok(VERIFY_WRITE, confFile, sizeof(*confFile) ) )
{
Logger_logFormatted(log, Log_DEBUG, logContext, "access_ok() denied to write to conf_file");
vfree(fileName);
return -EINVAL;
}