* [PATCH] dm: Allow tables to have devices with zero size
@ 2007-01-08 22:57 Mike Anderson
0 siblings, 0 replies; only message in thread
From: Mike Anderson @ 2007-01-08 22:57 UTC (permalink / raw)
To: dm-devel
From: Mike Anderson <andmike@us.ibm.com>
Allow check_device_area to succeed if a device has an i_size of zero. This
addresses an issue seen on DASD devices setting up a multipath table for
paths in online and offline state.
Signed-off-by: Mike Anderson <andmike@us.ibm.com>
---
drivers/md/dm-table.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6-patched/drivers/md/dm-table.c
===================================================================
--- linux-2.6-patched.orig/drivers/md/dm-table.c 2006-12-31 16:53:20.000000000 -0800
+++ linux-2.6-patched/drivers/md/dm-table.c 2007-01-08 08:15:33.000000000 -0800
@@ -432,7 +432,8 @@
{
sector_t dev_size;
dev_size = dd->bdev->bd_inode->i_size >> SECTOR_SHIFT;
- return ((start < dev_size) && (len <= (dev_size - start)));
+ return dev_size ?
+ ((start < dev_size) && (len <= (dev_size - start))) : 1;
}
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-08 22:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-08 22:57 [PATCH] dm: Allow tables to have devices with zero size Mike Anderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.