-
-/* map an inode to a cache */
-struct snap_cache *snap_get_cache(struct inode *inode)
-{
- struct snap_cache *cache;
-
- /* find the correct snap_cache here, based on the device */
- cache = snap_find_cache(inode->i_dev);
- if ( !cache ) {
- printk("WARNING: no cache for dev %d, ino %ld\n",
- inode->i_dev, inode->i_ino);
- return NULL;
- }
-
- return cache;
-}
-
-
-/* another debugging routine: check fs is InterMezzo fs */
-int snap_ispresto(struct inode *inode)
-{
- struct snap_cache *cache;
-
- if ( !inode )
- return 0;
- cache = snap_get_cache(inode);
- if ( !cache )
- return 0;
- return (inode->i_dev == cache->cache_dev);
-}
-