Re: [PATCH v7 23/25] block/rnbd: include client and server modules into kernel compilation

Jinpu Wang
2020-01-16T14:54:16Z

> > +obj-$(CONFIG_BLK_DEV_RNBD_CLIENT) += rnbd-client.o
> > +obj-$(CONFIG_BLK_DEV_RNBD_SERVER) += rnbd-server.o
> > +
> > +-include $(src)/compat/compat.mk
>
> What is it?
>
> Thanks
quote from Roman
"'
Well, in our production we use same source code and in order not to spoil
sources with 'ifdef' macros for different kernel versions we use compat
layer, which obviously will never go upstream. This line is the only
clean way to keep sources always up-to-date with latest kernel and still
be compatible with what we have on our servers in production.

'-' prefix at the beginning of the line tells make to ignore it if
file does not exist, so should not rise any error for compilation
against latest kernel.

Here is an example of the compat layer for RNBD block device:
https://github.com/ionos-enterprise/ibnbd/tree/master/rnbd/compat
"'

We will remove it also the one in the makefile for rtrs if we need to
send another round.

Thanks