5/19
Joe Thornber (joe@fib011235813.fsnet.co.uk)
Mon, 16 Dec 2002 10:09:01 +0000
check_device_area was comparing the bytes with sectors.
[Stefan Lauterbach]
--- diff/drivers/md/dm-table.c 2002-12-16 09:40:34.000000000 +0000
+++ source/drivers/md/dm-table.c 2002-12-16 09:40:44.000000000 +0000
@@ -388,7 +388,7 @@
static int check_device_area(struct dm_dev *dd, sector_t start, sector_t len)
{
sector_t dev_size;
- dev_size = dd->bdev->bd_inode->i_size;
+ dev_size = dd->bdev->bd_inode->i_size >> SECTOR_SHIFT;
return ((start < dev_size) && (len <= (dev_size - start)));
}
--- diff/drivers/md/dm.c 2002-11-28 11:30:39.000000000 +0000
+++ source/drivers/md/dm.c 2002-12-16 09:40:44.000000000 +0000
@@ -16,7 +16,6 @@
static const char *_name = DM_NAME;
#define MAX_DEVICES (1 << KDEV_MINOR_BITS)
-#define SECTOR_SHIFT 9
static int major = 0;
static int _major = 0;
--- diff/drivers/md/dm.h 2002-11-18 10:11:54.000000000 +0000
+++ source/drivers/md/dm.h 2002-12-16 09:40:44.000000000 +0000
@@ -29,6 +29,8 @@
#define SECTOR_FORMAT "%lu"
#endif
+#define SECTOR_SHIFT 9
+
extern struct block_device_operations dm_blk_dops;
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/