Lines Matching refs:ufs_inode

560 static int ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode)  in ufs1_read_inode()  argument
569 inode->i_mode = mode = fs16_to_cpu(sb, ufs_inode->ui_mode); in ufs1_read_inode()
570 set_nlink(inode, fs16_to_cpu(sb, ufs_inode->ui_nlink)); in ufs1_read_inode()
577 i_uid_write(inode, ufs_get_inode_uid(sb, ufs_inode)); in ufs1_read_inode()
578 i_gid_write(inode, ufs_get_inode_gid(sb, ufs_inode)); in ufs1_read_inode()
580 inode->i_size = fs64_to_cpu(sb, ufs_inode->ui_size); in ufs1_read_inode()
581 inode->i_atime.tv_sec = (signed)fs32_to_cpu(sb, ufs_inode->ui_atime.tv_sec); in ufs1_read_inode()
582 inode->i_ctime.tv_sec = (signed)fs32_to_cpu(sb, ufs_inode->ui_ctime.tv_sec); in ufs1_read_inode()
583 inode->i_mtime.tv_sec = (signed)fs32_to_cpu(sb, ufs_inode->ui_mtime.tv_sec); in ufs1_read_inode()
587 inode->i_blocks = fs32_to_cpu(sb, ufs_inode->ui_blocks); in ufs1_read_inode()
588 inode->i_generation = fs32_to_cpu(sb, ufs_inode->ui_gen); in ufs1_read_inode()
589 ufsi->i_flags = fs32_to_cpu(sb, ufs_inode->ui_flags); in ufs1_read_inode()
590 ufsi->i_shadow = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_shadow); in ufs1_read_inode()
591 ufsi->i_oeftflag = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_oeftflag); in ufs1_read_inode()
595 memcpy(ufsi->i_u1.i_data, &ufs_inode->ui_u2.ui_addr, in ufs1_read_inode()
596 sizeof(ufs_inode->ui_u2.ui_addr)); in ufs1_read_inode()
598 memcpy(ufsi->i_u1.i_symlink, ufs_inode->ui_u2.ui_symlink, in ufs1_read_inode()
599 sizeof(ufs_inode->ui_u2.ui_symlink) - 1); in ufs1_read_inode()
600 ufsi->i_u1.i_symlink[sizeof(ufs_inode->ui_u2.ui_symlink) - 1] = 0; in ufs1_read_inode()
688 struct ufs_inode *ufs_inode = (struct ufs_inode *)bh->b_data; in ufs_iget() local
691 ufs_inode + ufs_inotofsbo(inode->i_ino)); in ufs_iget()
714 static void ufs1_update_inode(struct inode *inode, struct ufs_inode *ufs_inode) in ufs1_update_inode() argument
719 ufs_inode->ui_mode = cpu_to_fs16(sb, inode->i_mode); in ufs1_update_inode()
720 ufs_inode->ui_nlink = cpu_to_fs16(sb, inode->i_nlink); in ufs1_update_inode()
722 ufs_set_inode_uid(sb, ufs_inode, i_uid_read(inode)); in ufs1_update_inode()
723 ufs_set_inode_gid(sb, ufs_inode, i_gid_read(inode)); in ufs1_update_inode()
725 ufs_inode->ui_size = cpu_to_fs64(sb, inode->i_size); in ufs1_update_inode()
726 ufs_inode->ui_atime.tv_sec = cpu_to_fs32(sb, inode->i_atime.tv_sec); in ufs1_update_inode()
727 ufs_inode->ui_atime.tv_usec = 0; in ufs1_update_inode()
728 ufs_inode->ui_ctime.tv_sec = cpu_to_fs32(sb, inode->i_ctime.tv_sec); in ufs1_update_inode()
729 ufs_inode->ui_ctime.tv_usec = 0; in ufs1_update_inode()
730 ufs_inode->ui_mtime.tv_sec = cpu_to_fs32(sb, inode->i_mtime.tv_sec); in ufs1_update_inode()
731 ufs_inode->ui_mtime.tv_usec = 0; in ufs1_update_inode()
732 ufs_inode->ui_blocks = cpu_to_fs32(sb, inode->i_blocks); in ufs1_update_inode()
733 ufs_inode->ui_flags = cpu_to_fs32(sb, ufsi->i_flags); in ufs1_update_inode()
734 ufs_inode->ui_gen = cpu_to_fs32(sb, inode->i_generation); in ufs1_update_inode()
737 ufs_inode->ui_u3.ui_sun.ui_shadow = cpu_to_fs32(sb, ufsi->i_shadow); in ufs1_update_inode()
738 ufs_inode->ui_u3.ui_sun.ui_oeftflag = cpu_to_fs32(sb, ufsi->i_oeftflag); in ufs1_update_inode()
743 ufs_inode->ui_u2.ui_addr.ui_db[0] = ufsi->i_u1.i_data[0]; in ufs1_update_inode()
745 memcpy(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.i_data, in ufs1_update_inode()
746 sizeof(ufs_inode->ui_u2.ui_addr)); in ufs1_update_inode()
749 memcpy(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, in ufs1_update_inode()
750 sizeof(ufs_inode->ui_u2.ui_symlink)); in ufs1_update_inode()
754 memset (ufs_inode, 0, sizeof(struct ufs_inode)); in ufs1_update_inode()
757 static void ufs2_update_inode(struct inode *inode, struct ufs2_inode *ufs_inode) in ufs2_update_inode() argument
763 ufs_inode->ui_mode = cpu_to_fs16(sb, inode->i_mode); in ufs2_update_inode()
764 ufs_inode->ui_nlink = cpu_to_fs16(sb, inode->i_nlink); in ufs2_update_inode()
766 ufs_inode->ui_uid = cpu_to_fs32(sb, i_uid_read(inode)); in ufs2_update_inode()
767 ufs_inode->ui_gid = cpu_to_fs32(sb, i_gid_read(inode)); in ufs2_update_inode()
769 ufs_inode->ui_size = cpu_to_fs64(sb, inode->i_size); in ufs2_update_inode()
770 ufs_inode->ui_atime = cpu_to_fs64(sb, inode->i_atime.tv_sec); in ufs2_update_inode()
771 ufs_inode->ui_atimensec = cpu_to_fs32(sb, inode->i_atime.tv_nsec); in ufs2_update_inode()
772 ufs_inode->ui_ctime = cpu_to_fs64(sb, inode->i_ctime.tv_sec); in ufs2_update_inode()
773 ufs_inode->ui_ctimensec = cpu_to_fs32(sb, inode->i_ctime.tv_nsec); in ufs2_update_inode()
774 ufs_inode->ui_mtime = cpu_to_fs64(sb, inode->i_mtime.tv_sec); in ufs2_update_inode()
775 ufs_inode->ui_mtimensec = cpu_to_fs32(sb, inode->i_mtime.tv_nsec); in ufs2_update_inode()
777 ufs_inode->ui_blocks = cpu_to_fs64(sb, inode->i_blocks); in ufs2_update_inode()
778 ufs_inode->ui_flags = cpu_to_fs32(sb, ufsi->i_flags); in ufs2_update_inode()
779 ufs_inode->ui_gen = cpu_to_fs32(sb, inode->i_generation); in ufs2_update_inode()
783 ufs_inode->ui_u2.ui_addr.ui_db[0] = ufsi->i_u1.u2_i_data[0]; in ufs2_update_inode()
785 memcpy(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.u2_i_data, in ufs2_update_inode()
786 sizeof(ufs_inode->ui_u2.ui_addr)); in ufs2_update_inode()
788 memcpy(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, in ufs2_update_inode()
789 sizeof(ufs_inode->ui_u2.ui_symlink)); in ufs2_update_inode()
793 memset (ufs_inode, 0, sizeof(struct ufs2_inode)); in ufs2_update_inode()
822 struct ufs_inode *ufs_inode = (struct ufs_inode *) bh->b_data; in ufs_update_inode() local
824 ufs1_update_inode(inode, ufs_inode + ufs_inotofsbo(inode->i_ino)); in ufs_update_inode()