diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /fs/minix/minix.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'fs/minix/minix.h')
-rw-r--r-- | fs/minix/minix.h | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/fs/minix/minix.h b/fs/minix/minix.h new file mode 100644 index 000000000000..e42a8bb89001 --- /dev/null +++ b/fs/minix/minix.h | |||
@@ -0,0 +1,96 @@ | |||
1 | #include <linux/fs.h> | ||
2 | #include <linux/pagemap.h> | ||
3 | #include <linux/minix_fs.h> | ||
4 | |||
5 | /* | ||
6 | * change the define below to 0 if you want names > info->s_namelen chars to be | ||
7 | * truncated. Else they will be disallowed (ENAMETOOLONG). | ||
8 | */ | ||
9 | #define NO_TRUNCATE 1 | ||
10 | |||
11 | #define INODE_VERSION(inode) minix_sb(inode->i_sb)->s_version | ||
12 | |||
13 | #define MINIX_V1 0x0001 /* original minix fs */ | ||
14 | #define MINIX_V2 0x0002 /* minix V2 fs */ | ||
15 | |||
16 | /* | ||
17 | * minix fs inode data in memory | ||
18 | */ | ||
19 | struct minix_inode_info { | ||
20 | union { | ||
21 | __u16 i1_data[16]; | ||
22 | __u32 i2_data[16]; | ||
23 | } u; | ||
24 | struct inode vfs_inode; | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * minix super-block data in memory | ||
29 | */ | ||
30 | struct minix_sb_info { | ||
31 | unsigned long s_ninodes; | ||
32 | unsigned long s_nzones; | ||
33 | unsigned long s_imap_blocks; | ||
34 | unsigned long s_zmap_blocks; | ||
35 | unsigned long s_firstdatazone; | ||
36 | unsigned long s_log_zone_size; | ||
37 | unsigned long s_max_size; | ||
38 | int s_dirsize; | ||
39 | int s_namelen; | ||
40 | int s_link_max; | ||
41 | struct buffer_head ** s_imap; | ||
42 | struct buffer_head ** s_zmap; | ||
43 | struct buffer_head * s_sbh; | ||
44 | struct minix_super_block * s_ms; | ||
45 | unsigned short s_mount_state; | ||
46 | unsigned short s_version; | ||
47 | }; | ||
48 | |||
49 | extern struct minix_inode * minix_V1_raw_inode(struct super_block *, ino_t, struct buffer_head **); | ||
50 | extern struct minix2_inode * minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **); | ||
51 | extern struct inode * minix_new_inode(const struct inode * dir, int * error); | ||
52 | extern void minix_free_inode(struct inode * inode); | ||
53 | extern unsigned long minix_count_free_inodes(struct minix_sb_info *sbi); | ||
54 | extern int minix_new_block(struct inode * inode); | ||
55 | extern void minix_free_block(struct inode * inode, int block); | ||
56 | extern unsigned long minix_count_free_blocks(struct minix_sb_info *sbi); | ||
57 | |||
58 | extern int minix_getattr(struct vfsmount *, struct dentry *, struct kstat *); | ||
59 | |||
60 | extern void V2_minix_truncate(struct inode *); | ||
61 | extern void V1_minix_truncate(struct inode *); | ||
62 | extern void V2_minix_truncate(struct inode *); | ||
63 | extern void minix_truncate(struct inode *); | ||
64 | extern int minix_sync_inode(struct inode *); | ||
65 | extern void minix_set_inode(struct inode *, dev_t); | ||
66 | extern int V1_minix_get_block(struct inode *, long, struct buffer_head *, int); | ||
67 | extern int V2_minix_get_block(struct inode *, long, struct buffer_head *, int); | ||
68 | extern unsigned V1_minix_blocks(loff_t); | ||
69 | extern unsigned V2_minix_blocks(loff_t); | ||
70 | |||
71 | extern struct minix_dir_entry *minix_find_entry(struct dentry*, struct page**); | ||
72 | extern int minix_add_link(struct dentry*, struct inode*); | ||
73 | extern int minix_delete_entry(struct minix_dir_entry*, struct page*); | ||
74 | extern int minix_make_empty(struct inode*, struct inode*); | ||
75 | extern int minix_empty_dir(struct inode*); | ||
76 | extern void minix_set_link(struct minix_dir_entry*, struct page*, struct inode*); | ||
77 | extern struct minix_dir_entry *minix_dotdot(struct inode*, struct page**); | ||
78 | extern ino_t minix_inode_by_name(struct dentry*); | ||
79 | |||
80 | extern int minix_sync_file(struct file *, struct dentry *, int); | ||
81 | |||
82 | extern struct inode_operations minix_file_inode_operations; | ||
83 | extern struct inode_operations minix_dir_inode_operations; | ||
84 | extern struct file_operations minix_file_operations; | ||
85 | extern struct file_operations minix_dir_operations; | ||
86 | extern struct dentry_operations minix_dentry_operations; | ||
87 | |||
88 | static inline struct minix_sb_info *minix_sb(struct super_block *sb) | ||
89 | { | ||
90 | return sb->s_fs_info; | ||
91 | } | ||
92 | |||
93 | static inline struct minix_inode_info *minix_i(struct inode *inode) | ||
94 | { | ||
95 | return list_entry(inode, struct minix_inode_info, vfs_inode); | ||
96 | } | ||