Lines Matching full:ri
121 struct f2fs_inode *ri = &F2FS_NODE(page)->i; in f2fs_enable_inode_chksum() local
126 if (!IS_INODE(page) || !(ri->i_inline & F2FS_EXTRA_ATTR)) in f2fs_enable_inode_chksum()
129 if (!F2FS_FITS_IN_INODE(ri, le16_to_cpu(ri->i_extra_isize), in f2fs_enable_inode_chksum()
139 struct f2fs_inode *ri = &node->i; in f2fs_inode_chksum() local
141 __le32 gen = ri->i_generation; in f2fs_inode_chksum()
151 chksum = f2fs_chksum(sbi, chksum_seed, (__u8 *)ri, offset); in f2fs_inode_chksum()
154 chksum = f2fs_chksum(sbi, chksum, (__u8 *)ri + offset, in f2fs_inode_chksum()
161 struct f2fs_inode *ri; in f2fs_inode_chksum_verify() local
176 ri = &F2FS_NODE(page)->i; in f2fs_inode_chksum_verify()
177 provided = le32_to_cpu(ri->i_inode_checksum); in f2fs_inode_chksum_verify()
190 struct f2fs_inode *ri = &F2FS_NODE(page)->i; in f2fs_inode_chksum_set() local
195 ri->i_inode_checksum = cpu_to_le32(f2fs_inode_chksum(sbi, page)); in f2fs_inode_chksum_set()
199 struct f2fs_inode *ri) in sanity_check_compress_inode() argument
204 if (ri->i_compress_algorithm >= COMPRESS_MAX) { in sanity_check_compress_inode()
207 __func__, inode->i_ino, ri->i_compress_algorithm); in sanity_check_compress_inode()
210 if (le64_to_cpu(ri->i_compr_blocks) > in sanity_check_compress_inode()
214 __func__, inode->i_ino, le64_to_cpu(ri->i_compr_blocks), in sanity_check_compress_inode()
218 if (ri->i_log_cluster_size < MIN_COMPRESS_LOG_SIZE || in sanity_check_compress_inode()
219 ri->i_log_cluster_size > MAX_COMPRESS_LOG_SIZE) { in sanity_check_compress_inode()
222 __func__, inode->i_ino, ri->i_log_cluster_size); in sanity_check_compress_inode()
226 clevel = le16_to_cpu(ri->i_compress_flag) >> in sanity_check_compress_inode()
228 switch (ri->i_compress_algorithm) { in sanity_check_compress_inode()
274 struct f2fs_inode *ri = F2FS_INODE(node_page); in sanity_check_inode() local
316 F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, in sanity_check_inode()
318 if (!sanity_check_compress_inode(inode, ri)) in sanity_check_inode()
392 struct f2fs_inode *ri; in do_read_inode() local
403 ri = F2FS_INODE(node_page); in do_read_inode()
405 inode->i_mode = le16_to_cpu(ri->i_mode); in do_read_inode()
406 i_uid_write(inode, le32_to_cpu(ri->i_uid)); in do_read_inode()
407 i_gid_write(inode, le32_to_cpu(ri->i_gid)); in do_read_inode()
408 set_nlink(inode, le32_to_cpu(ri->i_links)); in do_read_inode()
409 inode->i_size = le64_to_cpu(ri->i_size); in do_read_inode()
410 inode->i_blocks = SECTOR_FROM_BLOCK(le64_to_cpu(ri->i_blocks) - 1); in do_read_inode()
412 inode_set_atime(inode, le64_to_cpu(ri->i_atime), in do_read_inode()
413 le32_to_cpu(ri->i_atime_nsec)); in do_read_inode()
414 inode_set_ctime(inode, le64_to_cpu(ri->i_ctime), in do_read_inode()
415 le32_to_cpu(ri->i_ctime_nsec)); in do_read_inode()
416 inode_set_mtime(inode, le64_to_cpu(ri->i_mtime), in do_read_inode()
417 le32_to_cpu(ri->i_mtime_nsec)); in do_read_inode()
418 inode->i_generation = le32_to_cpu(ri->i_generation); in do_read_inode()
420 fi->i_current_depth = le32_to_cpu(ri->i_current_depth); in do_read_inode()
422 fi->i_gc_failures = le16_to_cpu(ri->i_gc_failures); in do_read_inode()
423 fi->i_xattr_nid = le32_to_cpu(ri->i_xattr_nid); in do_read_inode()
424 fi->i_flags = le32_to_cpu(ri->i_flags); in do_read_inode()
428 fi->i_advise = ri->i_advise; in do_read_inode()
429 fi->i_pino = le32_to_cpu(ri->i_pino); in do_read_inode()
430 fi->i_dir_level = ri->i_dir_level; in do_read_inode()
432 get_inline_info(inode, ri); in do_read_inode()
435 le16_to_cpu(ri->i_extra_isize) : 0; in do_read_inode()
438 fi->i_inline_xattr_size = le16_to_cpu(ri->i_inline_xattr_size); in do_read_inode()
481 F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, i_projid)) in do_read_inode()
482 i_projid = (projid_t)le32_to_cpu(ri->i_projid); in do_read_inode()
488 F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, i_crtime)) { in do_read_inode()
489 fi->i_crtime.tv_sec = le64_to_cpu(ri->i_crtime); in do_read_inode()
490 fi->i_crtime.tv_nsec = le32_to_cpu(ri->i_crtime_nsec); in do_read_inode()
495 if (F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, in do_read_inode()
500 le64_to_cpu(ri->i_compr_blocks)); in do_read_inode()
501 fi->i_compress_algorithm = ri->i_compress_algorithm; in do_read_inode()
502 fi->i_log_cluster_size = ri->i_log_cluster_size; in do_read_inode()
503 compress_flag = le16_to_cpu(ri->i_compress_flag); in do_read_inode()
645 struct f2fs_inode *ri; in f2fs_update_inode() local
653 ri = F2FS_INODE(node_page); in f2fs_update_inode()
655 ri->i_mode = cpu_to_le16(inode->i_mode); in f2fs_update_inode()
656 ri->i_advise = fi->i_advise; in f2fs_update_inode()
657 ri->i_uid = cpu_to_le32(i_uid_read(inode)); in f2fs_update_inode()
658 ri->i_gid = cpu_to_le32(i_gid_read(inode)); in f2fs_update_inode()
659 ri->i_links = cpu_to_le32(inode->i_nlink); in f2fs_update_inode()
660 ri->i_blocks = cpu_to_le64(SECTOR_TO_BLOCK(inode->i_blocks) + 1); in f2fs_update_inode()
664 ri->i_size = cpu_to_le64(i_size_read(inode)); in f2fs_update_inode()
668 set_raw_read_extent(&et->largest, &ri->i_ext); in f2fs_update_inode()
671 memset(&ri->i_ext, 0, sizeof(ri->i_ext)); in f2fs_update_inode()
673 set_raw_inline(inode, ri); in f2fs_update_inode()
675 ri->i_atime = cpu_to_le64(inode_get_atime_sec(inode)); in f2fs_update_inode()
676 ri->i_ctime = cpu_to_le64(inode_get_ctime_sec(inode)); in f2fs_update_inode()
677 ri->i_mtime = cpu_to_le64(inode_get_mtime_sec(inode)); in f2fs_update_inode()
678 ri->i_atime_nsec = cpu_to_le32(inode_get_atime_nsec(inode)); in f2fs_update_inode()
679 ri->i_ctime_nsec = cpu_to_le32(inode_get_ctime_nsec(inode)); in f2fs_update_inode()
680 ri->i_mtime_nsec = cpu_to_le32(inode_get_mtime_nsec(inode)); in f2fs_update_inode()
682 ri->i_current_depth = cpu_to_le32(fi->i_current_depth); in f2fs_update_inode()
684 ri->i_gc_failures = cpu_to_le16(fi->i_gc_failures); in f2fs_update_inode()
685 ri->i_xattr_nid = cpu_to_le32(fi->i_xattr_nid); in f2fs_update_inode()
686 ri->i_flags = cpu_to_le32(fi->i_flags); in f2fs_update_inode()
687 ri->i_pino = cpu_to_le32(fi->i_pino); in f2fs_update_inode()
688 ri->i_generation = cpu_to_le32(inode->i_generation); in f2fs_update_inode()
689 ri->i_dir_level = fi->i_dir_level; in f2fs_update_inode()
692 ri->i_extra_isize = cpu_to_le16(fi->i_extra_isize); in f2fs_update_inode()
695 ri->i_inline_xattr_size = in f2fs_update_inode()
699 F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, i_projid)) { in f2fs_update_inode()
703 ri->i_projid = cpu_to_le32(i_projid); in f2fs_update_inode()
707 F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, i_crtime)) { in f2fs_update_inode()
708 ri->i_crtime = cpu_to_le64(fi->i_crtime.tv_sec); in f2fs_update_inode()
709 ri->i_crtime_nsec = cpu_to_le32(fi->i_crtime.tv_nsec); in f2fs_update_inode()
713 F2FS_FITS_IN_INODE(ri, fi->i_extra_isize, in f2fs_update_inode()
717 ri->i_compr_blocks = cpu_to_le64( in f2fs_update_inode()
719 ri->i_compress_algorithm = fi->i_compress_algorithm; in f2fs_update_inode()
723 ri->i_compress_flag = cpu_to_le16(compress_flag); in f2fs_update_inode()
724 ri->i_log_cluster_size = fi->i_log_cluster_size; in f2fs_update_inode()