mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
42
Makefile
42
Makefile
@@ -54,15 +54,6 @@ EMULEX_DIR=emulex
|
||||
|
||||
ISCSI_DIR=iscsi-scst
|
||||
|
||||
# Set variable $(2) to value $(3) in file $(1) if $(2)=$(3) does not yet occur
|
||||
# in file $(1).
|
||||
set_var = $(shell if grep -q '^$(2)=' '$(1)'; then \
|
||||
grep -q '^$(2)=$(3)$$' '$(1)' || \
|
||||
sed -i 's/^$(2)=.*/$(2)=$(3)/' '$(1)'; \
|
||||
else \
|
||||
echo '$(2)=$(3)' >> '$(1)'; \
|
||||
fi)
|
||||
|
||||
REVISION ?= $(shell if [ -e .svn ]; then \
|
||||
svn info | sed -n 's/^Revision:[[:blank:]]*/./p'; \
|
||||
elif [ -e .git ]; then \
|
||||
@@ -552,41 +543,14 @@ release-archive:
|
||||
done
|
||||
$(MAKE) 2debug
|
||||
|
||||
2perf: extraclean
|
||||
$(call set_var,build_mode,BUILD_MODE,PERF)
|
||||
2perf:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
|
||||
|
||||
2release: extraclean
|
||||
$(call set_var,build_mode,BUILD_MODE,RELEASE)
|
||||
2release:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
|
||||
|
||||
2debug: extraclean
|
||||
$(call set_var,build_mode,BUILD_MODE,)
|
||||
2debug:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
|
||||
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
|
||||
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
|
||||
|
||||
.PHONY: all install uninstall clean extraclean tags help \
|
||||
qla qla_install qla_uninstall qla_clean qla_extraclean \
|
||||
|
||||
@@ -100,17 +100,7 @@ clean:
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive fcst "$$(sed -n 's/^#define[[:blank:]]FT_VERSION[[:blank:]]*\"\([^\"]*\)\".*/\1/p' fcst.h)"
|
||||
|
||||
.PHONY: all tgt install uninstall clean extraclean 2debug 2release 2perf \
|
||||
release-archive
|
||||
.PHONY: all tgt install uninstall clean extraclean release-archive
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../build_mode
|
||||
|
||||
echo := $(shell echo "fcst build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DDEBUG_WORK_IN_THREAD -DCONFIG_SCST_TRACING \
|
||||
-DCONFIG_SCST_DEBUG -DCONFIG_SCST_EXTRACHECKS \
|
||||
-fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += -I$(KBUILD_EXTMOD)/../scst/include
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_FCST) += fcst.o
|
||||
|
||||
@@ -299,16 +299,7 @@ conftest/use_pre_440_wr_structure/result-$(KVER).txt: \
|
||||
echo "$(call run_conftest,use_pre_440_wr_structure, \
|
||||
-DUSE_PRE_440_WR_STRUCTURE)" >"$@"
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive iscsi-scst "$$(sed -n 's/^#define[[:blank:]]ISCSI_VERSION_STRING[[:blank:]]*\"\([^\"]*\)\".*/\1/p' include/iscsi_scst_ver.h)"
|
||||
|
||||
.PHONY: all mods progs install clean extraclean 2release 2debug 2perf
|
||||
.PHONY: all mods progs install clean extraclean
|
||||
|
||||
@@ -27,18 +27,6 @@ ccflags-y += $(call cc-option,-Wextra) \
|
||||
ccflags-y += $(PRE_CFLAGS)
|
||||
#ccflags-y += -DCONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../build_mode
|
||||
|
||||
echo := $(shell echo "iscsi-scst build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
obj-m += iscsi-scst.o
|
||||
iscsi-scst-objs := iscsi.o nthread.o config.o digest.o \
|
||||
conn.o session.o target.o event.o param.o \
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
#ifndef ISCSI_TRACE_FLAG_H
|
||||
#define ISCSI_TRACE_FLAG_H
|
||||
|
||||
#ifndef INSIDE_KERNEL_TREE
|
||||
#include "build_mode.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Only include this header file from iscsi-scst source files and not from
|
||||
* isert-scst source files.
|
||||
|
||||
@@ -26,18 +26,6 @@ ccflags-y += $(call cc-option,-Wextra) \
|
||||
$(call cc-option,-Wno-old-style-declaration) \
|
||||
-Wno-unused-parameter -Wno-missing-field-initializers
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../../build_mode
|
||||
|
||||
echo := $(shell echo "isert-scst build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
obj-m += isert-scst.o
|
||||
isert-scst-objs := isert.o isert_login.o \
|
||||
iser_datamover.o iser_rdma.o iser_buf.o iser_pdu.o iser_global.o
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
ABT_DETAILS="x86_64"
|
||||
ABT_JOBS=5
|
||||
ABT_KERNELS=" \
|
||||
5.0.12 \
|
||||
5.0.13 \
|
||||
4.20.17-nc \
|
||||
4.19.39-nc \
|
||||
4.19.40-nc \
|
||||
4.18.18-nc \
|
||||
4.17.18-nc \
|
||||
4.16.18-nc \
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../build_mode
|
||||
|
||||
echo := $(shell echo "qla2x00t-32gbit build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
|
||||
qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
|
||||
qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_nvme.o
|
||||
|
||||
@@ -65,18 +65,6 @@ ccflags-y += -W -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../build_mode
|
||||
|
||||
echo := $(shell echo "qla2x00t-32gbit/target build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=y
|
||||
endif
|
||||
@@ -147,13 +135,4 @@ clean:
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
.PHONY: all tgt install uninstall clean extraclean 2perf 2release 2debug qla2xxx_scst
|
||||
.PHONY: all tgt install uninstall clean extraclean qla2xxx_scst
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/backport.h>
|
||||
#else
|
||||
#include "build_mode.h"
|
||||
#include "backport.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/backport.h> /* timer_setup() */
|
||||
#else
|
||||
#include "build_mode.h"
|
||||
#include "backport.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -64,18 +64,6 @@ ccflags-y += -W -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
|
||||
#ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../build_mode
|
||||
|
||||
echo := $(shell echo "qla2x00t build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_2X_MODULE),)
|
||||
ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=y
|
||||
endif
|
||||
@@ -146,13 +134,4 @@ clean:
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
.PHONY: all tgt install uninstall clean extraclean 2perf 2release 2debug qla2xxx_scst
|
||||
.PHONY: all tgt install uninstall clean extraclean qla2xxx_scst
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/backport.h> /* timer_setup() */
|
||||
#else
|
||||
#include "build_mode.h"
|
||||
#include "backport.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -632,6 +632,7 @@ BEGIN {
|
||||
|
||||
if (!process_file)
|
||||
{
|
||||
sub("^+#ifdef INSIDE_KERNEL_TREE$", "+#if 1")
|
||||
print
|
||||
next
|
||||
}
|
||||
|
||||
@@ -23,10 +23,19 @@ SHELL=/bin/bash
|
||||
|
||||
SCST_DIR=src
|
||||
|
||||
all:
|
||||
# Set variable $(2) to value $(3) in file $(1) if $(2)=$(3) does not yet occur
|
||||
# in file $(1).
|
||||
set_var = $(shell if grep -q '^$(2)=' '$(1)' 2>/dev/null; then \
|
||||
grep -q '^$(2)=$(3)$$' '$(1)' || \
|
||||
sed -i 's/^$(2)=.*/$(2)=$(3)/' '$(1)'; \
|
||||
else \
|
||||
echo '$(2)=$(3)' >> '$(1)'; \
|
||||
fi)
|
||||
|
||||
all: include/build_mode.h
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
install:
|
||||
install: include/build_mode.h
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
uninstall:
|
||||
@@ -38,19 +47,44 @@ clean:
|
||||
extraclean:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
2release:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
|
||||
2debug:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
$(call set_var,build_mode,BUILD_MODE,)
|
||||
|
||||
2release:
|
||||
$(call set_var,build_mode,BUILD_MODE,RELEASE)
|
||||
|
||||
2perf:
|
||||
cd $(SCST_DIR) && $(MAKE) $@
|
||||
$(call set_var,build_mode,BUILD_MODE,PERF)
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive scst \
|
||||
"$$(sed -n 's/^#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^\"]*\)\".*/\1/p' include/scst_const.h)" \
|
||||
|
||||
build_mode:
|
||||
$(call set_var,build_mode,BUILD_MODE,)
|
||||
|
||||
include/build_mode.h: build_mode
|
||||
@rm -f $@.tmp; \
|
||||
touch $@.tmp; \
|
||||
source build_mode; \
|
||||
case "$${BUILD_MODE}" in \
|
||||
"") defines="CONFIG_SCST_TRACING CONFIG_SCST_DEBUG \
|
||||
CONFIG_SCST_EXTRACHECKS";; \
|
||||
RELEASE) defines=CONFIG_SCST_TRACING;; \
|
||||
PERF) defines="";; \
|
||||
*) echo "Error: unsupported build mode $$(<build_mode)"; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
echo "defines=$$defines"; \
|
||||
for d in $$defines; do \
|
||||
echo "#define $$d" >>$@.tmp; \
|
||||
done; \
|
||||
if [ ! -e $@ ] || ! diff -q $@.tmp $@ >&/dev/null; then \
|
||||
mv $@.tmp $@; \
|
||||
else \
|
||||
rm -f $@.tmp; \
|
||||
fi
|
||||
|
||||
help:
|
||||
@echo " all (the default) : make all"
|
||||
@echo " clean : clean files"
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <scst/backport.h>
|
||||
#include <scst/scst_const.h>
|
||||
#else
|
||||
#include <build_mode.h>
|
||||
#include <backport.h>
|
||||
#include <scst_const.h>
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/backport.h>
|
||||
#else
|
||||
#include <build_mode.h>
|
||||
#include <backport.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,18 +55,6 @@ ccflags-y += -I$(KBUILD_EXTMOD)/../include $(call cc-option,-Wextra) \
|
||||
# enable it if you have strict security requirements.
|
||||
#ccflags-y += -DSCST_STRICT_SECURITY
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../build_mode
|
||||
|
||||
echo := $(shell echo "scst build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
obj-m := scst.o
|
||||
|
||||
scst-y += scst_main.o
|
||||
@@ -192,13 +180,4 @@ extraclean: clean
|
||||
cd $(DEV_HANDLERS_DIR) && $(MAKE) $@
|
||||
rm -f *.orig *.rej
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
.PHONY: all install uninstall clean extraclean 2release 2debug 2perf
|
||||
.PHONY: all install uninstall clean extraclean
|
||||
|
||||
@@ -35,18 +35,6 @@ ccflags-y += -I$(KBUILD_EXTMOD)/../include \
|
||||
-Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
|
||||
#ccflags-y += -DCONFIG_DEBUG_EXT_COPY_REMAP
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../build_mode
|
||||
|
||||
echo := $(shell echo "dev_handlers build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
obj-m := scst_cdrom.o scst_changer.o scst_disk.o scst_modisk.o scst_tape.o \
|
||||
scst_vdisk.o scst_raid.o scst_processor.o scst_user.o
|
||||
|
||||
@@ -95,13 +83,4 @@ clean:
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
.PHONY: all install uninstall clean extraclean 2release 2debug 2perf
|
||||
.PHONY: all install uninstall clean extraclean
|
||||
|
||||
@@ -1794,7 +1794,11 @@ static int vdisk_unmap_file_range(struct scst_cmd *cmd,
|
||||
|
||||
res = fd->f_op->fallocate(fd,
|
||||
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, off, len);
|
||||
if (unlikely(res != 0)) {
|
||||
if (unlikely(res == -EOPNOTSUPP)) {
|
||||
PRINT_WARNING_ONCE("%s: fallocate() is not supported by the filesystem. Consider setting 'thin_provisioned' to 0 in scst.conf for %s.\n",
|
||||
virt_dev->name, virt_dev->name);
|
||||
res = 0;
|
||||
} else if (unlikely(res != 0)) {
|
||||
PRINT_WARNING_ONCE("fallocate() for %lld, len %lld "
|
||||
"failed: %d", (unsigned long long)off,
|
||||
(unsigned long long)len, res);
|
||||
|
||||
@@ -13,18 +13,6 @@ ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter\
|
||||
|
||||
#ccflags-y += -DCONFIG_SCST_LOCAL_DIRECT_PROCESSING
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../build_mode
|
||||
|
||||
echo := $(shell echo "scst_local build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
obj-m := scst_local.o
|
||||
else
|
||||
######### BEGIN OUT-OF-TREE RULES #########
|
||||
@@ -84,17 +72,8 @@ clean:
|
||||
extraclean: clean
|
||||
rm -f *.orig *.rej
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive scst_local "$$(sed -n 's/^#define[[:blank:]]SCST_LOCAL_VERSION[[:blank:]]*\"\([^\"]*\)\".*/\1/p' scst_local.c)"
|
||||
|
||||
.PHONY: all tgt install uninstall clean extraclean 2release 2debug 2perf
|
||||
.PHONY: all tgt install uninstall clean extraclean
|
||||
|
||||
|
||||
@@ -277,19 +277,10 @@ conftest/use_pre_440_wr_structure/result-$(KVER).txt: \
|
||||
echo "$(call run_conftest,use_pre_440_wr_structure, \
|
||||
-DUSE_PRE_440_WR_STRUCTURE)" >"$@"
|
||||
|
||||
2debug:
|
||||
-$(MAKE) clean
|
||||
|
||||
2release:
|
||||
-$(MAKE) clean
|
||||
|
||||
2perf:
|
||||
-$(MAKE) clean
|
||||
|
||||
release-archive:
|
||||
../scripts/generate-release-archive srpt "$$(sed -n 's/^#define[[:blank:]]DRV_VERSION[[:blank:]]*\"\([^\"]*\)\".*/\1/p' src/ib_srpt.c)"
|
||||
|
||||
kerneldoc.html: $(SRC_FILES)
|
||||
$(KDIR)/scripts/kernel-doc -html $(SRC_FILES) >$@
|
||||
|
||||
.PHONY: all install clean extraclean 2debug 2release 2perf
|
||||
.PHONY: all install clean extraclean
|
||||
|
||||
@@ -2,18 +2,6 @@ LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
|
||||
CPPFLAGS := $(PRE_CFLAGS) $(CPPFLAGS)
|
||||
ccflags-y += -I$(KBUILD_EXTMOD)/../../scst/include
|
||||
|
||||
ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),)
|
||||
-include $(KBUILD_EXTMOD)/../../build_mode
|
||||
|
||||
echo := $(shell echo "srpt build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
BUILD_MODE_CFLAGS_ = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
|
||||
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions
|
||||
BUILD_MODE_CFLAGS_RELEASE = -DCONFIG_SCST_TRACING
|
||||
BUILD_MODE_CFLAGS_PERF =
|
||||
ccflags-y += $(BUILD_MODE_CFLAGS_$(BUILD_MODE))
|
||||
endif
|
||||
|
||||
#ccflags-y += -Wextra -Wno-unused-parameter
|
||||
|
||||
obj-m += ib_srpt.o
|
||||
|
||||
@@ -26,7 +26,7 @@ CFLAGS += -W -Wno-unused-parameter
|
||||
CFLAGS += $(LOCAL_CFLAGS)
|
||||
#CFLAGS += -DDEBUG_NOMEM
|
||||
|
||||
-include ../../build_mode
|
||||
-include ../../scst/build_mode
|
||||
|
||||
echo := $(shell echo "usr/events build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ CFLAGS += $(LOCAL_CFLAGS)
|
||||
#CFLAGS += -DDEBUG_TM_IGNORE_ALL
|
||||
CFLAGS += -DDEBUG_EXT_COPY_REMAP
|
||||
|
||||
-include ../../build_mode
|
||||
-include ../../scst/build_mode
|
||||
|
||||
echo := $(shell echo "usr/fileio build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ CFLAGS += -W -Wno-unused-parameter
|
||||
CFLAGS += $(LOCAL_CFLAGS)
|
||||
#CFLAGS += -DDEBUG_NOMEM
|
||||
|
||||
-include ../../build_mode
|
||||
-include ../../scst/build_mode
|
||||
|
||||
echo := $(shell echo "usr/stpgd build mode: $(BUILD_MODE)" >& 2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user