node.h (a468f0ef516fda9c7d91bb550d458e853d76955e) | node.h (aaec2b1d18792a5f27b69ff37f34f43f89f5aa3b) |
---|---|
1/* 2 * fs/f2fs/node.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 --- 279 unchanged lines hidden (view full) --- 288 289static inline void fill_node_footer_blkaddr(struct page *page, block_t blkaddr) 290{ 291 struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page)); 292 struct f2fs_node *rn = F2FS_NODE(page); 293 size_t crc_offset = le32_to_cpu(ckpt->checksum_offset); 294 __u64 cp_ver = le64_to_cpu(ckpt->checkpoint_ver); 295 | 1/* 2 * fs/f2fs/node.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 --- 279 unchanged lines hidden (view full) --- 288 289static inline void fill_node_footer_blkaddr(struct page *page, block_t blkaddr) 290{ 291 struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page)); 292 struct f2fs_node *rn = F2FS_NODE(page); 293 size_t crc_offset = le32_to_cpu(ckpt->checksum_offset); 294 __u64 cp_ver = le64_to_cpu(ckpt->checkpoint_ver); 295 |
296 if (is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG)) { | 296 if (__is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG)) { |
297 __u64 crc = le32_to_cpu(*((__le32 *) 298 ((unsigned char *)ckpt + crc_offset))); 299 cp_ver |= (crc << 32); 300 } 301 rn->footer.cp_ver = cpu_to_le64(cp_ver); 302 rn->footer.next_blkaddr = cpu_to_le32(blkaddr); 303} 304 305static inline bool is_recoverable_dnode(struct page *page) 306{ 307 struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page)); 308 size_t crc_offset = le32_to_cpu(ckpt->checksum_offset); 309 __u64 cp_ver = cur_cp_version(ckpt); 310 | 297 __u64 crc = le32_to_cpu(*((__le32 *) 298 ((unsigned char *)ckpt + crc_offset))); 299 cp_ver |= (crc << 32); 300 } 301 rn->footer.cp_ver = cpu_to_le64(cp_ver); 302 rn->footer.next_blkaddr = cpu_to_le32(blkaddr); 303} 304 305static inline bool is_recoverable_dnode(struct page *page) 306{ 307 struct f2fs_checkpoint *ckpt = F2FS_CKPT(F2FS_P_SB(page)); 308 size_t crc_offset = le32_to_cpu(ckpt->checksum_offset); 309 __u64 cp_ver = cur_cp_version(ckpt); 310 |
311 if (is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG)) { | 311 if (__is_set_ckpt_flags(ckpt, CP_CRC_RECOVERY_FLAG)) { |
312 __u64 crc = le32_to_cpu(*((__le32 *) 313 ((unsigned char *)ckpt + crc_offset))); 314 cp_ver |= (crc << 32); 315 } 316 return cpu_to_le64(cp_ver) == cpver_of_node(page); 317} 318 319/* --- 130 unchanged lines hidden --- | 312 __u64 crc = le32_to_cpu(*((__le32 *) 313 ((unsigned char *)ckpt + crc_offset))); 314 cp_ver |= (crc << 32); 315 } 316 return cpu_to_le64(cp_ver) == cpver_of_node(page); 317} 318 319/* --- 130 unchanged lines hidden --- |