Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diskadd 2.10 #254

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8d119dd
Set fastpath for valid fuse requests only (#77)
prabirpaul Jan 27, 2020
1337fd1
fix minor compilation and incorrect accounting (#86)
sulakshm Feb 10, 2020
48a672a
compilation fix for 4.9 kernel (#88)
sulakshm Feb 11, 2020
1ca6abd
Compilation issue with fastpath on Debian 9. Change Minimum kernel ve…
jrivera-px Feb 19, 2020
ab6ed36
Resize ioctl (#126) (#128)
prabirpaul Jun 18, 2020
691875f
fix the race where we would reset fc->connected in abort which would …
Jan 20, 2020
7c838ff
simplify abort fix; use delayed_work instead of (#71)
Jan 20, 2020
a15dc63
Compilation changes for kernel 5.7 (#137) (#142)
jrivera-px Aug 1, 2020
4db086a
Compile fixes 4x 5x kernels (#148)
jrivera-px Aug 29, 2020
228c7b5
Fix compilation failure on 4.15.0-1077-gcp & 4.15.0-1092-azure. (#149)
jrivera-px Sep 2, 2020
ac86bfe
Add simple pxd tests (#160)
prabirpaul Oct 13, 2020
108f0df
PWX-17271: Compilation issues with 5.9.8-flatcar. (#168)
jrivera-px Nov 25, 2020
c7332cd
Everything needed to build storage
prabirpaul Mar 11, 2021
82202cf
Allow greater than 300sec timeout values (#132)
prabirpaul Jul 2, 2020
9316aee
Compilation changes for kernel 5.7 (#137)
prabirpaul Jul 24, 2020
98151e8
support making a process into a IO flusher
vjs-px Nov 17, 2020
5dc75c2
addressed review comments from prabir
vjs-px Nov 22, 2020
205d53b
addressed review comments
vjs-px Nov 23, 2020
c9a4cff
Compilation issues with 5.9.8-flatcar. (#168) (#169)
prabirpaul Nov 25, 2020
c75e50d
PWX-16992: Fix compile issues for 5.9.6-1.el7.elrepo.x86_64 kernel. (…
jrivera-px Dec 15, 2020
ed60132
Centos 8 Stream 4.18.0-257 contains kernel 5.x backports and added ne…
jrivera-px Jan 22, 2021
80ce975
PWX-18829: Fix device queue depth setting (#191) (#192)
prabirpaul Feb 25, 2021
9db4369
PWX-18535: compilation fixes upto 5.10 kernel (#189) (#194)
sulakshm Feb 26, 2021
2f085e6
PWX-19006: Do not set pxd_bd_ops.submit_bio, 5.10 kernel uses this to…
prabirpaul Mar 8, 2021
1ee26a1
Suse compile fixes (#147)
jrivera-px Aug 28, 2020
40fd6c3
Compile fixes for 5.8.x, 4.12.x & 4.13.x EL7 kernels. (#145)
jrivera-px Aug 22, 2020
89b149d
address recursive fc->lock path (#183)
Jan 21, 2021
050c82b
5.8.x fixes master (#186)
jrivera-px Jan 28, 2021
245b638
Compile fixes... (#198)
jrivera-px Mar 12, 2021
78d7ed2
Always use stub for fastpath
prabirpaul Mar 12, 2021
83c49b8
remove pxd_fastpath.c
prabirpaul Mar 12, 2021
262a36a
compile fix
prabirpaul Mar 12, 2021
e52fe10
Update mod version so that px 2.6->2.7 upgrade attemtpts module upgrade
prabirpaul Mar 12, 2021
c301000
Update debug log
prabirpaul Mar 12, 2021
c83c546
PWX-18756 fix race in restart and new req processing (#190) (#193)
sulakshm Feb 26, 2021
581d754
Revert "PWX-18756 fix race in restart and new req processing (#190) (…
prabirpaul Mar 12, 2021
525a5ee
PWX-18756 fix race in restart and new req processing (#190) (#193)
sulakshm Feb 26, 2021
2d040d0
px-fastpath makefile cleanup - clean disable
Mar 12, 2021
6f40b8a
zero initialize all fieds of pxd_dev_init
Mar 12, 2021
2485f5f
cleanup on fc->connected|allow_disconnected
Mar 12, 2021
1cef21b
minor fastpath stub edit
Mar 12, 2021
af5b6d7
Revert "cleanup on fc->connected|allow_disconnected"
prabirpaul Mar 12, 2021
879a7c9
Revert "PWX-18756 fix race in restart and new req processing (#190) (…
prabirpaul Mar 12, 2021
d4ba933
Review comments
prabirpaul Mar 12, 2021
f5344e8
Add assertion in fastpath stub request processing (#200)
prabirpaul Mar 14, 2021
c41976a
spin lock missed during abort handling (#201)
sulakshm Mar 15, 2021
0f95961
Compilation fix for 4.15.0-141-generic. (#206)
jrivera-px Apr 15, 2021
a96c121
Include 'linux/pid_namespace.h' to fix 'task_active_pid_ns' implicit …
jrivera-px Apr 22, 2021
fc2eb1f
cherry-picked driver support from master (#223)
sulakshm Aug 16, 2021
d288725
spin lock missed during abort handling (#201)
sulakshm Mar 15, 2021
d9b5274
PWX-21175: handle kernel crash in fastpath + compilation fix (#227)
sulakshm Sep 11, 2021
189c2e3
PWX-21175: handle kernel crash in fastpath + compilation fix (#227) (…
sulakshm Sep 14, 2021
e300c42
PWX-21175: compile fix for 3.10 kernel
Sep 14, 2021
4b91b94
Set discard granularity to 64k (needed for thin vol) (#236)
prabirpaul Nov 15, 2021
0d13655
discard settings for dmthin (#239)
sulakshm Dec 2, 2021
5690a6a
Unfreeze q after export (#253)
prabirpaul May 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 41 additions & 32 deletions Makefile.in
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
px-objs = pxd.o dev.o iov_iter.o px_version.o
px-objs = pxd.o dev.o iov_iter.o px_version.o kiolib.o pxd_bio_makereq.o pxd_bio_blkmq.o pxd_fastpath.o
obj-m = px.o

KBUILD_CPPFLAGS := -D__KERNEL__
PXDEFINES := -D__PXKERNEL__

KVERSION=$(shell uname -r)

ifndef KERNELPATH
Expand All @@ -29,9 +27,8 @@ $(error Kernel path: $(KERNELPATH) directory does not exist.)
endif

MINKVER=3.10
FPATH_MINKVER=4.0
BLKMQ_MINKVER=4.18
KERNELVER=$(shell echo $(KVERSION) | /bin/sed 's/\([0-9].[0-9]\+\).*/\1/g')
KERNELVER=$(shell echo $(CHK_KVER) | /bin/sed 's/\([0-9].[0-9]\+\).*/\1/g')

majorfn=$(shell echo "$1" | /bin/sed 's/\(.*\)\.\(.*\)/\1/g')
minorfn=$(shell echo "$1" | /bin/sed 's/\(.*\)\.\(.*\)/\2/g')
Expand All @@ -46,11 +43,20 @@ minver_minor=$(call minorfn, ${MINKVER})
blkmq_major=$(call majorfn, ${BLKMQ_MINKVER})
blkmq_minor=$(call minorfn, ${BLKMQ_MINKVER})

kmajor=$(call majorfn, ${KERNELVER})
kminor=$(call minorfn, ${KERNELVER})

#makereq interface supports fastpath in all version (not recommended)
#PXDEFINES := -D__PXKERNEL__ -D__PXD_BIO_MAKEREQ__
#FPATH_MINKVER=${kmajor}.${kminor}

#blkmq mode has version check for fastpath (default, enabled)
PXDEFINES := -D__PXKERNEL__ -D__PXD_BIO_BLKMQ__
FPATH_MINKVER=4.12

fp_major=$(call majorfn, ${FPATH_MINKVER})
fp_minor=$(call minorfn, ${FPATH_MINKVER})

kmajor=$(call majorfn, ${KERNELVER})
kminor=$(call minorfn, ${KERNELVER})

## min kernel version checks
ifeq ($(call verlater,${minver_major},${kmajor}),0)
Expand All @@ -63,15 +69,28 @@ endif
endif
endif

## fastpath checks
ifeq ($(call verlater,${kmajor},${fp_major}),0)
PXDEFINES += -D__PX_FASTPATH__
$(info Kernel version ${KERNELVER} supports fastpath.)
else
ifeq ($(call versame,${kmajor},${fp_major}),0)
ifeq ($(call versameorlater,${kminor},${fp_minor}),0)
PXDEFINES += -D__PX_FASTPATH__
$(info Kernel version ${KERNELVER} supports fastpath.)
endif
endif
endif

## blkmq checks
ifeq ($(call verlater,${kmajor},${blkmq_major}),0)
PXDEFINES += -D__PX_BLKMQ__
$(warning Kernel version ${KERNELVER} supports blkmq driver model.")
$(info Kernel version ${KERNELVER} supports blkmq driver model.)
else
ifeq ($(call versame,${kmajor},${blkmq_major}),0)
ifeq ($(call versameorlater,${kminor},${blkmq_minor}),0)
PXDEFINES += -D__PX_BLKMQ__
$(warning Kernel version ${KERNELVER} supports blkmq driver model.")
$(info Kernel version ${KERNELVER} supports blkmq driver model.)
endif
endif
endif
Expand All @@ -81,28 +100,6 @@ ifeq ($(shell echo "$(CHK_KVER)" | grep -Eq '.*\.el8.*\.x86_64'; echo $$?),0)
PXDEFINES += -D__PX_BLKMQ__ -D__EL8__
endif

## fastpath specific checks
ifeq ($(call verlater,${kmajor},${fp_major}),0)
PXDEFINES += -D__PX_FASTPATH__
px-objs += pxd_fastpath.o
$(warning kernel fast path enabled, current kernel version $(KVERSION) need minimum $(FPATH_MINKVER))
else
ifeq ($(call versame,${kmajor},${fp_major}),0)
ifeq ($(call versameorlater,${kminor},${fp_minor}),0)
PXDEFINES += -D__PX_FASTPATH__
px-objs += pxd_fastpath.o
$(warning kernel fast path enabled, current kernel version $(KVERSION) need minimum $(FPATH_MINKVER))
else
px-objs += pxd_fastpath_stub.o
$(warning kernel fast path disabled, current kernel version $(KVERSION) need minimum $(FPATH_MINKVER))
endif
else
px-objs += pxd_fastpath_stub.o
$(warning kernel fast path disabled, current kernel version $(KVERSION) need minimum $(FPATH_MINKVER))
endif
endif


ifdef KERNELOTHER
KERNELOTHEROPT=O=$(KERNELOTHER)
endif
Expand All @@ -126,12 +123,16 @@ PXDEFINES += -D__PX_BLKMQ__
endif
endif

ifdef FORCE_CONTAINER_CC
FORCE_CC=CC=$(FORCE_CONTAINER_CC)
endif

ccflags-y := $(ADDCCFLAGS) -Wframe-larger-than=2048 -Werror -I$(src) $(KBUILD_CPPFLAGS) $(PXDEFINES)

.PHONY: rpm

all: px_version.c
make -C $(KERNELPATH) $(KERNELOTHEROPT) M=$(CURDIR) modules
make $(FORCE_CC) -C $(KERNELPATH) $(KERNELOTHEROPT) M=$(CURDIR) modules

insert: all
insmod px.ko $(PXD_NUM_CONTEXT_EXPORTED)
Expand All @@ -142,6 +143,13 @@ clean:
install:
make V=1 -C $(KERNELPATH) $(KERNELOTHEROPT) M=$(CURDIR) modules_install

test_clean:
@/bin/rm -f test/pxd_test

pxd_test: pxd_test.cc
@echo "Building Test ..."
g++ -I. -std=c++11 test/pxd_test.cc -lgtest -lboost_iostreams -lpthread -o test/pxd_test

rpm:
@cd rpm && ./buildrpm.sh

Expand All @@ -159,3 +167,4 @@ px_version.c:

distclean: clean
@/bin/rm -f config.* Makefile
@/bin/rm -f test/pxd_test
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ Requires kernel >= 3.10
# rpm -Uvh /root/px-fuse/rpm/px/RPMS/x86_64/px-3.10.0-123.9.3.el7.x86_64.rpm
```

### Building and running Tests
```
A set of tests are included to test control operations attach and detach as well as I/O operations read and write.
To build test:

# cd px_fuse
# ./configure
# make pxd_test
# make test_clean

Make sure that px.ko can be built and sucessfully installed.
To run test:

# cd px_fuse
# ./test/pxd_test --gtest_filter=PxdTest.write
# ./test/pxd_test --gtest_filter=PxdTest.read
```

### Verifying PX-FUSE will build on Ubuntu

`kernel-tests.sh` is a script which can verify if headers from alternate kernels will build with PX-FUSE. It can
Expand Down
Loading