Mailing List Archive

9.0.28 fails to build on centos-8-stream
hey guys,

similar to 9.0.27, log below.

Any chance you can give me a quick and dirty fix?

Thanks
Fabio

+ KSRC=/usr/src/kernels/4.18.0-277.el8.x86_64
+ /usr/bin/make -j8 module KDIR=/usr/src/kernels/4.18.0-277.el8.x86_64
KVER=4.18.0-277.el8.x86_64
Need a git checkout to regenerate drbd/.drbd_git_revision
make[1]: Entering directory '/builddir/build/BUILD/drbd-9.0.28-1/drbd'

Calling toplevel makefile of kernel source tree, which I believe is in
KDIR=/usr/src/kernels/4.18.0-277.el8.x86_64

/usr/bin/make -C /usr/src/kernels/4.18.0-277.el8.x86_64
M=/builddir/build/BUILD/drbd-9.0.28-1/drbd modules
COMPAT __vmalloc_has_2_params
COMPAT alloc_workqueue_takes_fmt
COMPAT before_4_13_kernel_read
COMPAT blkdev_issue_zeroout_discard
COMPAT can_include_vermagic_h
COMPAT drbd_release_returns_void
COMPAT genl_policy_in_ops
COMPAT have_SHASH_DESC_ON_STACK
COMPAT have_WB_congested_enum
COMPAT have_allow_kernel_signal
COMPAT have_atomic_dec_if_positive_linux
COMPAT have_atomic_in_flight
COMPAT have_bd_claim_by_disk
COMPAT have_bd_unlink_disk_holder
COMPAT have_bdi_cap_stable_writes
COMPAT have_bdi_congested_fn
COMPAT have_bio_bi_bdev
COMPAT have_bio_bi_disk
COMPAT have_bio_bi_error
COMPAT have_bio_bi_opf
COMPAT have_bio_bi_status
COMPAT have_bio_clone_fast
COMPAT have_bio_flush
COMPAT have_bio_free
COMPAT have_bio_op_shift
COMPAT have_bio_rw
COMPAT have_bio_set_op_attrs
COMPAT have_bio_start_io_acct
COMPAT have_bioset_create_front_pad
COMPAT have_bioset_init
COMPAT have_bioset_need_bvecs
COMPAT have_blk_check_plugged
COMPAT have_blk_qc_t_make_request
COMPAT have_blk_queue_flag_set
COMPAT have_blk_queue_make_request
COMPAT have_blk_queue_merge_bvec
COMPAT have_blk_queue_plugged
COMPAT have_blk_queue_split_bio
COMPAT have_blk_queue_split_q_bio
COMPAT have_blk_queue_split_q_bio_bioset
COMPAT have_blk_queue_update_readahead
COMPAT have_blk_queue_write_cache
COMPAT have_blkdev_get_by_path
COMPAT have_d_inode
COMPAT have_fallthrough
COMPAT have_file_inode
COMPAT have_generic_start_io_acct_q_rw_sect_part
COMPAT have_generic_start_io_acct_rw_sect_part
COMPAT have_genl_family_parallel_ops
COMPAT have_ib_cq_init_attr
COMPAT have_ib_get_dma_mr
COMPAT have_idr_alloc
COMPAT have_idr_is_empty
COMPAT have_inode_lock
COMPAT have_ktime_to_timespec64
COMPAT have_kvfree
COMPAT have_max_send_recv_sge
COMPAT have_netlink_cb_portid
COMPAT have_nla_nest_start_noflag
COMPAT have_nla_parse_deprecated
COMPAT have_nla_put_64bit
COMPAT have_nla_strscpy
COMPAT have_part_stat_h
COMPAT have_pointer_backing_dev_info
COMPAT have_prandom_u32
COMPAT have_proc_create_single
COMPAT have_queue_flag_stable_writes
COMPAT have_ratelimit_state_init
COMPAT have_rb_augment_functions
COMPAT have_refcount_inc
COMPAT have_req_flush
COMPAT have_req_hardbarrier
COMPAT have_req_noidle
COMPAT have_req_nounmap
COMPAT have_req_op_write
COMPAT have_req_op_write_same
COMPAT have_req_op_write_zeroes
COMPAT have_req_prio
COMPAT have_req_write
COMPAT have_req_write_same
COMPAT have_revalidate_disk_size
COMPAT have_sched_set_fifo
COMPAT have_security_netlink_recv
COMPAT have_sendpage_ok
COMPAT have_shash_desc_zero
COMPAT have_signed_nla_put
COMPAT have_simple_positive
COMPAT have_sock_set_keepalive
COMPAT have_struct_bvec_iter
COMPAT have_struct_kernel_param_ops
COMPAT have_struct_size
COMPAT have_submit_bio
COMPAT have_submit_bio_noacct
COMPAT have_tcp_sock_set_cork
COMPAT have_tcp_sock_set_nodelay
COMPAT have_tcp_sock_set_quickack
COMPAT have_time64_to_tm
COMPAT have_timer_setup
COMPAT have_void_make_request
COMPAT hlist_for_each_entry_has_three_parameters
COMPAT ib_alloc_pd_has_2_params
COMPAT ib_device_has_ops
COMPAT ib_post_send_const_params
COMPAT ib_query_device_has_3_params
COMPAT kmap_atomic_page_only
COMPAT queue_limits_has_discard_zeroes_data
COMPAT need_make_request_recursion
COMPAT rdma_create_id_has_net_ns
COMPAT sock_create_kern_has_five_parameters
COMPAT sock_ops_returns_addr_len
UPD
/builddir/build/BUILD/drbd-9.0.28-1/drbd/compat.4.18.0-277.el8.x86_64.h
UPD /builddir/build/BUILD/drbd-9.0.28-1/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: no suitable spatch found; trying spatch-as-a-service;
be patient, may take up to 10 minutes
if it is in the server side cache it might only take a second
SPAAS f93922242e3c9030fcf3a417aa779288
Successfully connected to SPAAS ('d35a4b17210dab1336de2725b997f300e9acd297')
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 22459 0 16538 0 5921 745 266 --:--:-- 0:00:22 --:--:--
4197
You can create a new .tgz including this pre-computed compat patch
by calling "make unpatch ; echo
drbd-9.0.28-1/drbd/drbd-kernel-compat/cocci_cache/f93922242e3c9030fcf3a417aa779288/compat.patch
>>.filelist ; make tgz"
PATCH
patching file ./drbd_int.h
patching file drbd-headers/linux/genl_magic_struct.h
patching file drbd_bitmap.c
patching file drbd_sender.c
patching file drbd_transport_tcp.c
patching file drbd_main.c
patching file drbd_debugfs.c
patching file drbd_nl.c
patching file drbd_req.c
patching file drbd_state.c
patching file drbd_receiver.c
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_dax_pmem.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_debugfs.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_bitmap.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_proc.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_sender.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_receiver.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_req.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_actlog.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/lru_cache.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.o
/builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c: In function
'drbd_create_device':
/builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c:3729:6: error:
implicit declaration of function 'blk_alloc_queue'; did you mean
'blk_alloc_queue_rh'? [-Werror=implicit-function-declaration]
q = blk_alloc_queue(drbd_make_request, NUMA_NO_NODE);
^~~~~~~~~~~~~~~
blk_alloc_queue_rh
/builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c:3729:4: warning:
assignment to 'struct request_queue *' from 'int' makes pointer from
integer without a cast [-Wint-conversion]
q = blk_alloc_queue(drbd_make_request, NUMA_NO_NODE);
^
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_strings.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_nl.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_interval.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_state.o
CC [M]
/builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd-kernel-compat/drbd_wrappers.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_nla.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_transport.o
CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_transport_tcp.o
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:315:
/builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1545:
_module_/builddir/build/BUILD/drbd-9.0.28-1/drbd] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/drbd-9.0.28-1/drbd'
make[1]: *** [Makefile:132: kbuild] Error 2
make: *** [Makefile:131: module] Error 2

