diff options
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r-- | fs/f2fs/node.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index afdb130f782e..0a2d72f0024d 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h | |||
@@ -29,6 +29,9 @@ | |||
29 | /* vector size for gang look-up from nat cache that consists of radix tree */ | 29 | /* vector size for gang look-up from nat cache that consists of radix tree */ |
30 | #define NATVEC_SIZE 64 | 30 | #define NATVEC_SIZE 64 |
31 | 31 | ||
32 | /* return value for read_node_page */ | ||
33 | #define LOCKED_PAGE 1 | ||
34 | |||
32 | /* | 35 | /* |
33 | * For node information | 36 | * For node information |
34 | */ | 37 | */ |
@@ -239,7 +242,7 @@ static inline bool IS_DNODE(struct page *node_page) | |||
239 | return false; | 242 | return false; |
240 | if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { | 243 | if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { |
241 | ofs -= 6 + 2 * NIDS_PER_BLOCK; | 244 | ofs -= 6 + 2 * NIDS_PER_BLOCK; |
242 | if ((long int)ofs % (NIDS_PER_BLOCK + 1)) | 245 | if (!((long int)ofs % (NIDS_PER_BLOCK + 1))) |
243 | return false; | 246 | return false; |
244 | } | 247 | } |
245 | return true; | 248 | return true; |
@@ -277,6 +280,21 @@ static inline int is_cold_file(struct inode *inode) | |||
277 | return F2FS_I(inode)->i_advise & FADVISE_COLD_BIT; | 280 | return F2FS_I(inode)->i_advise & FADVISE_COLD_BIT; |
278 | } | 281 | } |
279 | 282 | ||
283 | static inline void set_cold_file(struct inode *inode) | ||
284 | { | ||
285 | F2FS_I(inode)->i_advise |= FADVISE_COLD_BIT; | ||
286 | } | ||
287 | |||
288 | static inline int is_cp_file(struct inode *inode) | ||
289 | { | ||
290 | return F2FS_I(inode)->i_advise & FADVISE_CP_BIT; | ||
291 | } | ||
292 | |||
293 | static inline void set_cp_file(struct inode *inode) | ||
294 | { | ||
295 | F2FS_I(inode)->i_advise |= FADVISE_CP_BIT; | ||
296 | } | ||
297 | |||
280 | static inline int is_cold_data(struct page *page) | 298 | static inline int is_cold_data(struct page *page) |
281 | { | 299 | { |
282 | return PageChecked(page); | 300 | return PageChecked(page); |