Re: 2.1.79 + fat = FUBAR

Dan Merillat (dan@merillat.org)
Tue, 20 Jan 1998 18:56:13 -0500


David Burrows writes:
> The subject pretty much says it all, I had a frantic stab to try to get it
> to work but ended up "rm -rf /usr/src/linux" instead. I was attempting to
> compile fat/vfat support as modules.

diff -ur linux/fs/vfat/namei.c linux-devel/fs/vfat/namei.c
--- linux/fs/vfat/namei.c Mon Dec 29 11:45:27 1997
+++ linux-devel/fs/vfat/namei.c Thu Jan 15 21:38:51 1998
@@ -321,7 +321,7 @@

static int vfat_find(struct inode *dir,struct qstr* name,
int find_long,int new_filename,int is_dir,
- struct slot_info *sinfo_out);
+ struct vfat_slot_info *sinfo_out);

/* Checks the validity of a long MS-DOS filename */
/* Returns negative number on error, 0 for a normal
@@ -519,7 +519,7 @@
int res;
int spaces;
char buf[8];
- struct slot_info sinfo;
+ struct vfat_slot_info sinfo;
const char *name_start;
struct qstr qname;

@@ -992,7 +992,7 @@
}

static int vfat_find(struct inode *dir,struct qstr* qname,
- int find_long, int new_filename,int is_dir,struct slot_info *sinfo_out)
+ int find_long, int new_filename,int is_dir,struct vfat_slot_info *sinfo_out)
{
struct super_block *sb = dir->i_sb;
struct vfat_find_info vf;
@@ -1118,7 +1118,7 @@
int vfat_lookup(struct inode *dir,struct dentry *dentry)
{
int res;
- struct slot_info sinfo;
+ struct vfat_slot_info sinfo;
struct inode *result;

PRINTK (("vfat_lookup: name=%s, len=%d\n",
@@ -1162,7 +1162,7 @@
loff_t offset;
struct buffer_head *bh;
struct msdos_dir_entry *de;
- struct slot_info sinfo;
+ struct vfat_slot_info sinfo;

*result=0;
PRINTK(("vfat_create_entry 1\n"));
@@ -1388,7 +1388,7 @@
return 0;
}

-static int vfat_remove_entry(struct inode *dir,struct slot_info *sinfo,
+static int vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo,
struct buffer_head **bh,struct dentry* dentry,
int is_dir,int nospc)
{
@@ -1428,7 +1428,7 @@
struct super_block *sb = dir->i_sb;
int res;
struct buffer_head *bh;
- struct slot_info sinfo;
+ struct vfat_slot_info sinfo;

res = vfat_find(dir,&dentry->d_name,1,0,0,&sinfo);

@@ -1463,7 +1463,7 @@
struct super_block *sb = dir->i_sb;
int res;
struct buffer_head *bh;
- struct slot_info sinfo;
+ struct vfat_slot_info sinfo;

bh = NULL;
res = vfat_find(dir,&dentry->d_name,1,0,0,&sinfo);
@@ -1540,7 +1540,7 @@
struct dentry *walk;
int res, is_dir, i;
int locked = 0;
- struct slot_info sinfo;
+ struct vfat_slot_info sinfo;

PRINTK(("vfat_rename 1\n"));
if (old_dir == new_dir &&
diff -ur linux/include/linux/msdos_fs.h linux-devel/include/linux/msdos_fs.h
--- linux/include/linux/msdos_fs.h Mon Jan 12 19:46:33 1998
+++ linux-devel/include/linux/msdos_fs.h Thu Jan 15 21:32:43 1998
@@ -222,7 +222,7 @@
extern void cache_init(void);
void cache_lookup(struct inode *inode,int cluster,int *f_clu,int *d_clu);
void cache_add(struct inode *inode,int f_clu,int d_clu);
-int get_cluster(struct inode *inode,int cluster);
+int fat_get_cluster(struct inode *inode,int cluster);

/* inode.c */
extern int fat_bmap(struct inode *inode,int block);

Compiles and works fine on my system now, uptime a day or so.
I'll give it a workout later, when I run quake2 off my fat32 partition.

--Dan