f2fs.h (d8a9a22992f97cb3e2a7f6e706ecd510d5783e44) | f2fs.h (b323fd28bbf95c3181e02e7a642b7d24f3e32714) |
---|---|
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 --- 400 unchanged lines hidden (view full) --- 409 u32 segments; /* # of segments to flush */ 410}; 411 412/* for inline stuff */ 413#define DEF_INLINE_RESERVED_SIZE 1 414#define DEF_MIN_INLINE_SIZE 1 415static inline int get_extra_isize(struct inode *inode); 416static inline int get_inline_xattr_addrs(struct inode *inode); | 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 --- 400 unchanged lines hidden (view full) --- 409 u32 segments; /* # of segments to flush */ 410}; 411 412/* for inline stuff */ 413#define DEF_INLINE_RESERVED_SIZE 1 414#define DEF_MIN_INLINE_SIZE 1 415static inline int get_extra_isize(struct inode *inode); 416static inline int get_inline_xattr_addrs(struct inode *inode); |
417#define F2FS_INLINE_XATTR_ADDRS(inode) get_inline_xattr_addrs(inode) | |
418#define MAX_INLINE_DATA(inode) (sizeof(__le32) * \ 419 (CUR_ADDRS_PER_INODE(inode) - \ | 417#define MAX_INLINE_DATA(inode) (sizeof(__le32) * \ 418 (CUR_ADDRS_PER_INODE(inode) - \ |
420 F2FS_INLINE_XATTR_ADDRS(inode) - \ | 419 get_inline_xattr_addrs(inode) - \ |
421 DEF_INLINE_RESERVED_SIZE)) 422 423/* for inline dir */ 424#define NR_INLINE_DENTRY(inode) (MAX_INLINE_DATA(inode) * BITS_PER_BYTE / \ 425 ((SIZE_OF_DIR_ENTRY + F2FS_SLOT_LEN) * \ 426 BITS_PER_BYTE + 1)) 427#define INLINE_DENTRY_BITMAP_SIZE(inode) ((NR_INLINE_DENTRY(inode) + \ 428 BITS_PER_BYTE - 1) / BITS_PER_BYTE) --- 1890 unchanged lines hidden (view full) --- 2319 2320static inline int f2fs_has_inline_xattr(struct inode *inode) 2321{ 2322 return is_inode_flag_set(inode, FI_INLINE_XATTR); 2323} 2324 2325static inline unsigned int addrs_per_inode(struct inode *inode) 2326{ | 420 DEF_INLINE_RESERVED_SIZE)) 421 422/* for inline dir */ 423#define NR_INLINE_DENTRY(inode) (MAX_INLINE_DATA(inode) * BITS_PER_BYTE / \ 424 ((SIZE_OF_DIR_ENTRY + F2FS_SLOT_LEN) * \ 425 BITS_PER_BYTE + 1)) 426#define INLINE_DENTRY_BITMAP_SIZE(inode) ((NR_INLINE_DENTRY(inode) + \ 427 BITS_PER_BYTE - 1) / BITS_PER_BYTE) --- 1890 unchanged lines hidden (view full) --- 2318 2319static inline int f2fs_has_inline_xattr(struct inode *inode) 2320{ 2321 return is_inode_flag_set(inode, FI_INLINE_XATTR); 2322} 2323 2324static inline unsigned int addrs_per_inode(struct inode *inode) 2325{ |
2327 return CUR_ADDRS_PER_INODE(inode) - F2FS_INLINE_XATTR_ADDRS(inode); | 2326 return CUR_ADDRS_PER_INODE(inode) - get_inline_xattr_addrs(inode); |
2328} 2329 2330static inline void *inline_xattr_addr(struct inode *inode, struct page *page) 2331{ 2332 struct f2fs_inode *ri = F2FS_INODE(page); 2333 2334 return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - | 2327} 2328 2329static inline void *inline_xattr_addr(struct inode *inode, struct page *page) 2330{ 2331 struct f2fs_inode *ri = F2FS_INODE(page); 2332 2333 return (void *)&(ri->i_addr[DEF_ADDRS_PER_INODE - |
2335 F2FS_INLINE_XATTR_ADDRS(inode)]); | 2334 get_inline_xattr_addrs(inode)]); |
2336} 2337 2338static inline int inline_xattr_size(struct inode *inode) 2339{ 2340 return get_inline_xattr_addrs(inode) * sizeof(__le32); 2341} 2342 2343static inline int f2fs_has_inline_data(struct inode *inode) --- 910 unchanged lines hidden --- | 2335} 2336 2337static inline int inline_xattr_size(struct inode *inode) 2338{ 2339 return get_inline_xattr_addrs(inode) * sizeof(__le32); 2340} 2341 2342static inline int f2fs_has_inline_data(struct inode *inode) --- 910 unchanged lines hidden --- |