aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/exofs.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2008-10-28 09:38:12 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2009-03-31 12:44:31 -0400
commite6af00f1d1697ca41ab6a55307066ef3466833a9 (patch)
tree7aa0b64f14a994f30e6bdc8e8c0b7f811038e794 /fs/exofs/exofs.h
parentbeaec07ba6af35d387643b76a2920a7a6e22207b (diff)
exofs: dir_inode and directory operations
implementation of directory and inode operations. * A directory is treated as a file, and essentially contains a list of <file name, inode #> pairs for files that are found in that directory. The object IDs correspond to the files' inode numbers and are allocated using a 64bit incrementing global counter. * Each file's control block (AKA on-disk inode) is stored in its object's attributes. This applies to both regular files and other types (directories, device files, symlinks, etc.). Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/exofs.h')
-rw-r--r--fs/exofs/exofs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index 0276242326ab..d11982c67e2a 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -124,6 +124,11 @@ static inline struct exofs_i_info *exofs_i(struct inode *inode)
124 return container_of(inode, struct exofs_i_info, vfs_inode); 124 return container_of(inode, struct exofs_i_info, vfs_inode);
125} 125}
126 126
127/*
128 * Maximum count of links to a file
129 */
130#define EXOFS_LINK_MAX 32000
131
127/************************* 132/*************************
128 * function declarations * 133 * function declarations *
129 *************************/ 134 *************************/
@@ -133,10 +138,27 @@ int exofs_setattr(struct dentry *, struct iattr *);
133int exofs_write_begin(struct file *file, struct address_space *mapping, 138int exofs_write_begin(struct file *file, struct address_space *mapping,
134 loff_t pos, unsigned len, unsigned flags, 139 loff_t pos, unsigned len, unsigned flags,
135 struct page **pagep, void **fsdata); 140 struct page **pagep, void **fsdata);
141extern struct inode *exofs_iget(struct super_block *, unsigned long);
142struct inode *exofs_new_inode(struct inode *, int);
143
144/* dir.c: */
145int exofs_add_link(struct dentry *, struct inode *);
146ino_t exofs_inode_by_name(struct inode *, struct dentry *);
147int exofs_delete_entry(struct exofs_dir_entry *, struct page *);
148int exofs_make_empty(struct inode *, struct inode *);
149struct exofs_dir_entry *exofs_find_entry(struct inode *, struct dentry *,
150 struct page **);
151int exofs_empty_dir(struct inode *);
152struct exofs_dir_entry *exofs_dotdot(struct inode *, struct page **);
153int exofs_set_link(struct inode *, struct exofs_dir_entry *, struct page *,
154 struct inode *);
136 155
137/********************* 156/*********************
138 * operation vectors * 157 * operation vectors *
139 *********************/ 158 *********************/
159/* dir.c: */
160extern const struct file_operations exofs_dir_operations;
161
140/* file.c */ 162/* file.c */
141extern const struct inode_operations exofs_file_inode_operations; 163extern const struct inode_operations exofs_file_inode_operations;
142extern const struct file_operations exofs_file_operations; 164extern const struct file_operations exofs_file_operations;
@@ -144,6 +166,10 @@ extern const struct file_operations exofs_file_operations;
144/* inode.c */ 166/* inode.c */
145extern const struct address_space_operations exofs_aops; 167extern const struct address_space_operations exofs_aops;
146 168
169/* namei.c */
170extern const struct inode_operations exofs_dir_inode_operations;
171extern const struct inode_operations exofs_special_inode_operations;
172
147/* symlink.c */ 173/* symlink.c */
148extern const struct inode_operations exofs_symlink_inode_operations; 174extern const struct inode_operations exofs_symlink_inode_operations;
149extern const struct inode_operations exofs_fast_symlink_inode_operations; 175extern const struct inode_operations exofs_fast_symlink_inode_operations;