summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTao Ma2012-12-10 20:05:57 +0100
committerTheodore Ts'o2012-12-10 20:05:57 +0100
commita774f9c20e08643fc0e6c48b0419ad7657ed0c04 (patch)
treede774f5b58346174e1e867dbf49f7c4604544d48 /fs/ext4/ext4.h
parentext4: add delalloc support for inline data (diff)
downloadkernel-qcow2-linux-a774f9c20e08643fc0e6c48b0419ad7657ed0c04.tar.gz
kernel-qcow2-linux-a774f9c20e08643fc0e6c48b0419ad7657ed0c04.tar.xz
kernel-qcow2-linux-a774f9c20e08643fc0e6c48b0419ad7657ed0c04.zip
ext4: make ext4_init_dot_dotdot for inline dir usage
Currently, the initialization of dot and dotdot are encapsulated in ext4_mkdir and also bond with dir_block. So create a new function named ext4_init_new_dir and the initialization is moved to ext4_init_dot_dotdot. Now it will called either in the normal non-inline case(rec_len of ".." will cover the whole block) or when we converting an inline dir to a block(rec len of ".." will be the real length). The start of the next entry is also returned for inline dir usage. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 268636af7f5c..cf840146ce81 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2415,6 +2415,10 @@ extern void ext4_unwritten_wait(struct inode *inode);
extern const struct inode_operations ext4_dir_inode_operations;
extern const struct inode_operations ext4_special_inode_operations;
extern struct dentry *ext4_get_parent(struct dentry *child);
+extern struct ext4_dir_entry_2 *ext4_init_dot_dotdot(struct inode *inode,
+ struct ext4_dir_entry_2 *de,
+ int blocksize, int csum_size,
+ unsigned int parent_ino, int dotdot_real_len);
/* symlink.c */
extern const struct inode_operations ext4_symlink_inode_operations;