diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2008-10-28 15:38:12 +0200 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2009-03-31 19:44:31 +0300 |
commit | e6af00f1d1697ca41ab6a55307066ef3466833a9 (patch) | |
tree | 7aa0b64f14a994f30e6bdc8e8c0b7f811038e794 /fs/exofs/exofs.h | |
parent | beaec07ba6af35d387643b76a2920a7a6e22207b (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.h | 26 |
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) return container_of(inode, struct exofs_i_info, vfs_inode); } +/* + * Maximum count of links to a file + */ +#define EXOFS_LINK_MAX 32000 + /************************* * function declarations * *************************/ @@ -133,10 +138,27 @@ int exofs_setattr(struct dentry *, struct iattr *); int exofs_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata); +extern struct inode *exofs_iget(struct super_block *, unsigned long); +struct inode *exofs_new_inode(struct inode *, int); + +/* dir.c: */ +int exofs_add_link(struct dentry *, struct inode *); +ino_t exofs_inode_by_name(struct inode *, struct dentry *); +int exofs_delete_entry(struct exofs_dir_entry *, struct page *); +int exofs_make_empty(struct inode *, struct inode *); +struct exofs_dir_entry *exofs_find_entry(struct inode *, struct dentry *, + struct page **); +int exofs_empty_dir(struct inode *); +struct exofs_dir_entry *exofs_dotdot(struct inode *, struct page **); +int exofs_set_link(struct inode *, struct exofs_dir_entry *, struct page *, + struct inode *); /********************* * operation vectors * *********************/ +/* dir.c: */ +extern const struct file_operations exofs_dir_operations; + /* file.c */ extern const struct inode_operations exofs_file_inode_operations; extern const struct file_operations exofs_file_operations; @@ -144,6 +166,10 @@ extern const struct file_operations exofs_file_operations; /* inode.c */ extern const struct address_space_operations exofs_aops; +/* namei.c */ +extern const struct inode_operations exofs_dir_inode_operations; +extern const struct inode_operations exofs_special_inode_operations; + /* symlink.c */ extern const struct inode_operations exofs_symlink_inode_operations; extern const struct inode_operations exofs_fast_symlink_inode_operations; |