]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/nilfs2/alloc.h
Merge remote branch 'alsa/fixes' into fix/hda
[mv-sheeva.git] / fs / nilfs2 / alloc.h
index 4ace5475c2c7a10b61bd90aa1ba3fd2985aa2454..f4543ac4f56068d539b80b156e4096acd3c5e5ca 100644 (file)
@@ -69,4 +69,25 @@ int nilfs_palloc_freev(struct inode *, __u64 *, size_t);
 #define nilfs_clear_bit_atomic         ext2_clear_bit_atomic
 #define nilfs_find_next_zero_bit       ext2_find_next_zero_bit
 
+/*
+ * persistent object allocator cache
+ */
+
+struct nilfs_bh_assoc {
+       unsigned long blkoff;
+       struct buffer_head *bh;
+};
+
+struct nilfs_palloc_cache {
+       spinlock_t lock;
+       struct nilfs_bh_assoc prev_desc;
+       struct nilfs_bh_assoc prev_bitmap;
+       struct nilfs_bh_assoc prev_entry;
+};
+
+void nilfs_palloc_setup_cache(struct inode *inode,
+                             struct nilfs_palloc_cache *cache);
+void nilfs_palloc_clear_cache(struct inode *inode);
+void nilfs_palloc_destroy_cache(struct inode *inode);
+
 #endif /* _NILFS_ALLOC_H */