summaryrefslogtreecommitdiffstats
path: root/include/linux/minix_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/minix_fs.h')
-rw-r--r--include/linux/minix_fs.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index 33fd9c1d9..3bc020fcd 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -8,8 +8,7 @@
/*
* Thanks to Kees J Bot for sending me the definitions of the new
* minix filesystem (aka V2) with bigger inodes and 32-bit block
- * pointers. It's not actually implemented yet, but I'll look into
- * it.
+ * pointers.
*/
#define MINIX_ROOT_INO 1
@@ -18,14 +17,21 @@
#define MINIX_LINK_MAX 250
#define MINIX_I_MAP_SLOTS 8
-#define MINIX_Z_MAP_SLOTS 8
+#define MINIX_Z_MAP_SLOTS 64
#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
-#define NEW_MINIX_SUPER_MAGIC 0x2468 /* minix V2 - not implemented */
+#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
+#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
#define MINIX_VALID_FS 0x0001 /* Clean fs. */
#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
+#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
+
+#define MINIX_V1 0x0001 /* original minix fs */
+#define MINIX_V2 0x0002 /* minix V2 fs */
+
+#define INODE_VERSION(inode) inode->i_sb->u.minix_sb.s_version
/*
* This is the original minix inode layout on disk.
@@ -47,7 +53,7 @@ struct minix_inode {
* instead of 7+1+1). Also, some previously 8-bit values are
* now 16-bit. The inode is now 64 bytes instead of 32.
*/
-struct new_minix_inode {
+struct minix2_inode {
__u16 i_mode;
__u16 i_nlinks;
__u16 i_uid;
@@ -72,6 +78,7 @@ struct minix_super_block {
__u32 s_max_size;
__u16 s_magic;
__u16 s_state;
+ __u32 s_zones;
};
struct minix_dir_entry {
@@ -82,7 +89,7 @@ struct minix_dir_entry {
#ifdef __KERNEL__
extern int minix_lookup(struct inode * dir,const char * name, int len,
- struct inode ** result);
+ struct inode ** result);
extern int minix_create(struct inode * dir,const char * name, int len, int mode,
struct inode ** result);
extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode);
@@ -93,7 +100,7 @@ extern int minix_symlink(struct inode * inode, const char * name, int len,
extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len);
extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev);
extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len,
- struct inode * new_dir, const char * new_name, int new_len);
+ struct inode * new_dir, const char * new_name, int new_len, int must_be_dir);
extern struct inode * minix_new_inode(const struct inode * dir);
extern void minix_free_inode(struct inode * inode);
extern unsigned long minix_count_free_inodes(struct super_block *sb);
@@ -109,6 +116,7 @@ extern struct buffer_head * minix_bread(struct inode *, int, int);
extern void minix_truncate(struct inode *);
extern void minix_put_super(struct super_block *);
extern struct super_block *minix_read_super(struct super_block *,void *,int);
+extern int init_minix_fs(void);
extern void minix_write_super(struct super_block *);
extern int minix_remount (struct super_block * sb, int * flags, char * data);
extern void minix_read_inode(struct inode *);