CVS: is/fs25 dir.c,1.2,1.3 journal_ext3.c,1.2,1.3 super.c,1.3,1.4
Robert Read <[email protected]> Fri, 11 Oct 2002 19:16:22 -0700
| Newsgroups | gmane.comp.file-systems.intermezzo.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/intermezzo/is/fs25
In directory usw-pr-cvs1:/tmp/cvs-serv31268
Modified Files:
dir.c journal_ext3.c super.c
Log Message:
* fix some brainos, mount on 2.5 works
Index: dir.c
===================================================================
RCS file: /cvsroot/intermezzo/is/fs25/dir.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -U2 -r1.2 -r1.3
--- dir.c 11 Oct 2002 23:30:37 -0000 1.2
+++ dir.c 12 Oct 2002 02:16:19 -0000 1.3
@@ -33,4 +33,5 @@
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/namei.h>
#include <linux/ext2_fs.h>
#include <linux/slab.h>
Index: journal_ext3.c
===================================================================
RCS file: /cvsroot/intermezzo/is/fs25/journal_ext3.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -U2 -r1.2 -r1.3
--- journal_ext3.c 12 Oct 2002 00:10:16 -0000 1.2
+++ journal_ext3.c 12 Oct 2002 02:16:19 -0000 1.3
@@ -70,7 +70,7 @@
struct super_block *sb)
{
- loff_t freebl = le32_to_cpu(sb->u.ext3_sb.s_es->s_free_blocks_count);
+ loff_t freebl = le32_to_cpu(EXT3_SB(sb)->s_es->s_free_blocks_count);
loff_t avail = freebl -
- le32_to_cpu(sb->u.ext3_sb.s_es->s_r_blocks_count);
+ le32_to_cpu(EXT3_SB(sb)->s_es->s_r_blocks_count);
return (avail << EXT3_BLOCK_SIZE_BITS(sb));
}
@@ -95,5 +95,5 @@
}
- avail_kmlblocks = inode->i_sb->u.ext3_sb.s_es->s_free_blocks_count;
+ avail_kmlblocks = EXT3_SB(inode->i_sb)->s_es->s_free_blocks_count;
if ( avail_kmlblocks < 3 ) {
Index: super.c
===================================================================
RCS file: /cvsroot/intermezzo/is/fs25/super.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -U2 -r1.3 -r1.4
--- super.c 12 Oct 2002 00:10:16 -0000 1.3
+++ super.c 12 Oct 2002 02:16:19 -0000 1.4
@@ -117,5 +117,5 @@
* be a pointer to the end of the cache_data.
*/
-static char *presto_options(struct super_block *sb,
+static char *presto_options(struct file_system_type *fstype,
char *options, char *cache_data,
char **cache_type, char **fileset,
@@ -127,5 +127,5 @@
/* set the defaults */
- if (strcmp(sb->s_type->name, "intermezzo") == 0)
+ if (strcmp(fstype->name, "intermezzo") == 0)
opt_set_default(cache_type, "ext3");
else
@@ -216,5 +216,5 @@
/* read and validate options */
- cache_data_end = presto_options(sb, data, cache_data, &cache_type,
+ cache_data_end = presto_options(izo_type, data, cache_data, &cache_type,
&fileset, &channel);
@@ -222,5 +222,5 @@
if (cache_data_end == cache_data) {
PRESTO_FREE(cache_data, PAGE_SIZE);
- cache_data = NULL;
+ cache_data_end = cache_data = NULL;
} else {
CDEBUG(D_SUPER, "cache_data at %p is: %s\n", cache_data,
@@ -259,8 +259,8 @@
}
- /* can we in fact mount the cache */
- if ((fstype->fs_flags & FS_REQUIRES_DEV) && !sb->s_bdev) {
- CERROR("filesystem \"%s\" requires a valid block device\n",
- cache_type);
+ sb = fstype->get_sb(fstype, flags, devname, cache_data);
+
+ if ( !sb || IS_ERR(sb)) {
+ CERROR("InterMezzo: cache mount failure.\n");
MOD_DEC_USE_COUNT;
EXIT;
@@ -268,5 +268,11 @@
}
- sb = fstype->get_sb(fstype, flags, devname, data);
+ /* can we in fact mount the cache */
+ if (sb->s_bdev && (strcmp(fstype->name, "vintermezzo") == 0)) {
+ CERROR("vintermezzo must not be used with a block device\n");
+ MOD_DEC_USE_COUNT;
+ EXIT;
+ goto out_err;
+ }
/* this might have been freed above */
@@ -274,11 +280,4 @@
PRESTO_FREE(cache_data, PAGE_SIZE);
cache_data = NULL;
- }
-
- if ( !sb ) {
- CERROR("InterMezzo: cache mount failure.\n");
- MOD_DEC_USE_COUNT;
- EXIT;
- goto out_err;
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf