add btrie_map() for allocating free slot, remove isrm
[lunaix-os.git] / lunaix-os / includes / lunaix / block.h
index 0eb777542aaef8415ed3d29a6f9b0781b9f629c4..075ed3783ff92875b6e0b4c50cc89ff480427865 100644 (file)
@@ -48,6 +48,12 @@ typedef u64_t partition_t;
 typedef u32_t bdev_t;
 typedef void (*devfs_exporter)(struct block_dev* bdev, void* fsnode);
 
+static inline struct block_dev*
+block_dev(struct device* dev) 
+{
+    return (struct block_dev*)dev->underlay;
+}
+
 void
 block_init();