Mailing List Archive

drbd build failure due to missing REQ_OP_WRITE_SAME symbol
drbd_csum_bio() in drbd_sender.c uses a constant (REQ_OP_WRITE_SAME)
that was removed from the kernel in February:
- https://github.com/LINBIT/drbd/blob/drbd-9.1/drbd/drbd_sender.c#L360-L361

Here's where the constant was removed:
- https://github.com/torvalds/linux/commit/73bd66d9#diff-3b0e31d21eab4c9595b9d14730e06067f27b9f21134edcd9cb47215d23d69583

I'm using CentOS Stream 9 with kernel-5.14.0-130.el9.x86_64. I'm aware
that CentOS Stream "is not one of the distributions we care about too
deeply." I'm not sure to what extent we care about it though. It would
be nice to be able to build from the latest drbd upstream using a
recent kernel.

Please let me know if this is something we can get fixed.

--
Regards,

Reid Wahl (He/Him)
Senior Software Engineer, Red Hat
RHEL High Availability - Pacemaker

_______________________________________________
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 build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
Am 26.07.22 um 03:24 schrieb Reid Wahl:
> drbd_csum_bio() in drbd_sender.c uses a constant (REQ_OP_WRITE_SAME)
> that was removed from the kernel in February:
> - https://github.com/LINBIT/drbd/blob/drbd-9.1/drbd/drbd_sender.c#L360-L361
>
> Here's where the constant was removed:
> - https://github.com/torvalds/linux/commit/73bd66d9#diff-3b0e31d21eab4c9595b9d14730e06067f27b9f21134edcd9cb47215d23d69583
>
> I'm using CentOS Stream 9 with kernel-5.14.0-130.el9.x86_64. I'm aware
> that CentOS Stream "is not one of the distributions we care about too
> deeply." I'm not sure to what extent we care about it though. It would
> be nice to be able to build from the latest drbd upstream using a
> recent kernel.
>
> Please let me know if this is something we can get fixed.
>

Hi Reid,

it's not only about caring, this is mostly an issue of time. Basically,
we race to support the "important" kernels (i.e. the ones our paying
customers request), but that takes up a lot of time already, so there is
not a lot left for more "exotic" kernels.

Whenever we are already compatible with the most recent "customer
relevant kernel", I just start going through the remaining patches in
chronological order. If they are easy to port, they get done pretty
quickly. If they are more convoluted (like the recent bio_alloc mess),
it might take more time.
What I'm trying to say is that it's tough to even give a rough estimate
on when a specific patch will get ported to out-of-tree.

The only thing I can share – if it provides any solace – is that the
patch you are referencing is currently #3 in the queue, so it will
possibly get done in the near future. Again, unfortunately I can't make
any promises.

... and this is why we'll all be happy when DRBD is finally *only* in
the upstream kernel again :)

--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
_______________________________________________
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 build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
On Tue, Jul 26, 2022 at 11:11:01AM +0200, Christoph B?hmwalder wrote:
> ... and this is why we'll all be happy when DRBD is finally *only* in
> the upstream kernel again :)

especially the RHEL/CentOS users where the in-tree DRBD module is
disabled :P
_______________________________________________
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 build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
On Tue, Jul 26, 2022 at 2:11 AM Christoph Böhmwalder
<christoph.boehmwalder@linbit.com> wrote:
>
> Am 26.07.22 um 03:24 schrieb Reid Wahl:
> > drbd_csum_bio() in drbd_sender.c uses a constant (REQ_OP_WRITE_SAME)
> > that was removed from the kernel in February:
> > - https://github.com/LINBIT/drbd/blob/drbd-9.1/drbd/drbd_sender.c#L360-L361
> >
> > Here's where the constant was removed:
> > - https://github.com/torvalds/linux/commit/73bd66d9#diff-3b0e31d21eab4c9595b9d14730e06067f27b9f21134edcd9cb47215d23d69583
> >
> > I'm using CentOS Stream 9 with kernel-5.14.0-130.el9.x86_64. I'm aware
> > that CentOS Stream "is not one of the distributions we care about too
> > deeply." I'm not sure to what extent we care about it though. It would
> > be nice to be able to build from the latest drbd upstream using a
> > recent kernel.
> >
> > Please let me know if this is something we can get fixed.
> >
>
> Hi Reid,
>
> it's not only about caring, this is mostly an issue of time. Basically,
> we race to support the "important" kernels (i.e. the ones our paying
> customers request), but that takes up a lot of time already, so there is
> not a lot left for more "exotic" kernels.
>
> Whenever we are already compatible with the most recent "customer
> relevant kernel", I just start going through the remaining patches in
> chronological order. If they are easy to port, they get done pretty
> quickly. If they are more convoluted (like the recent bio_alloc mess),
> it might take more time.
> What I'm trying to say is that it's tough to even give a rough estimate
> on when a specific patch will get ported to out-of-tree.

