patch-2.1.79 linux/fs/fat/buffer.c
Next file: linux/fs/fat/cache.c
Previous file: linux/fs/fat/Makefile
Back to the patch index
Back to the overall index
- Lines: 93
- Date:
Thu Jan 8 14:02:41 1998
- Orig file:
v2.1.78/linux/fs/fat/buffer.c
- Orig date:
Sat Oct 25 02:44:17 1997
diff -u --recursive --new-file v2.1.78/linux/fs/fat/buffer.c linux/fs/fat/buffer.c
@@ -9,6 +9,7 @@
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/msdos_fs.h>
+#include <linux/fat_cvf.h>
#if 0
# define PRINTK(x) printk x
@@ -28,6 +29,11 @@
* is always of size 1024 (or 2048). Doing readahead may be
* counterproductive or just plain wrong.
*/
+
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_bread)
+ return MSDOS_SB(sb)->cvf_format->cvf_bread(sb,block);
+
if (sb->s_blocksize == 512) {
ret = bread (sb->s_dev,block,512);
} else {
@@ -92,6 +98,11 @@
{
struct buffer_head *ret = NULL;
PRINTK(("fat_getblk: block=0x%x\n", block));
+
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_getblk)
+ return MSDOS_SB(sb)->cvf_format->cvf_getblk(sb,block);
+
if (sb->s_blocksize == 512){
ret = getblk (sb->s_dev,block,512);
}else{
@@ -111,6 +122,10 @@
struct buffer_head *bh)
{
if (bh != NULL){
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_brelse)
+ return MSDOS_SB(sb)->cvf_format->cvf_brelse(sb,bh);
+
if (sb->s_blocksize == 512){
brelse (bh);
}else{
@@ -128,6 +143,12 @@
struct buffer_head *bh,
int dirty_val)
{
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_mark_buffer_dirty)
+ { MSDOS_SB(sb)->cvf_format->cvf_mark_buffer_dirty(sb,bh,dirty_val);
+ return;
+ }
+
if (sb->s_blocksize != 512){
bh = bh->b_next;
}
@@ -139,6 +160,12 @@
struct buffer_head *bh,
int val)
{
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_set_uptodate)
+ { MSDOS_SB(sb)->cvf_format->cvf_set_uptodate(sb,bh,val);
+ return;
+ }
+
if (sb->s_blocksize != 512){
bh = bh->b_next;
}
@@ -148,6 +175,10 @@
struct super_block *sb,
struct buffer_head *bh)
{
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_is_uptodate)
+ return MSDOS_SB(sb)->cvf_format->cvf_is_uptodate(sb,bh);
+
if (sb->s_blocksize != 512){
bh = bh->b_next;
}
@@ -160,6 +191,12 @@
int nbreq,
struct buffer_head *bh[32])
{
+ if(MSDOS_SB(sb)->cvf_format)
+ if(MSDOS_SB(sb)->cvf_format->cvf_ll_rw_block)
+ { MSDOS_SB(sb)->cvf_format->cvf_ll_rw_block(sb,opr,nbreq,bh);
+ return;
+ }
+
if (sb->s_blocksize == 512){
ll_rw_block(opr,nbreq,bh);
}else{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov