slab: Update the ctor/dtor interface
[akaros.git] / kern / src / blockdev.c
index 94f2fac..434051b 100644 (file)
@@ -20,10 +20,14 @@ struct kmem_cache *breq_kcache;
 
 void block_init(void)
 {
-       breq_kcache = kmem_cache_create("block_reqs", sizeof(struct block_request),
-                                       __alignof__(struct block_request), 0, 0, 0);
-       bh_kcache = kmem_cache_create("buffer_heads", sizeof(struct buffer_head),
-                                     __alignof__(struct buffer_head), 0, 0, 0);
+       breq_kcache = kmem_cache_create("block_reqs",
+                                       sizeof(struct block_request),
+                                       __alignof__(struct block_request), 0,
+                                       NULL, 0, 0, NULL);
+       bh_kcache = kmem_cache_create("buffer_heads",
+                                     sizeof(struct buffer_head),
+                                     __alignof__(struct buffer_head), 0,
+                                     NULL, 0, 0, NULL);
 
        #ifdef CONFIG_EXT2FS
        /* Now probe for and init the block device for the ext2 ram disk */
@@ -40,7 +44,7 @@ void block_init(void)
        ram_bd->b_data = _binary_mnt_ext2fs_img_start;
        strlcpy(ram_bd->b_name, "RAMDISK", BDEV_INLINE_NAME);
        /* Connect it to the file system */
-       struct file *ram_bf = make_device("/dev/ramdisk", S_IRUSR | S_IWUSR,
+       struct file *ram_bf = make_device("/dev_vfs/ramdisk", S_IRUSR | S_IWUSR,
                                          __S_IFBLK, &block_f_op);
        /* make sure the inode tracks the right pm (not it's internal one) */
        ram_bf->f_dentry->d_inode->i_mapping = &ram_bd->b_pm;
@@ -186,7 +190,7 @@ struct buffer_head *bdev_get_buffer(struct block_device *bdev,
        if (!blk_num)
                warn("Asking for the 0th block of a bdev...");
        /* Make sure there's a page in the page cache.  Should always be one. */
-       error = pm_load_page(pm, blk_num / blk_per_pg, &page); 
+       error = pm_load_page(pm, blk_num / blk_per_pg, &page);
        if (error)
                panic("Failed to load page! (%d)", error);
        my_buf = page2kva(page) + blk_offset;