kernel-ark/drivers/md
Kevin Corry 8ba32fde2c [PATCH] dm stripe: Fix bounds
The dm-stripe target currently does not enforce that the size of a stripe
device be a multiple of the chunk-size.  Under certain conditions, this can
lead to I/O requests going off the end of an underlying device.  This
test-case shows one example.

echo "0 100 linear /dev/hdb1 0" | dmsetup create linear0
echo "0 100 linear /dev/hdb1 100" | dmsetup create linear1
echo "0 200 striped 2 32 /dev/mapper/linear0 0 /dev/mapper/linear1 0" | \
   dmsetup create stripe0
dd if=/dev/zero of=/dev/mapper/stripe0 bs=1k

This will produce the output:
dd: writing '/dev/mapper/stripe0': Input/output error
97+0 records in
96+0 records out

And in the kernel log will be:
attempt to access beyond end of device
dm-0: rw=0, want=104, limit=100

The patch will check that the table size is a multiple of the stripe
chunk-size when the table is created, which will prevent the above striped
device from being created.

This should not affect tools like LVM or EVMS, since in all the cases I can
think of, striped devices are always created with the sizes being a
multiple of the chunk-size.

The size of a stripe device must be a multiple of its chunk-size.

(akpm: that typecast is quite gratuitous)

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-17 07:51:25 -08:00
..
raid6test
.gitignore gitignore: misc files 2006-01-01 22:21:50 +01:00
bitmap.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
dm-bio-list.h [PATCH] device-mapper snapshot: bio_list fix 2005-11-22 09:14:31 -08:00
dm-bio-record.h
dm-crypt.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
dm-emc.c
dm-exception-store.c
dm-hw-handler.c
dm-hw-handler.h
dm-io.c
dm-io.h [PATCH] device-mapper: remove unused definition 2006-01-06 08:34:00 -08:00
dm-ioctl.c [PATCH] device-mapper ioctl: reduce PF_MEMALLOC usage 2006-02-01 08:53:10 -08:00
dm-linear.c
dm-log.c [PATCH] device-mapper log bitset: fix big endian find_next_zero_bit 2006-02-02 15:07:13 -08:00
dm-log.h
dm-mpath.c [PATCH] device-mapper dm-mpath: endio spinlock fix 2005-11-22 09:14:31 -08:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c [PATCH] device-mapper raid1: add default mirror 2006-01-06 08:34:00 -08:00
dm-round-robin.c
dm-snap.c [PATCH] device-mapper snapshot: barriers not supported 2006-02-01 08:53:11 -08:00
dm-snap.h [PATCH] device-mapper snapshot: load metadata on creation 2006-02-01 08:53:10 -08:00
dm-stripe.c [PATCH] dm stripe: Fix bounds 2006-03-17 07:51:25 -08:00
dm-table.c [PATCH] dm: dm-table warning fix 2006-02-01 08:53:11 -08:00
dm-target.c
dm-zero.c
dm.c [PATCH] dm: free minor after unlink gendisk 2006-02-24 14:31:39 -08:00
dm.h [PATCH] device-mapper: make lock_fs optional 2006-01-06 08:34:01 -08:00
faulty.c [PATCH] md: allow array level to be set textually via sysfs 2006-01-06 08:34:09 -08:00
Kconfig
kcopyd.c [PATCH] EDAC: atomic scrub operations 2006-01-18 19:20:30 -08:00
kcopyd.h
linear.c [PATCH] md: allow array level to be set textually via sysfs 2006-01-06 08:34:09 -08:00
Makefile
md.c [PATCH] md: Make sure rdev->size gets set for version-1 superblocks 2006-02-03 08:32:00 -08:00
mktables.c
multipath.c [PATCH] Decrease number of pointer derefs in multipath.c 2006-01-10 08:02:01 -08:00
raid0.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
raid1.c [PATCH] md: Fix several raid1 bugs which cause a memory leak 2006-03-09 19:47:37 -08:00
raid5.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6main.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c [PATCH] md: Assorted little md fixes 2006-02-03 08:32:00 -08:00
unroll.pl
xor.c