From: Joe Thornber Move to_bytes() and to_sectors() into dm.h --- 25-akpm/drivers/md/dm.c | 9 --------- 25-akpm/drivers/md/dm.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff -puN drivers/md/dm.c~dm-02-move-to_bytes-to_sectors drivers/md/dm.c --- 25/drivers/md/dm.c~dm-02-move-to_bytes-to_sectors Tue Feb 10 13:01:36 2004 +++ 25-akpm/drivers/md/dm.c Tue Feb 10 13:01:36 2004 @@ -233,15 +233,6 @@ static int queue_io(struct mapped_device * interests of getting something for people to use I give * you this clearly demarcated crap. *---------------------------------------------------------------*/ -static inline sector_t to_sector(unsigned int bytes) -{ - return bytes >> SECTOR_SHIFT; -} - -static inline unsigned int to_bytes(sector_t sector) -{ - return sector << SECTOR_SHIFT; -} /* * Decrements the number of outstanding ios that a bio has been diff -puN drivers/md/dm.h~dm-02-move-to_bytes-to_sectors drivers/md/dm.h --- 25/drivers/md/dm.h~dm-02-move-to_bytes-to_sectors Tue Feb 10 13:01:36 2004 +++ 25-akpm/drivers/md/dm.h Tue Feb 10 13:01:36 2004 @@ -151,6 +151,16 @@ static inline unsigned long dm_div_up(un return dm_round_up(n, size) / size; } +static inline sector_t to_sector(unsigned long n) +{ + return (n >> 9); +} + +static inline unsigned long to_bytes(sector_t n) +{ + return (n << 9); +} + /* * The device-mapper can be driven through one of two interfaces; * ioctl or filesystem, depending which patch you have applied. _