summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-07-16 15:08:54 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-07-26 19:34:30 -0700
commit76a9dd85d43b7b3d94e116437dc882e159887a6a (patch)
treec6f82e775434effec13235435a7a39338db331e6 /fs/f2fs/f2fs.h
parent5f4ce6abc2dadac67bfb8a14cfb1b9ac3941810f (diff)
downloadlinux-76a9dd85d43b7b3d94e116437dc882e159887a6a.tar.bz2
f2fs: spread struct f2fs_dentry_ptr for inline path
Use f2fs_dentry_ptr structure to indicate inline dentry structure as much as possible, so we can wrap inline dentry with size-fixed fields to the one with size-changeable fields. With this change, we can handle size-changeable inline dentry more easily. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 7a17b21411d7..70777a889e12 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -361,10 +361,11 @@ struct f2fs_flush_device {
/* for directory operations */
struct f2fs_dentry_ptr {
struct inode *inode;
- const void *bitmap;
+ void *bitmap;
struct f2fs_dir_entry *dentry;
__u8 (*filename)[F2FS_SLOT_LEN];
int max;
+ int nr_bitmap;
};
static inline void make_dentry_ptr_block(struct inode *inode,
@@ -372,6 +373,7 @@ static inline void make_dentry_ptr_block(struct inode *inode,
{
d->inode = inode;
d->max = NR_DENTRY_IN_BLOCK;
+ d->nr_bitmap = SIZE_OF_DENTRY_BITMAP;
d->bitmap = &t->dentry_bitmap;
d->dentry = t->dentry;
d->filename = t->filename;
@@ -382,6 +384,7 @@ static inline void make_dentry_ptr_inline(struct inode *inode,
{
d->inode = inode;
d->max = NR_INLINE_DENTRY;
+ d->nr_bitmap = INLINE_DENTRY_BITMAP_SIZE;
d->bitmap = &t->dentry_bitmap;
d->dentry = t->dentry;
d->filename = t->filename;