fix: block: remove disk_part_iter (v5.12)
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 10 May 2021 15:39:24 +0000 (11:39 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 May 2021 17:59:33 +0000 (13:59 -0400)
commit7c05bae756aceffdf73e515f60e12b698b4e98cf
tree0914fe33c37175cc62248ea292bfedbf5954ae3f
parent7eb89c429ea37246ed472d7098a598ededc7e339
fix: block: remove disk_part_iter (v5.12)

In v5.12 a refactoring of the genhd code was started and the symbols
related to 'disk_part_iter' were unexported. In v5.13 they were
completely removed.

This patch replaces the short lived compat code that is specific to
v5.12 and replaces it with a generic internal implementation that
iterates directly on the 'disk->part_tbl' xarray which will be used
on v5.12 and up.

This seems like a better option than keeping the compat code that will
only work on v5.12 and make maintenance more complicated. The compat was
backported to the stable branches but isn't yet part of a point release
so can be safely replaced.

See the upstream commits:

  commit 3212135a718b06be38811f2d9a320ae842e76409
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Tue Apr 6 08:23:02 2021 +0200

    block: remove disk_part_iter

    Just open code the xa_for_each in the remaining user.

  commit a33df75c6328bf40078b35f2040d8e54d574c357
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Sun Jan 24 11:02:41 2021 +0100

    block: use an xarray for disk->part_tbl

    Now that no fast path lookups in the partition table are left, there is
    no point in micro-optimizing the data structure for it.  Just use a bog
    standard xarray.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I43d8ef8463cb7a83dc8859a32dc29502cd897ddf
Makefile
lttng-statedump-impl.c
wrapper/genhd.c [deleted file]
wrapper/genhd.h
This page took 0.027194 seconds and 4 git commands to generate.