_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user
Re: 9.0.28 fails to build on centos-8-stream [ In reply to ]
On Fri, Feb 26, 2021 at 07:09:29AM +0100, Fabio M. Di Nitto wrote:
> hey guys,
>
> similar to 9.0.27, log below.
>
> Any chance you can give me a quick and dirty fix?

> CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.o
> /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c: In function
> 'drbd_create_device':
> /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c:3729:6: error: implicit
> declaration of function 'blk_alloc_queue'; did you mean
> 'blk_alloc_queue_rh'? [-Werror=implicit-function-declaration]
> q = blk_alloc_queue(drbd_make_request, NUMA_NO_NODE);
> ^~~~~~~~~~~~~~~
> blk_alloc_queue_rh


A short history of blk_alloc_queue():

Jens introduced it with v2.6.0:
2003-08-06 ace416a37a95 axboe@suse.de [PATCH] Proper block queue reference counting
+request_queue_t *blk_alloc_queue(int);

somewhere in between, 2.6.16.xyz
... int -> gfp_t, request_queue_t -> struct request_queue

Centos 8 Stream "nominal base" is 4.18... which is still
+struct request_queue *blk_alloc_queue(gfp_t);

with v5.6:
2020-03-27 3d745ea5b095 hch@lst.de block: simplify queue allocation
-struct request_queue *blk_alloc_queue(gfp_t);
+struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id);

