Skip to content

md: sector_t conversions

Andre Noll linux-raid 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5md: Make update_size() take the number of sectors.drivers/md/md.c+18 -181 reply
2/5md: Replace calc_dev_size() by calc_num_sectors().drivers/md/md.c+7 -110 replies
3/5md: Make calc_dev_sboffset() return a sector count.drivers/md/md.c+6 -51 reply
4/5md: Turn rdev->sb_offset into a sector-based quantity.drivers/md/bitmap.c drivers/md/md.c include/linux/raid/md_k.h+32 -363 replies
5/5md: Remove some unused macros.include/linux/raid/md_p.h+0 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] md: sector_t conversions

Hi

here is the first batch of patches that aim to change the internal representations of sizes of raid devices from 1K blocks to 512 byte sectors.

Patches 1-3 change the internal functions update_size(), calc_dev_size() and calc_dev_sboffset() so that they take/return a sector count instead of a block count. Patch 4 changes the semantics of rdev->sb_offset so that its value now represents the number of the start sector instead of the start block. Patch 5 removes some macros that have become unused due to this conversion.

These changes are all simple and straight-forward, but it's easy to make mistakes because there's no help from the compiler. So please review carefully.

 drivers/md/bitmap.c       |   10 ++--
 drivers/md/md.c           |  111 +++++++++++++++++++++------------------------
 include/linux/raid/md_k.h |    2 +-
 include/linux/raid/md_p.h |    3 -
 4 files changed, 58 insertions(+), 68 deletions(-)

Regards
Andre