f2fs.h (1e87a78d95ecea7a989349860feb42db3e4b7db5) f2fs.h (ed57c27f736f6d8a51e442610c800ee0c3d83977)
1/*
2 * fs/f2fs/f2fs.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 204 unchanged lines hidden (view full) ---

213 unsigned long flags; /* use to pass per-file flags */
214 struct rw_semaphore i_sem; /* protect fi info */
215 atomic_t dirty_dents; /* # of dirty dentry pages */
216 f2fs_hash_t chash; /* hash value of given file name */
217 unsigned int clevel; /* maximum level of given file name */
218 nid_t i_xattr_nid; /* node id that contains xattrs */
219 unsigned long long xattr_ver; /* cp version of xattr modification */
220 struct extent_info ext; /* in-memory extent cache entry */
1/*
2 * fs/f2fs/f2fs.h
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 204 unchanged lines hidden (view full) ---

213 unsigned long flags; /* use to pass per-file flags */
214 struct rw_semaphore i_sem; /* protect fi info */
215 atomic_t dirty_dents; /* # of dirty dentry pages */
216 f2fs_hash_t chash; /* hash value of given file name */
217 unsigned int clevel; /* maximum level of given file name */
218 nid_t i_xattr_nid; /* node id that contains xattrs */
219 unsigned long long xattr_ver; /* cp version of xattr modification */
220 struct extent_info ext; /* in-memory extent cache entry */
221 struct dir_inode_entry *dirty_dir; /* the pointer of dirty dir */
221};
222
223static inline void get_extent_info(struct extent_info *ext,
224 struct f2fs_extent i_ext)
225{
226 write_lock(&ext->ext_lock);
227 ext->fofs = le32_to_cpu(i_ext.fofs);
228 ext->blk_addr = le32_to_cpu(i_ext.blk_addr);

--- 724 unchanged lines hidden (view full) ---

953 *addr &= ~mask;
954 return ret;
955}
956
957/* used for f2fs_inode_info->flags */
958enum {
959 FI_NEW_INODE, /* indicate newly allocated inode */
960 FI_DIRTY_INODE, /* indicate inode is dirty or not */
222};
223
224static inline void get_extent_info(struct extent_info *ext,
225 struct f2fs_extent i_ext)
226{
227 write_lock(&ext->ext_lock);
228 ext->fofs = le32_to_cpu(i_ext.fofs);
229 ext->blk_addr = le32_to_cpu(i_ext.blk_addr);

--- 724 unchanged lines hidden (view full) ---

954 *addr &= ~mask;
955 return ret;
956}
957
958/* used for f2fs_inode_info->flags */
959enum {
960 FI_NEW_INODE, /* indicate newly allocated inode */
961 FI_DIRTY_INODE, /* indicate inode is dirty or not */
962 FI_DIRTY_DIR, /* indicate directory has dirty pages */
961 FI_INC_LINK, /* need to increment i_nlink */
962 FI_ACL_MODE, /* indicate acl mode */
963 FI_NO_ALLOC, /* should not allocate any blocks */
964 FI_UPDATE_DIR, /* should update inode block for consistency */
965 FI_DELAY_IPUT, /* used for the recovery */
966 FI_NO_EXTENT, /* not to use the extent cache */
967 FI_INLINE_XATTR, /* used for inline xattr */
968 FI_INLINE_DATA, /* used for inline data*/

--- 248 unchanged lines hidden (view full) ---

1217void release_orphan_inode(struct f2fs_sb_info *);
1218void add_orphan_inode(struct f2fs_sb_info *, nid_t);
1219void remove_orphan_inode(struct f2fs_sb_info *, nid_t);
1220void recover_orphan_inodes(struct f2fs_sb_info *);
1221int get_valid_checkpoint(struct f2fs_sb_info *);
1222void set_dirty_dir_page(struct inode *, struct page *);
1223void add_dirty_dir_inode(struct inode *);
1224void remove_dirty_dir_inode(struct inode *);
963 FI_INC_LINK, /* need to increment i_nlink */
964 FI_ACL_MODE, /* indicate acl mode */
965 FI_NO_ALLOC, /* should not allocate any blocks */
966 FI_UPDATE_DIR, /* should update inode block for consistency */
967 FI_DELAY_IPUT, /* used for the recovery */
968 FI_NO_EXTENT, /* not to use the extent cache */
969 FI_INLINE_XATTR, /* used for inline xattr */
970 FI_INLINE_DATA, /* used for inline data*/

--- 248 unchanged lines hidden (view full) ---

1219void release_orphan_inode(struct f2fs_sb_info *);
1220void add_orphan_inode(struct f2fs_sb_info *, nid_t);
1221void remove_orphan_inode(struct f2fs_sb_info *, nid_t);
1222void recover_orphan_inodes(struct f2fs_sb_info *);
1223int get_valid_checkpoint(struct f2fs_sb_info *);
1224void set_dirty_dir_page(struct inode *, struct page *);
1225void add_dirty_dir_inode(struct inode *);
1226void remove_dirty_dir_inode(struct inode *);
1225struct inode *check_dirty_dir_inode(struct f2fs_sb_info *, nid_t);
1226void sync_dirty_dir_inodes(struct f2fs_sb_info *);
1227void write_checkpoint(struct f2fs_sb_info *, bool);
1228void init_orphan_info(struct f2fs_sb_info *);
1229int __init create_checkpoint_caches(void);
1230void destroy_checkpoint_caches(void);
1231
1232/*
1233 * data.c

--- 163 unchanged lines hidden ---
1227void sync_dirty_dir_inodes(struct f2fs_sb_info *);
1228void write_checkpoint(struct f2fs_sb_info *, bool);
1229void init_orphan_info(struct f2fs_sb_info *);
1230int __init create_checkpoint_caches(void);
1231void destroy_checkpoint_caches(void);
1232
1233/*
1234 * data.c

--- 163 unchanged lines hidden ---