Skip to content

dm unstriped: support non power of 2 chunk size...

Heinz Mauelshagen dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dm unstriped: support non power of 2 chunk sizeDocumentation/device-mapper/unstriped.txt drivers/md/dm-unstripe.c+16 -121 reply
2/4dm unstriped: remove superfluous module init error path messagedrivers/md/dm-unstripe.c+1 -71 reply
3/4dm unstriped: rename symbols to conform to target namedrivers/md/dm-unstripe.c+38 -381 reply
4/4dm unstriped: remove unnecessary header includesdrivers/md/dm-unstripe.c+0 -60 replies

Reviews trailers per patch

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

PatchScott Bauer
1/4T-b R-b
2/4R-b
3/4
4/4

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/4] dm unstriped: support non power of 2 chunk size...

Patch series adds support for non power of 2 chunk size to the "unstriped" target to better suit the striped target in patch 1.

Patches 2-4 remove the module init error path message, rename symbols to conform to the target name and avoid unnecessary headers.

Test script:
------------
#!/bin/sh
#
# Test "unstriped" target non power of 2 chunk size support.
#
# Requires precreated "striped" logical volume as backing device. # Device will be overwritten!
#
po2=0 # adjust to 1 = power of2, 0 = non-po2
dev=/dev/$vg/$lv # "striped" backing device; adjust to exisiting "striped" LV

table=dmsetup table $dev
size=echo "$table"|awk '{print $2}'
stripes=echo "$table"|awk '{print $4}'
stripesize=echo "$table"|awk '{print $5}'
bdstripesize=$stripesize

[ $po2 -eq 0 ] && stripesize=$(($stripesize - 9)) len=$(($size / $stripes / $stripesize * $stripesize))

if [ $po2 -eq 0 ]
then

	dmsetup table $dev | sed "s/$size/$(($len * $stripes))/;s/$bdstripesize/$stripesize/" | dmsetup load $dev
	dmsetup suspend $dev ; dmsetup resume $dev

fi

echo y | mkfs -t ext4 $dev
fsck -fn $dev

devs=""
for i in seq 0 $(($stripes - 1))
do

	echo "0 $len unstriped $stripes $stripesize $i $dev 0" | dmsetup create s-$i
	devs="$devs /dev/mapper/s-$i 0"

done

dmsetup create basename $dev --table "0 $(($len * $stripes)) striped $stripes $stripesize $devs" fsck -fn /dev/mapper/basename $dev

Example mapping tables resulting from script:
---------------------------------------------

# dmsetup table|egrep "^(nvm-s|s)"
s: 0 270249 striped 3 119 254:7 0 254:8 0 254:9 0
s-2: 0 90083 unstriped 3 119 2 254:6 0
s-1: 0 90083 unstriped 3 119 1 254:6 0
s-0: 0 90083 unstriped 3 119 0 254:6 0
nvm-s: 0 270249 striped 3 119 66:96 13854720 66:64 2048 66:48 2048

Heinz Mauelshagen (4):
dm unstriped: support non power of 2 chunk size
dm unstriped: remove superfluous module init error path message dm unstriped: rename symbols to conform to target name dm unstriped: remove unnecessary header includes

 Documentation/device-mapper/unstriped.txt |   5 ++
 drivers/md/dm-unstripe.c                  | 109 +++++++++++++-----------------
 2 files changed, 53 insertions(+), 61 deletions(-)
Signature · 1 line
2.14.3