with v5.8:
2020-07-01 c62b37d96b6e hch@lst.de block: move ->make_request_fn to struct block_device_operations
-struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id);
+struct request_queue *blk_alloc_queue(int node_id);


"Centos Stream" is patched 4.18, so it started out with
+struct request_queue *blk_alloc_queue(gfp_t);
and since that is in the kABI whitelist, they cannot change that.

Still they want to backport the upstream changes up to
+struct request_queue *blk_alloc_queue(make_request_fn make_request, int node_id);
which changes the pattern of [**]
q = blk_alloc_queue(gfp_t)
blk_queue_make_request(q, fn)
to
q = blk_alloc_queue(fn, NUMA_NO_NODE)

They want that backport, because that was a pre-requisite to get rid of some
indirect call in the hot path of block-mq, which due to spectre mitigations was
costly enough to make a difference.

Which means Centost stream needs to preserve the "old" kABI white-listed
blk_alloc_queue(gfp_t), and also keep the blk_queue_make_request(q,fn),
under those very symbol names.
But at the same time introduce the "new" one.

Which they do by dropping the declaration of the old one from the headers
(that's fine. the B in kABI is for binary, not for header files...)
but keeping the symbols defined and exported
(so old binary drivers supposedly will keep working)

And introduce the new API as blk_alloc_queue_*rh*(fn, node_id)

Signature with v5.8 reverts back full circle to
+struct request_queue *blk_alloc_queue(int);
(though now that int is NUMA node id and not gfp flag...)
Yay, more compat gussing fun ;-)

Our compat code detects this, by testing for ops->submit_bio,
and patches down from v5.8 style to v5.6 style,
then checks for (gfp_t) vs (fn, node_id) by checking for compile-time
availability of blk_queue_make_request(q,fn),
and would patches based on the above pattern [**].
But since it is NOT available, it does not.

But we do not yet detect this weird "changed sybol name for compat" thing.

