[Drbd-dev] [PATCH 1/3] drbd: remove WRITE_SAME support

Joel Colledge joel.colledge at linbit.com
Fri Sep 9 09:57:23 CEST 2022


Hi Michael,

Thanks for the patch!

> This commit mimics upstream commit a34592ff6b78, which removes all the
> WRITE_SAME code because "REQ_OP_WRITE_SAME was only ever submitted by
> the legacy Linux zeroing code, which has switched to use
> REQ_OP_WRITE_ZEROES long ago."  WRITE_SAME was then removed from Linux
> 5.18.

This is an interesting case. If we remove all the write-same code like
this, then we either need to add it back in via compat, or we lose a
feature. I think it is OK to lose the feature on 5.18+ kernels, since
the rest of the kernel does not use it any more. On older kernels this
might break real use cases.

There is also the case where our peer is running an older kernel and
we are running 5.18+. I think we should worry about that after
deciding what to do with peers that run the same kernel.

I've added Lars to CC because he is more familiar with the historical
changes in this area.

Note: If we do remove the feature entirely, we should stop advertising
the feature flag DRBD_FF_WSAME so that the peer knows that we do not
support it.

Best regards,
Joel


More information about the drbd-dev mailing list