ext4: add block device unregister by name & all methods
[lwext4.git] / include / ext4_misc.h
index e5dcff651a2c9b7579d3d93c4553f3beca3ef014..3067d4decaecb41853308fdf150f8e552f3f74e9 100644 (file)
@@ -44,6 +44,11 @@ extern "C" {
 
 #include <stdint.h>
 
+/**************************************************************/
+
+#define EXT4_DIV_ROUND_UP(x, y) (((x) + (y) - 1)/(y))
+#define EXT4_ALIGN(x, y) ((y) * EXT4_DIV_ROUND_UP((x), (y)))
+
 /****************************Endian conversion*****************/
 
 static inline uint64_t reorder64(uint64_t n)