[Drbd-dev] [Patch v0 2/8] Adapt pointer backing_dev_info in struct request_queue
Roland Kammerer
roland.kammerer at linbit.com
Thu Mar 9 11:27:07 CET 2017
On Tue, Mar 07, 2017 at 11:27:53AM +0800, Nick Wang wrote:
> In dc3b17cc, struct request_queue use pointer to backing_dev_info,
> so all related call should be converted.
>
> This patch is for drbd-kernel-compat
>
> Signed-off-by: Nick Wang <nwang at suse.com>
> CC: Philipp Reisner <philipp.reisner at linbit.com>
> CC: Lars Ellenberg <lars.ellenberg at linbit.com>
> CC: drbd-dev at lists.linbit.com
>
> ---
> drbd_wrappers.h | 5 +++++
> tests/have_pointer_backing_dev_info.c | 7 +++++++
> 2 files changed, 12 insertions(+)
> create mode 100644 tests/have_pointer_backing_dev_info.c
>
> diff --git a/drbd_wrappers.h b/drbd_wrappers.h
> index 0489e7f..778a6fd 100644
> --- a/drbd_wrappers.h
> +++ b/drbd_wrappers.h
> @@ -888,6 +888,11 @@ static inline void blk_queue_write_cache(struct request_queue *q, bool enabled,
> #endif
> #endif
>
> +#ifdef COMPAT_HAVE_POINTER_BACKING_DEV_INFO
> +#define bdi_rw_congested(B) bdi_rw_congested(*(B))
> +#define bdi_congested(B, C) bdi_congested(*(B), C)
> +#endif
> +
We do compat work the other way round. The goal is to have our
out-of-tree code as close as possible to linux upstream. Otherwise we
would "get stuck" at the old paradigms.
In that specific case it actually means to change drbd_debugfs.c in a
way that it looks like linux upstream (basically removing the '&') and
provide compat #defines for older kernels.
Regards, rck
More information about the drbd-dev
mailing list