Guess we need an extra test for "blk_alloc_queue_rh()",
and an extra compat patch :-(

Meanwhile, you can just add an extra sed statement.


Lars

_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user
Re: 9.0.28 fails to build on centos-8-stream [ In reply to ]
On 01/03/2021 11.44, Lars Ellenberg wrote:
> On Fri, Feb 26, 2021 at 07:09:29AM +0100, Fabio M. Di Nitto wrote:
>> hey guys,
>>
>> similar to 9.0.27, log below.
>>
>> Any chance you can give me a quick and dirty fix?
>
>> CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.o
>> /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c: In function
>> 'drbd_create_device':
>> /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c:3729:6: error: implicit
>> declaration of function 'blk_alloc_queue'; did you mean
>> 'blk_alloc_queue_rh'? [-Werror=implicit-function-declaration]
>> q = blk_alloc_queue(drbd_make_request, NUMA_NO_NODE);
>> ^~~~~~~~~~~~~~~
>> blk_alloc_queue_rh
>
>
> A short history of blk_alloc_queue():

[snip]

makes me happy I don´t do kernel development ;)

> Our compat code detects this, by testing for ops->submit_bio,
> and patches down from v5.8 style to v5.6 style,
> then checks for (gfp_t) vs (fn, node_id) by checking for compile-time
> availability of blk_queue_make_request(q,fn),
> and would patches based on the above pattern [**].
> But since it is NOT available, it does not.
>
> But we do not yet detect this weird "changed sybol name for compat" thing.
>
> Guess we need an extra test for "blk_alloc_queue_rh()",
> and an extra compat patch :-(
>
> Meanwhile, you can just add an extra sed statement.

Yeah I was hoping to do it right, cocci doesn´t seem a quick learning
curve ;)

Thanks
Fabio

_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user
Re: [drbd] Re: 9.0.28 fails to build on centos-8-stream [ In reply to ]
> Any chance you can give me a quick and dirty fix?
On CentOS 8 Stream, I had to install a specific kernel version to make DRBD compilation work, then exclude the kernel from further updates until a fix is released. More info here: https://github.com/piraeusdatastore/piraeus-operator/issues/137"]https://github.com/piraeusdatastore/piraeus-operator/issues/137
Immanuel
~ Sent from my mobile


From: "Fabio M. Di Nitto" <fdinitto@redhat.com>
Sent: Monday, March 1, 2021 14:32
To: drbd-user@lists.linbit.com
Subject: [drbd] Re: [DRBD-user] 9.0.28 fails to build on centos-8-stream



On 01/03/2021 11.44, Lars Ellenberg wrote:
> On Fri, Feb 26, 2021 at 07:09:29AM +0100, Fabio M. Di Nitto wrote:
>> hey guys,
>>
>> similar to 9.0.27, log below.
>>
>> Any chance you can give me a quick and dirty fix?
>
>> CC [M] /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.o
>> /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c: In function
>> 'drbd_create_device':
>> /builddir/build/BUILD/drbd-9.0.28-1/drbd/drbd_main.c:3729:6: error: implicit
>> declaration of function 'blk_alloc_queue'; did you mean
>> 'blk_alloc_queue_rh'? [-Werror=implicit-function-declaration]
>> q = blk_alloc_queue(drbd_make_request, NUMA_NO_NODE);
>> ^~~~~~~~~~~~~~~
>> blk_alloc_queue_rh
>
>
> A short history of blk_alloc_queue():

[snip]

makes me happy I don&#180;t do kernel development ;)

> Our compat code detects this, by testing for ops->submit_bio,
> and patches down from v5.8 style to v5.6 style,
> then checks for (gfp_t) vs (fn, node_id) by checking for compile-time
> availability of blk_queue_make_request(q,fn),
> and would patches based on the above pattern [**].
> But since it is NOT available, it does not.
>
> But we do not yet detect this weird "changed sybol name for compat" thing.
>
> Guess we need an extra test for "blk_alloc_queue_rh()",
> and an extra compat patch :-(
>
> Meanwhile, you can just add an extra sed statement.

Yeah I was hoping to do it right, cocci doesn&#180;t seem a quick learning
curve ;)

Thanks
Fabio

_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user