]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/device-mapper.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / include / linux / device-mapper.h
index e462c7f3b3917d5aa352c03403a418c56a06c86b..dfb30db475ed61c2c5562952c3e8add25a1754a2 100644 (file)
@@ -267,6 +267,11 @@ void dm_table_event(struct dm_table *t);
  */
 int dm_swap_table(struct mapped_device *md, struct dm_table *t);
 
+/*
+ * A wrapper around vmalloc.
+ */
+void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
+
 /*-----------------------------------------------------------------
  * Macros.
  *---------------------------------------------------------------*/
@@ -349,6 +354,9 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *t);
  */
 #define dm_round_up(n, sz) (dm_div_up((n), (sz)) * (sz))
 
+#define dm_array_too_big(fixed, obj, num) \
+       ((num) > (UINT_MAX - (fixed)) / (obj))
+
 static inline sector_t to_sector(unsigned long n)
 {
        return (n >> SECTOR_SHIFT);