[DRBD-user] building v9

Pierre-Philipp Braun pbraun at nethence.com
Fri Dec 11 10:33:10 CET 2020


> ubuntu-focal-amd64    | ✗ 5.4.0-51; ✗ 5.4.0-52; 5.4.0-48; 5.4.0-53; 
> 5.4.0-54; 5.4.0-56; 5.4.0-26
[...]
> Using one of these kernels will give you the smoothest experience when 
> building DRBD. We actually pre-compute all compat patches for these 
> kernels and put them in our release tarballs. This means that, if one of 
> these kernels is detected, you will not need spatch at all and just need 
> to apply a plain patch.

Thank you for the information.  I like the theory))  But while I am now supposed to have a supported kernel, namely ubuntu-focal-amd64/5.4.0-54-generic, I still see the following.

  UPD     /root/tp/drbd-9.0.26-0rc3/drbd/compat.5.4.65.h
  UPD     /root/tp/drbd-9.0.26-0rc3/drbd/compat.h
  GENPATCHNAMES   5.4.0-54-generic
  SPATCH   0bd9b1bed5b937182f6ce6b7814719b2  5.4.0-54-generic
  PATCH
patching file ./drbd_int.h
patching file drbd_bitmap.c
patching file drbd_sender.c
patching file drbd_receiver.c
patching file drbd_main.c
patching file drbd_nl.c
patching file drbd_req.c
patching file drbd_transport_tcp.c
patching file drbd_debugfs.c

and to check for sure, I renamed the spatch binary and got

  UPD     /root/tp/drbd/drbd/compat.5.4.65.h
  UPD     /root/tp/drbd/drbd/compat.h
./drbd-kernel-compat/gen_compat_patch.sh: line 12: spatch: command not found
./drbd-kernel-compat/gen_compat_patch.sh: line 45: hash: spatch: not found
  INFO: not trying spatch-as-a-service because you are trying
  to build DRBD from a git checkout. Please install a suitable
  version of coccinelle (>1.0.8) or try building from a
  release tarball.
ERROR: no suitable spatch found in $PATH. Install package 'coccinelle'!

> Yes, *theoretically* DRBD should always build against the latest kernel 
> release without needing compat patches. But as I already mentioned, 
> there is a lot going on in the kernel, especially in the block layer, 
> and since we support so many kernels it is a huge piece of work to patch 
> back any larger modifications.
> 
> So it is perfectly possible that we are lagging behind a few versions. I 
> guess you can try finding the "sweet spot" where it works without 
> patches. This should be somwhere around 5.9 at the moment.

Hmm interesting.  It would help to know how to find out about the exact and ideal version.  It must be available somewhere, right?  Having this version at the top of the table you've shared above (and even as number 1 supported kernel) would seem logical to me.  And it would be great if this table could be shared publicly, maybe in drbd-9.0's README?

However, given my previous posts, drbd-9.0 does not build against 5.7, 5.8, nor stable 5.9 but against longterm 5.4.

Thank you!
-- 
Pierre-Philipp


More information about the drbd-user mailing list