Skip to content

dm: replace atomic_t reference counters with refcount_t

John Pittman dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dm thin: use refcount_t for thin_c reference countingdrivers/md/dm-thin.c+4 -40 replies
2/3dm zoned: metadata: use refcount_t for dm zoned reference countersdrivers/md/dm-zoned-metadata.c drivers/md/dm-zoned.h+14 -134 replies
3/3dm zoned: target: use refcount_t for dm zoned reference countersdrivers/md/dm-zoned-target.c+10 -101 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchDamien Le Moal
1/3
2/3R-b T-b
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] dm: replace atomic_t reference counters with refcount_t

This series of patches further integrates the refcount_t API into the device-mapper layer. The refcount_t API works to prevent counter overflows and use-after-free bugs, so should make the mechanism more robust, and make troubleshooting easier. Adding here to dm-thin and dm-zoned.

Refcounters changed listed below:
struct thin_c -> refcount
struct dmz_bioctx -> ref
struct dm_chunk_work -> refcount
struct dmz_mblock -> ref
struct dm_zone -> refcount

John Pittman (3):
dm thin: use refcount_t for thin_c reference counting dm zoned: metadata: use refcount_t for dm zoned reference dm zoned: target: use refcount_t for dm zoned reference

 drivers/md/dm-thin.c | 8 ++++----
 drivers/md/dm-zoned-metadata.c | 25 +++++++++++++------------
 drivers/md/dm-zoned.h          |  2 +-
 drivers/md/dm-zoned-target.c | 20 ++++++++++----------

Best Regards,

John Pittman
Customer Engagement and Experience
Red Hat Inc.