Define SECTOR_SHIFT and SECTOR_SIZE in dm.h so each individual DM source file doesn't have to define them. diff -Naur linux-2.4.20-dm-7/drivers/md/dm-exception-store.c linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm-exception-store.c --- linux-2.4.20-dm-7/drivers/md/dm-exception-store.c Tue Feb 4 14:28:39 2003 +++ linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm-exception-store.c Tue Feb 4 14:26:44 2003 @@ -14,9 +14,6 @@ #include <linux/vmalloc.h> #include <linux/slab.h> -#define SECTOR_SIZE 512 -#define SECTOR_SHIFT 9 - /*----------------------------------------------------------------- * Persistent snapshots, by persistent we mean that the snapshot * will survive a reboot. diff -Naur linux-2.4.20-dm-7/drivers/md/dm-snapshot.c linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm-snapshot.c --- linux-2.4.20-dm-7/drivers/md/dm-snapshot.c Tue Feb 4 14:28:39 2003 +++ linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm-snapshot.c Tue Feb 4 14:26:44 2003 @@ -36,11 +36,6 @@ #define WAKE_UP_PERCENT 5 /* - * Hard sector size used all over the kernel - */ -#define SECTOR_SIZE 512 - -/* * kcopyd priority of snapshot operations */ #define SNAPSHOT_COPY_PRIORITY 2 diff -Naur linux-2.4.20-dm-7/drivers/md/dm.c linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm.c --- linux-2.4.20-dm-7/drivers/md/dm.c Tue Feb 4 14:28:39 2003 +++ linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm.c Tue Feb 4 14:26:44 2003 @@ -19,7 +19,6 @@ static const char *_name = DM_NAME; #define MAX_DEVICES (1 << MINORBITS) -#define SECTOR_SHIFT 9 #define DEFAULT_READ_AHEAD 64 static int major = 0; diff -Naur linux-2.4.20-dm-7/drivers/md/dm.h linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm.h --- linux-2.4.20-dm-7/drivers/md/dm.h Tue Feb 4 14:28:39 2003 +++ linux-2.4.20-evms-1.9.0-pre3/drivers/md/dm.h Tue Feb 4 14:26:44 2003 @@ -29,6 +29,9 @@ #define SECTOR_FORMAT "%lu" #endif +#define SECTOR_SHIFT 9 +#define SECTOR_SIZE (1 << SECTOR_SHIFT) + extern struct block_device_operations dm_blk_dops; /* diff -Naur linux-2.4.20-dm-7/drivers/md/kcopyd.c linux-2.4.20-evms-1.9.0-pre3/drivers/md/kcopyd.c --- linux-2.4.20-dm-7/drivers/md/kcopyd.c Tue Feb 4 14:28:39 2003 +++ linux-2.4.20-evms-1.9.0-pre3/drivers/md/kcopyd.c Tue Feb 4 14:26:44 2003 @@ -24,12 +24,6 @@ /* FIXME: this is only needed for the DMERR macros */ #include "dm.h" -/* - * Hard sector size used all over the kernel. - */ -#define SECTOR_SIZE 512 -#define SECTOR_SHIFT 9 - static void wake_kcopyd(void); /*-----------------------------------------------------------------