aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2008-10-21 12:44:57 -0400
committerAlasdair G Kergon <agk@redhat.com>2008-10-21 12:44:57 -0400
commitd63a5ce3c0d25c96bdadc78792e5b48b846e899d (patch)
treeac46375b47f784dff17d1e657d5115b45ad86844 /include/linux/device-mapper.h
parent7acedc5b98a2fcff64f00c21110aae7d3ac2f7df (diff)
dm: publish array_too_big
Move array_too_big to include/linux/device-mapper.h because it is used by targets. Remove the test from dm-raid1 as the number of mirror legs is limited such that it can never fail. (Even for stripes it seems rather unlikely.) Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 08d783592b73..dfb30db475ed 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -354,6 +354,9 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
354 */ 354 */
355#define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz)) 355#define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz))
356 356
357#define dm_array_too_big(fixed, obj, num) \
358 ((num) > (UINT_MAX - (fixed)) / (obj))
359
357static inline sector_t to_sector(unsigned long n) 360static inline sector_t to_sector(unsigned long n)
358{ 361{
359 return (n >> SECTOR_SHIFT); 362 return (n >> SECTOR_SHIFT);