I appreciate the detailed response. I completely get the need to
prioritize stable/important kernels.

>
> The only thing I can share – if it provides any solace – is that the
> patch you are referencing is currently #3 in the queue, so it will
> possibly get done in the near future. Again, unfortunately I can't make
> any promises.

It's not that big of a deal :) However one may feel about CentOS's
direction, users of Stream have to expect that behavior may not always
be smooth.

I've been updating some documentation that was written for Centos 8
Stream (c8s), and thus far I've been unable to make drbd work on c9s.
The kmod-drbd9x RPM package from ELRepo isn't compatible (and won't be
made compatible) with the c9s kernel. The latest stable drbd release
tarball hits a bio_alloc issue (and possibly others). The current git
drbd requires that I build my own coccinelle/spatch (no RPM package
for EL9), but after I do that, I hit the REQ_OP_WRITE_SAME issue from
the first message.

We're just going to have to use Alma Linux in place of c9s.

>
> ... and this is why we'll all be happy when DRBD is finally *only* in
> the upstream kernel again :)
>
> --
> Christoph Böhmwalder
> LINBIT | Keeping the Digital World Running
> DRBD HA — Disaster Recovery — Software defined Storage
>



--
Regards,

Reid Wahl (He/Him)
Senior Software Engineer, Red Hat
RHEL High Availability - Pacemaker

_______________________________________________
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 build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
On Tue, Jul 26, 2022 at 2:42 AM Roland Kammerer
<roland.kammerer@linbit.com> wrote:
>
> On Tue, Jul 26, 2022 at 11:11:01AM +0200, Christoph Böhmwalder wrote:
> > ... and this is why we'll all be happy when DRBD is finally *only* in
> > the upstream kernel again :)
>
> especially the RHEL/CentOS users where the in-tree DRBD module is
> disabled :P

Yeah, not sure why that was done... I'm new to DRBD, and after seeing
this message, I found that there's analogous in-tree drbd code where
the REQ_OP_WRITE_SAME issue is fixed. It seems to be missing from c9s
though.

I'm sure it's intentional and likely for a good reason but it is disappointing.

> _______________________________________________
> 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
>


--
Regards,

Reid Wahl (He/Him)
Senior Software Engineer, Red Hat
RHEL High Availability - Pacemaker

_______________________________________________
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 build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
On Tue, 26 Jul 2022 12:31:21 -0700 Reid Wahl wrote:

On Tue, Jul 26, 2022 at 2:11 AM Christoph Böhmwalder
<christoph.boehmwalder@linbit.com> wrote:
>
> Am 26.07.22 um 03:24 schrieb Reid Wahl:
> > drbd_csum_bio() in drbd_sender.c uses a constant (REQ_OP_WRITE_SAME)
> > that was removed from the kernel in February:
> > -
https://github.com/LINBIT/drbd/blob/drbd-9.1/drbd/drbd_sender.c#L360-L361
> >
> > Here's where the constant was removed:
> > -
https://github.com/torvalds/linux/commit/73bd66d9#diff-3b0e31d21eab4c9595b9d14730e06067f27b9f21134edcd9cb47215d23d69583
> >
> > I'm using CentOS Stream 9 with kernel-5.14.0-130.el9.x86_64. I'm aware
> > that CentOS Stream "is not one of the distributions we care about too
> > deeply." I'm not sure to what extent we care about it though. It would
> > be nice to be able to build from the latest drbd upstream using a
> > recent kernel.
> >
> > Please let me know if this is something we can get fixed.
>
> Hi Reid,
>
> it's not only about caring, this is mostly an issue of time. Basically,
> we race to support the "important" kernels (i.e. the ones our paying
> customers request), but that takes up a lot of time already, so there is
> not a lot left for more "exotic" kernels.
>
> Whenever we are already compatible with the most recent "customer
> relevant kernel", I just start going through the remaining patches in
> chronological order. If they are easy to port, they get done pretty
> quickly. If they are more convoluted (like the recent bio_alloc mess),
> it might take more time.
> What I'm trying to say is that it's tough to even give a rough estimate
> on when a specific patch will get ported to out-of-tree.

