1/* 2 * linux/fs/fat/buffer.c 3 * 4 * 5 */ 6 7#include <linux/mm.h> 8#include <linux/slab.h> 9#include <linux/string.h> 10#include <linux/fs.h> 11#include <linux/blkdev.h> 12#include <linux/msdos_fs.h> 13#include <linux/fat_cvf.h> 14 15# define PRINTK(x) 16 17struct buffer_head *fat_bread(struct super_block *sb, int block) 18{ 19 return MSDOS_SB(sb)->cvf_format->cvf_bread(sb,block); 20} 21struct buffer_head *fat_getblk(struct super_block *sb, int block) 22{ 23 return MSDOS_SB(sb)->cvf_format->cvf_getblk(sb,block); 24} 25void fat_brelse (struct super_block *sb, struct buffer_head *bh) 26{ 27 if (bh) 28 MSDOS_SB(sb)->cvf_format->cvf_brelse(sb,bh); 29} 30void fat_mark_buffer_dirty ( 31 struct super_block *sb, 32 struct buffer_head *bh) 33{ 34 MSDOS_SB(sb)->cvf_format->cvf_mark_buffer_dirty(sb,bh); 35} 36void fat_set_uptodate ( 37 struct super_block *sb, 38 struct buffer_head *bh, 39 int val) 40{ 41 MSDOS_SB(sb)->cvf_format->cvf_set_uptodate(sb,bh,val); 42} 43int fat_is_uptodate(struct super_block *sb, struct buffer_head *bh) 44{ 45 return MSDOS_SB(sb)->cvf_format->cvf_is_uptodate(sb,bh); 46} 47void fat_ll_rw_block ( 48 struct super_block *sb, 49 int opr, 50 int nbreq, 51 struct buffer_head *bh[32]) 52{ 53 MSDOS_SB(sb)->cvf_format->cvf_ll_rw_block(sb,opr,nbreq,bh); 54} 55 56struct buffer_head *default_fat_bread(struct super_block *sb, int block) 57{ 58 return sb_bread(sb, block); 59} 60 61struct buffer_head *default_fat_getblk(struct super_block *sb, int block) 62{ 63 return sb_getblk(sb, block); 64} 65 66void default_fat_brelse(struct super_block *sb, struct buffer_head *bh) 67{ 68 brelse (bh); 69} 70 71void default_fat_mark_buffer_dirty ( 72 struct super_block *sb, 73 struct buffer_head *bh) 74{ 75 mark_buffer_dirty (bh); 76} 77 78void default_fat_set_uptodate ( 79 struct super_block *sb, 80 struct buffer_head *bh, 81 int val) 82{ 83 mark_buffer_uptodate(bh, val); 84} 85 86int default_fat_is_uptodate (struct super_block *sb, struct buffer_head *bh) 87{ 88 return buffer_uptodate(bh); 89} 90 91void default_fat_ll_rw_block ( 92 struct super_block *sb, 93 int opr, 94 int nbreq, 95 struct buffer_head *bh[32]) 96{ 97 ll_rw_block(opr,nbreq,bh); 98} 99