Skip to content

Commit

Permalink
Merge pull request #79 from snuf/inline_vsl4
Browse files Browse the repository at this point in the history
getting Makefiles between iomemory-vsl and iomemory-vsl4 in sync
  • Loading branch information
snuf authored Jan 9, 2021
2 parents dad244e + 5474443 commit 04fc714
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
FIO_DRIVER = $(shell grep fio_driver_name fio-driver.spec | awk '{print $$3}' | head -1)
FIO_VERSION = $(shell grep fio_version fio-driver.spec | awk '{print $$3}' | head -1)

all: help

.PHONY: dkms
Expand All @@ -15,9 +18,9 @@ dpkg: clean patch_module_version
rpm: clean patch_module_version
# patch fio_version in fio-driver.spec
mkdir -p ~/rpmbuild/SOURCES && \
tar -zcvf ~/rpmbuild/SOURCES/iomemory-vsl-3.2.16.1732.tar.gz \
--transform s/iomemory-vsl/iomemory-vsl-3.2.16.1732/ \
../iomemory-vsl && \
tar -zcvf ~/rpmbuild/SOURCES/${FIO_DRIVER}-${FIO_VERSION}.tar.gz \
--transform s/${FIO_DRIVER}/${FIO_DRIVER}-${FIO_VERSION}/ \
../${FIO_DRIVER} && \
cd $(shell git rev-parse --show-toplevel) && \
rpmbuild -ba fio-driver.spec

Expand Down
9 changes: 3 additions & 6 deletions root/usr/src/iomemory-vsl-3.2.16/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ KERNEL_SRC = /lib/modules/$(KERNELVER)/source

# Set PORT_NO_WERROR=0 to compile without -Werror compilation flag
ifneq ($(PORT_NO_WERROR),1)
CFLAGS += -Werror
CFLAGS += -Werror
endif

# Set FUSION_DEBUG=0 to compile without debugging symbols
Expand All @@ -50,17 +50,14 @@ FIOARCH ?= $(shell uname -m)
CCMAJOR ?= $(shell echo __GNUC__ | $(FIOCC) -E -xc - | tail -n 1)
CCMINOR ?= $(shell echo __GNUC_MINOR__ | $(FIOCC) -E -xc - | tail -n 1)
CCVER=$(CCMAJOR)$(CCMINOR)
# This is a hack till we have something else figured out..... *sauces*
LAST_REAL_CCVER ?= "x86_64_cc63_libkfio.o_shipped"
LAST_CCVER := $(shell ls -1 kfio | grep $(LAST_REAL_CCVER) | sed -n 's/.*_cc\([0-9][0-9]*\)_.*/\1/p' | tail -1)

LAST_CCVER := $(shell ls -1 kfio | sed -n 's/.*_cc\([0-9][0-9]*\)_.*/\1/p' | tail -1)
# Get the tag and push it in here too.... if not too long...
MODULE_VERSION ?= $(shell git rev-parse --short HEAD)

TARGET ?= $(FIOARCH)_cc$(CCMAJOR)$(CCMINOR)

KFIO_LIB ?= kfio/$(TARGET)_libkfio.o_shipped
LAST_KFIO_LIB := $(shell ls -1 kfio | grep $(LAST_REAL_CCVER) | sort | tail -1)
LAST_KFIO_LIB := $(shell ls -1 kfio | grep $(LAST_CCVER) | sort | tail -1)
KFIO_LIB_CMD ?= kfio/.$(TARGET)_libkfio.o.cmd

NCPUS:=$(shell grep -c ^processor /proc/cpuinfo)
Expand Down
4 changes: 2 additions & 2 deletions root/usr/src/iomemory-vsl-3.2.16/check_target_kernel.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PREV_KERNELVER="5.4.0-58-generic"
PREV_KERNEL_SRC="/lib/modules/5.4.0-58-generic/build"
PREV_KERNELVER="5.4.0-59-generic"
PREV_KERNEL_SRC="/lib/modules/5.4.0-59-generic/build"
4 changes: 1 addition & 3 deletions root/usr/src/iomemory-vsl-3.2.16/kblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ struct kfio_disk
int in_do_request;
struct list_head retry_list;
unsigned int retry_cnt;

#if KFIOC_X_HAS_MAKE_REQUEST_FN
make_request_fn *make_request_fn;
#endif
Expand Down Expand Up @@ -110,7 +109,6 @@ static int kfio_bio_cnt(const struct bio * const bio)
* Functions required to register and unregister fio block device driver *
******************************************************************************/


int kfio_register_blkdev_pre_init(kfio_pci_dev_t *pdev)
{
/* This should return the major number from the block device file. Under linux
Expand Down Expand Up @@ -964,7 +962,6 @@ static struct request_queue *kfio_alloc_queue(struct kfio_disk *dp,
if (rq != NULL)
{
rq->queuedata = dp;

#if KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS
blk_queue_make_request(rq, kfio_make_request);
#endif
Expand Down Expand Up @@ -1136,6 +1133,7 @@ blk_qc_t kfio_submit_bio(struct bio *bio)

if (bio_segments(bio) >= queue_max_segments(queue))
BLK_QUEUE_SPLIT;

// iomemory-vsl4 has atom bio here

plug_data = kfio_should_plug(queue);
Expand Down

0 comments on commit 04fc714

Please sign in to comment.