I appreciate the detailed response. I completely get the need to
prioritize stable/important kernels.
>
> The only thing I can share – if it provides any solace – is that the
> patch you are referencing is currently #3 in the queue, so it will
> possibly get done in the near future. Again, unfortunately I can't make
> any promises.

It's not that big of a deal :) However one may feel about CentOS's
direction, users of Stream have to expect that behavior may not always
be smooth.

I've been updating some documentation that was written for Centos 8
Stream (c8s), and thus far I've been unable to make drbd work on c9s.
The kmod-drbd9x RPM package from ELRepo isn't compatible (and won't be
made compatible) with the c9s kernel. The latest stable drbd release
tarball hits a bio_alloc issue (and possibly others). The current git
drbd requires that I build my own coccinelle/spatch (no RPM package
for EL9), but after I do that, I hit the REQ_OP_WRITE_SAME issue from
the first message.

We're just going to have to use Alma Linux in place of c9s.
>
> ... and this is why we'll all be happy when DRBD is finally *only* in
> the upstream kernel again :)
> --
> Christoph Böhmwalder
> LINBIT | Keeping the Digital World Running
> DRBD HA — Disaster Recovery — Software defined Storage
--
Regards,

Reid Wahl (He/Him)
===================================================
Hi Reid,

RHEL 9.1 beta is out. Kernel is 5.14.0-160.el9. Since REQ_OP_WRITE_SAME
is gone like in the c9s kernel, drbd 9.x fails to build (tried with 9.1.11).

With the way things stand, when RHEL 9.1 hits the road in November, ELRepo
will not be able to build kmod-drbd9x for RHEL-9 users.

Any possible solution?

Thanks,
Akemi
Re: drbd build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
Am 28.10.22 um 00:59 schrieb Akemi Yagi:> Hi Reid,
>
> RHEL 9.1 beta is out. Kernel is 5.14.0-160.el9. Since REQ_OP_WRITE_SAME
> is gone like in the c9s kernel, drbd 9.x fails to build (tried with 9.1.11).
>
> With the way things stand, when RHEL 9.1 hits the road in November, ELRepo
> will not be able to build kmod-drbd9x for RHEL-9 users.
>
> Any possible solution?
>
> Thanks,
> Akemi

We do have a fix for that on the drbd-9.1 development branch:
6842600a876d ("drbd: remove WRITE_SAME support").

There has not been a 9.1 release since, and this is obviously untested,
but maybe it works with 9.2.0?

If you could try to compile the current state of the drbd-9.1 branch
with that new RHEL kernel, that would be helpful.

Regards,
Christoph
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
_______________________________________________
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 build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
On Wed, Nov 2, 2022 at 2:59 AM Christoph Böhmwalder <
christoph.boehmwalder@linbit.com> wrote:

> Am 28.10.22 um 00:59 schrieb Akemi Yagi:> Hi Reid,
> >
> > RHEL 9.1 beta is out. Kernel is 5.14.0-160.el9. Since REQ_OP_WRITE_SAME
> > is gone like in the c9s kernel, drbd 9.x fails to build (tried with
> 9.1.11).
> >
> > With the way things stand, when RHEL 9.1 hits the road in November,
> ELRepo
> > will not be able to build kmod-drbd9x for RHEL-9 users.
> >
> > Any possible solution?
> >
> > Thanks,
> > Akemi
>
> We do have a fix for that on the drbd-9.1 development branch:
> 6842600a876d ("drbd: remove WRITE_SAME support").
>
> There has not been a 9.1 release since, and this is obviously untested,
> but maybe it works with 9.2.0?
>
> If you could try to compile the current state of the drbd-9.1 branch
> with that new RHEL kernel, that would be helpful.
>
> Regards,
> Christoph
> --
> Christoph Böhmwalder
> LINBIT | Keeping the Digital World Running
> DRBD HA — Disaster Recovery — Software defined Storage
>

First I applied the commit "drbd: remove WRITE_SAME support". But the build
failed with (new) errors.

Then I tried the current code from the drbd-9.1 branch. I got:

... spatch: command not found
Successfully connected to SPAAS ...
(snip)
patching file drbd_receiver.c
Hunk #1 FAILED at 1721.
1 out of 1 hunk FAILED
patching file drbd_nl.c
Hunk #1 FAILED at 1940.
Hunk #2 FAILED at 2205.
2 out of 2 hunks FAILED
patching file drbd_main.c
Hunk #1 FAILED at 1569.
1 out of 1 hunk FAILED
patching file drbd_debugfs.c
Hunk #1 succeeded at 1828 (offset 1 line).
patching file drbd_dax_pmem.c

This is where I stand. I'm not sure how to proceed from here. Any help
appreciated.

Thanks,
Akemi
Re: drbd build failure due to missing REQ_OP_WRITE_SAME symbol [ In reply to ]
Am 02.11.22 um 11:16 schrieb Akemi Yagi:
> On Wed, Nov 2, 2022 at 2:59 AM Christoph Böhmwalder
> <christoph.boehmwalder@linbit.com
> <mailto:christoph.boehmwalder@linbit.com>> wrote:
>
> Am 28.10.22 um 00:59 schrieb Akemi Yagi:> Hi Reid,
> >
> > RHEL 9.1 beta is out. Kernel is 5.14.0-160.el9. Since
> REQ_OP_WRITE_SAME
> > is gone like in the c9s kernel, drbd 9.x fails to build (tried
> with 9.1.11).
> >
> > With the way things stand, when RHEL 9.1 hits the road in
> November, ELRepo
> > will not be able to build kmod-drbd9x for RHEL-9 users.
> >
> > Any possible solution?
> >
> > Thanks,
> > Akemi
>
> We do have a fix for that on the drbd-9.1 development branch:
> 6842600a876d ("drbd: remove WRITE_SAME support").
>
> There has not been a 9.1 release since, and this is obviously untested,
> but maybe it works with 9.2.0?
>
> If you could try to compile the current state of the drbd-9.1 branch
> with that new RHEL kernel, that would be helpful.
>
> Regards,
> Christoph
> --
> Christoph Böhmwalder
> LINBIT | Keeping the Digital World Running
> DRBD HA —  Disaster Recovery — Software defined Storage
>
>
> First I applied the commit "drbd: remove WRITE_SAME support". But the
> build failed with (new) errors.
>
> Then I tried the current code from the drbd-9.1 branch. I got:
>
> ... spatch: command not found
> Successfully connected to SPAAS ...
> (snip)
> patching file drbd_receiver.c
> Hunk #1 FAILED at 1721.
> 1 out of 1 hunk FAILED
> patching file drbd_nl.c
> Hunk #1 FAILED at 1940.
> Hunk #2 FAILED at 2205.
> 2 out of 2 hunks FAILED
> patching file drbd_main.c
> Hunk #1 FAILED at 1569.
> 1 out of 1 hunk FAILED
> patching file drbd_debugfs.c
> Hunk #1 succeeded at 1828 (offset 1 line).
> patching file drbd_dax_pmem.c
>
> This is where I stand. I'm not sure how to proceed from here. Any help
> appreciated.
>
> Thanks,
> Akemi
>

See the "Building DRBD" section in the README:
https://github.com/LINBIT/drbd#building-drbd

I'm assuming you downloaded an archive of the code, which is why it
tried to call "spatch as a service". However, that will only work with a
release tarball, which is why the resulting patch does not apply.

Basically, you need to install coccinelle >1.0.8.

--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
_______________________________________________
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