Lines Matching refs:inode
57 static int ocfs2_read_locked_inode(struct inode *inode,
59 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque);
60 static int ocfs2_find_actor(struct inode *inode, void *opaque);
62 struct inode *inode,
65 static int ocfs2_filecheck_read_inode_block_full(struct inode *inode,
73 void ocfs2_set_inode_flags(struct inode *inode) in ocfs2_set_inode_flags() argument
75 unsigned int flags = OCFS2_I(inode)->ip_attr; in ocfs2_set_inode_flags()
77 inode->i_flags &= ~(S_IMMUTABLE | in ocfs2_set_inode_flags()
81 inode->i_flags |= S_IMMUTABLE; in ocfs2_set_inode_flags()
84 inode->i_flags |= S_SYNC; in ocfs2_set_inode_flags()
86 inode->i_flags |= S_APPEND; in ocfs2_set_inode_flags()
88 inode->i_flags |= S_NOATIME; in ocfs2_set_inode_flags()
90 inode->i_flags |= S_DIRSYNC; in ocfs2_set_inode_flags()
112 struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno) in ocfs2_ilookup()
123 struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags, in ocfs2_iget()
127 struct inode *inode = NULL; in ocfs2_iget() local
139 inode = ERR_PTR(-EINVAL); in ocfs2_iget()
140 mlog_errno(PTR_ERR(inode)); in ocfs2_iget()
149 inode = iget5_locked(sb, args.fi_ino, ocfs2_find_actor, in ocfs2_iget()
154 if (inode == NULL) { in ocfs2_iget()
155 inode = ERR_PTR(-ENOMEM); in ocfs2_iget()
156 mlog_errno(PTR_ERR(inode)); in ocfs2_iget()
159 trace_ocfs2_iget5_locked(inode->i_state); in ocfs2_iget()
160 if (inode->i_state & I_NEW) { in ocfs2_iget()
161 rc = ocfs2_read_locked_inode(inode, &args); in ocfs2_iget()
162 unlock_new_inode(inode); in ocfs2_iget()
164 if (is_bad_inode(inode)) { in ocfs2_iget()
165 iput(inode); in ocfs2_iget()
166 inode = ERR_PTR(rc); in ocfs2_iget()
180 struct ocfs2_inode_info *oi = OCFS2_I(inode); in ocfs2_iget()
197 if (!IS_ERR(inode)) { in ocfs2_iget()
198 trace_ocfs2_iget_end(inode, in ocfs2_iget()
199 (unsigned long long)OCFS2_I(inode)->ip_blkno); in ocfs2_iget()
202 return inode; in ocfs2_iget()
213 static int ocfs2_find_actor(struct inode *inode, void *opaque) in ocfs2_find_actor() argument
216 struct ocfs2_inode_info *oi = OCFS2_I(inode); in ocfs2_find_actor()
221 mlog_bug_on_msg(!inode, "No inode in find actor!\n"); in ocfs2_find_actor()
223 trace_ocfs2_find_actor(inode, inode->i_ino, opaque, args->fi_blkno); in ocfs2_find_actor()
238 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque) in ocfs2_init_locked_inode() argument
244 inode->i_ino = args->fi_ino; in ocfs2_init_locked_inode()
245 OCFS2_I(inode)->ip_blkno = args->fi_blkno; in ocfs2_init_locked_inode()
247 lockdep_set_class(&inode->i_rwsem, in ocfs2_init_locked_inode()
253 lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem, in ocfs2_init_locked_inode()
256 lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem, in ocfs2_init_locked_inode()
262 void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, in ocfs2_populate_inode() argument
269 sb = inode->i_sb; in ocfs2_populate_inode()
288 OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); in ocfs2_populate_inode()
289 OCFS2_I(inode)->ip_attr = le32_to_cpu(fe->i_attr); in ocfs2_populate_inode()
290 OCFS2_I(inode)->ip_dyn_features = le16_to_cpu(fe->i_dyn_features); in ocfs2_populate_inode()
292 inode_set_iversion(inode, 1); in ocfs2_populate_inode()
293 inode->i_generation = le32_to_cpu(fe->i_generation); in ocfs2_populate_inode()
294 inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); in ocfs2_populate_inode()
295 inode->i_mode = le16_to_cpu(fe->i_mode); in ocfs2_populate_inode()
296 i_uid_write(inode, le32_to_cpu(fe->i_uid)); in ocfs2_populate_inode()
297 i_gid_write(inode, le32_to_cpu(fe->i_gid)); in ocfs2_populate_inode()
300 if (S_ISLNK(inode->i_mode) && !fe->i_clusters) { in ocfs2_populate_inode()
301 inode->i_blocks = 0; in ocfs2_populate_inode()
302 inode->i_mapping->a_ops = &ocfs2_fast_symlink_aops; in ocfs2_populate_inode()
304 inode->i_blocks = ocfs2_inode_sector_count(inode); in ocfs2_populate_inode()
305 inode->i_mapping->a_ops = &ocfs2_aops; in ocfs2_populate_inode()
307 inode->i_atime.tv_sec = le64_to_cpu(fe->i_atime); in ocfs2_populate_inode()
308 inode->i_atime.tv_nsec = le32_to_cpu(fe->i_atime_nsec); in ocfs2_populate_inode()
309 inode->i_mtime.tv_sec = le64_to_cpu(fe->i_mtime); in ocfs2_populate_inode()
310 inode->i_mtime.tv_nsec = le32_to_cpu(fe->i_mtime_nsec); in ocfs2_populate_inode()
311 inode->i_ctime.tv_sec = le64_to_cpu(fe->i_ctime); in ocfs2_populate_inode()
312 inode->i_ctime.tv_nsec = le32_to_cpu(fe->i_ctime_nsec); in ocfs2_populate_inode()
314 if (OCFS2_I(inode)->ip_blkno != le64_to_cpu(fe->i_blkno)) in ocfs2_populate_inode()
317 (unsigned long long)OCFS2_I(inode)->ip_blkno, in ocfs2_populate_inode()
320 set_nlink(inode, ocfs2_read_links_count(fe)); in ocfs2_populate_inode()
322 trace_ocfs2_populate_inode(OCFS2_I(inode)->ip_blkno, in ocfs2_populate_inode()
325 OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SYSTEM_FILE; in ocfs2_populate_inode()
326 inode->i_flags |= S_NOQUOTA; in ocfs2_populate_inode()
330 OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP; in ocfs2_populate_inode()
332 OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP; in ocfs2_populate_inode()
334 inode->i_flags |= S_NOQUOTA; in ocfs2_populate_inode()
341 switch (inode->i_mode & S_IFMT) { in ocfs2_populate_inode()
344 inode->i_fop = &ocfs2_fops; in ocfs2_populate_inode()
346 inode->i_fop = &ocfs2_fops_no_plocks; in ocfs2_populate_inode()
347 inode->i_op = &ocfs2_file_iops; in ocfs2_populate_inode()
348 i_size_write(inode, le64_to_cpu(fe->i_size)); in ocfs2_populate_inode()
351 inode->i_op = &ocfs2_dir_iops; in ocfs2_populate_inode()
353 inode->i_fop = &ocfs2_dops; in ocfs2_populate_inode()
355 inode->i_fop = &ocfs2_dops_no_plocks; in ocfs2_populate_inode()
356 i_size_write(inode, le64_to_cpu(fe->i_size)); in ocfs2_populate_inode()
357 OCFS2_I(inode)->ip_dir_lock_gen = 1; in ocfs2_populate_inode()
360 inode->i_op = &ocfs2_symlink_inode_operations; in ocfs2_populate_inode()
361 inode_nohighmem(inode); in ocfs2_populate_inode()
362 i_size_write(inode, le64_to_cpu(fe->i_size)); in ocfs2_populate_inode()
365 inode->i_op = &ocfs2_special_file_iops; in ocfs2_populate_inode()
366 init_special_inode(inode, inode->i_mode, in ocfs2_populate_inode()
367 inode->i_rdev); in ocfs2_populate_inode()
372 inode->i_ino = ino_from_blkno(inode->i_sb, in ocfs2_populate_inode()
382 ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres, in ocfs2_populate_inode()
383 OCFS2_LOCK_TYPE_META, 0, inode); in ocfs2_populate_inode()
385 ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres, in ocfs2_populate_inode()
386 OCFS2_LOCK_TYPE_OPEN, 0, inode); in ocfs2_populate_inode()
389 ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_rw_lockres, in ocfs2_populate_inode()
390 OCFS2_LOCK_TYPE_RW, inode->i_generation, in ocfs2_populate_inode()
391 inode); in ocfs2_populate_inode()
393 ocfs2_set_inode_flags(inode); in ocfs2_populate_inode()
395 OCFS2_I(inode)->ip_last_used_slot = 0; in ocfs2_populate_inode()
396 OCFS2_I(inode)->ip_last_used_group = 0; in ocfs2_populate_inode()
398 if (S_ISDIR(inode->i_mode)) in ocfs2_populate_inode()
399 ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv, in ocfs2_populate_inode()
403 static int ocfs2_read_locked_inode(struct inode *inode, in ocfs2_read_locked_inode() argument
414 sb = inode->i_sb; in ocfs2_read_locked_inode()
451 (unsigned long long)OCFS2_I(inode)->ip_blkno, can_lock); in ocfs2_read_locked_inode()
463 ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_inode_lockres, in ocfs2_read_locked_inode()
465 generation, inode); in ocfs2_read_locked_inode()
467 ocfs2_inode_lock_res_init(&OCFS2_I(inode)->ip_open_lockres, in ocfs2_read_locked_inode()
469 0, inode); in ocfs2_read_locked_inode()
472 status = ocfs2_open_lock(inode); in ocfs2_read_locked_inode()
474 make_bad_inode(inode); in ocfs2_read_locked_inode()
478 status = ocfs2_inode_lock(inode, NULL, lock_level); in ocfs2_read_locked_inode()
480 make_bad_inode(inode); in ocfs2_read_locked_inode()
487 status = ocfs2_try_open_lock(inode, 0); in ocfs2_read_locked_inode()
489 make_bad_inode(inode); in ocfs2_read_locked_inode()
496 status = ocfs2_filecheck_read_inode_block_full(inode, in ocfs2_read_locked_inode()
499 status = ocfs2_filecheck_read_inode_block_full(inode, in ocfs2_read_locked_inode()
502 status = ocfs2_read_inode_block_full(inode, in ocfs2_read_locked_inode()
542 inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev)); in ocfs2_read_locked_inode()
544 ocfs2_populate_inode(inode, fe, 0); in ocfs2_read_locked_inode()
550 ocfs2_inode_unlock(inode, lock_level); in ocfs2_read_locked_inode()
552 ocfs2_inode_lock(inode, NULL, lock_level); in ocfs2_read_locked_inode()
554 status = ocfs2_write_block(osb, bh, INODE_CACHE(inode)); in ocfs2_read_locked_inode()
565 ocfs2_inode_unlock(inode, lock_level); in ocfs2_read_locked_inode()
568 make_bad_inode(inode); in ocfs2_read_locked_inode()
581 struct inode *inode, in ocfs2_truncate_for_delete() argument
595 if (ocfs2_should_order_data(inode)) in ocfs2_truncate_for_delete()
596 ocfs2_begin_ordered_truncate(inode, 0); in ocfs2_truncate_for_delete()
606 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in ocfs2_truncate_for_delete()
614 i_size_write(inode, 0); in ocfs2_truncate_for_delete()
616 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); in ocfs2_truncate_for_delete()
625 status = ocfs2_commit_truncate(osb, inode, fe_bh); in ocfs2_truncate_for_delete()
636 static int ocfs2_remove_inode(struct inode *inode, in ocfs2_remove_inode() argument
638 struct inode *orphan_dir_inode, in ocfs2_remove_inode()
642 struct inode *inode_alloc_inode = NULL; in ocfs2_remove_inode()
645 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_remove_inode()
667 ocfs2_quota_trans_credits(inode->i_sb)); in ocfs2_remove_inode()
674 if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR)) { in ocfs2_remove_inode()
675 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, in ocfs2_remove_inode()
684 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_remove_inode()
695 ocfs2_remove_from_cache(INODE_CACHE(inode), di_bh); in ocfs2_remove_inode()
696 dquot_free_inode(inode); in ocfs2_remove_inode()
750 static int ocfs2_wipe_inode(struct inode *inode, in ocfs2_wipe_inode() argument
754 struct inode *orphan_dir_inode = NULL; in ocfs2_wipe_inode()
756 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_wipe_inode()
759 if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR)) { in ocfs2_wipe_inode()
792 status = ocfs2_truncate_for_delete(osb, inode, di_bh); in ocfs2_wipe_inode()
799 if (S_ISDIR(inode->i_mode)) { in ocfs2_wipe_inode()
800 status = ocfs2_dx_dir_truncate(inode, di_bh); in ocfs2_wipe_inode()
808 status = ocfs2_xattr_remove(inode, di_bh); in ocfs2_wipe_inode()
814 status = ocfs2_remove_refcount_tree(inode, di_bh); in ocfs2_wipe_inode()
820 status = ocfs2_remove_inode(inode, di_bh, orphan_dir_inode, in ocfs2_wipe_inode()
826 if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR) in ocfs2_wipe_inode()
841 static int ocfs2_inode_is_valid_to_delete(struct inode *inode) in ocfs2_inode_is_valid_to_delete() argument
844 struct ocfs2_inode_info *oi = OCFS2_I(inode); in ocfs2_inode_is_valid_to_delete()
845 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_inode_is_valid_to_delete()
853 if (inode == osb->root_inode) { in ocfs2_inode_is_valid_to_delete()
889 static int ocfs2_query_inode_wipe(struct inode *inode, in ocfs2_query_inode_wipe() argument
894 struct ocfs2_inode_info *oi = OCFS2_I(inode); in ocfs2_query_inode_wipe()
900 inode->i_nlink); in ocfs2_query_inode_wipe()
905 if (!ocfs2_inode_is_valid_to_delete(inode)) { in ocfs2_query_inode_wipe()
912 if (inode->i_nlink) in ocfs2_query_inode_wipe()
962 status = ocfs2_try_open_lock(inode, 1); in ocfs2_query_inode_wipe()
984 static void ocfs2_cleanup_delete_inode(struct inode *inode, in ocfs2_cleanup_delete_inode() argument
988 (unsigned long long)OCFS2_I(inode)->ip_blkno, sync_data); in ocfs2_cleanup_delete_inode()
990 filemap_write_and_wait(inode->i_mapping); in ocfs2_cleanup_delete_inode()
991 truncate_inode_pages_final(&inode->i_data); in ocfs2_cleanup_delete_inode()
994 static void ocfs2_delete_inode(struct inode *inode) in ocfs2_delete_inode() argument
1001 trace_ocfs2_delete_inode(inode->i_ino, in ocfs2_delete_inode()
1002 (unsigned long long)OCFS2_I(inode)->ip_blkno, in ocfs2_delete_inode()
1003 is_bad_inode(inode)); in ocfs2_delete_inode()
1008 if (is_bad_inode(inode) || !OCFS2_I(inode)->ip_blkno) in ocfs2_delete_inode()
1011 if (!ocfs2_inode_is_valid_to_delete(inode)) { in ocfs2_delete_inode()
1015 ocfs2_cleanup_delete_inode(inode, 0); in ocfs2_delete_inode()
1019 dquot_initialize(inode); in ocfs2_delete_inode()
1032 status = ocfs2_nfs_sync_lock(OCFS2_SB(inode->i_sb), 0); in ocfs2_delete_inode()
1035 ocfs2_cleanup_delete_inode(inode, 0); in ocfs2_delete_inode()
1046 status = ocfs2_inode_lock(inode, &di_bh, 1); in ocfs2_delete_inode()
1050 ocfs2_cleanup_delete_inode(inode, 0); in ocfs2_delete_inode()
1058 ocfs2_cleanup_delete_inode(inode, 0); in ocfs2_delete_inode()
1064 status = ocfs2_query_inode_wipe(inode, di_bh, &wipe); in ocfs2_delete_inode()
1075 ocfs2_cleanup_delete_inode(inode, 1); in ocfs2_delete_inode()
1079 ocfs2_cleanup_delete_inode(inode, 0); in ocfs2_delete_inode()
1081 status = ocfs2_wipe_inode(inode, di_bh); in ocfs2_delete_inode()
1097 OCFS2_I(inode)->ip_flags |= OCFS2_INODE_DELETED; in ocfs2_delete_inode()
1100 ocfs2_inode_unlock(inode, 1); in ocfs2_delete_inode()
1104 ocfs2_nfs_sync_unlock(OCFS2_SB(inode->i_sb), 0); in ocfs2_delete_inode()
1112 static void ocfs2_clear_inode(struct inode *inode) in ocfs2_clear_inode() argument
1115 struct ocfs2_inode_info *oi = OCFS2_I(inode); in ocfs2_clear_inode()
1116 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_clear_inode()
1118 clear_inode(inode); in ocfs2_clear_inode()
1120 inode->i_nlink); in ocfs2_clear_inode()
1123 "Inode=%lu\n", inode->i_ino); in ocfs2_clear_inode()
1125 dquot_drop(inode); in ocfs2_clear_inode()
1129 ocfs2_open_unlock(inode); in ocfs2_clear_inode()
1148 ocfs2_checkpoint_inode(inode); in ocfs2_clear_inode()
1157 ocfs2_extent_map_trunc(inode, 0); in ocfs2_clear_inode()
1159 status = ocfs2_drop_inode_locks(inode); in ocfs2_clear_inode()
1167 ocfs2_metadata_cache_exit(INODE_CACHE(inode)); in ocfs2_clear_inode()
1169 mlog_bug_on_msg(INODE_CACHE(inode)->ci_num_cached, in ocfs2_clear_inode()
1172 INODE_CACHE(inode)->ci_num_cached); in ocfs2_clear_inode()
1174 mlog_bug_on_msg(!(INODE_CACHE(inode)->ci_flags & OCFS2_CACHE_FL_INLINE), in ocfs2_clear_inode()
1214 void ocfs2_evict_inode(struct inode *inode) in ocfs2_evict_inode() argument
1216 if (!inode->i_nlink || in ocfs2_evict_inode()
1217 (OCFS2_I(inode)->ip_flags & OCFS2_INODE_MAYBE_ORPHANED)) { in ocfs2_evict_inode()
1218 ocfs2_delete_inode(inode); in ocfs2_evict_inode()
1220 truncate_inode_pages_final(&inode->i_data); in ocfs2_evict_inode()
1222 ocfs2_clear_inode(inode); in ocfs2_evict_inode()
1228 int ocfs2_drop_inode(struct inode *inode) in ocfs2_drop_inode() argument
1230 struct ocfs2_inode_info *oi = OCFS2_I(inode); in ocfs2_drop_inode()
1233 inode->i_nlink, oi->ip_flags); in ocfs2_drop_inode()
1235 assert_spin_locked(&inode->i_lock); in ocfs2_drop_inode()
1236 inode->i_state |= I_WILL_FREE; in ocfs2_drop_inode()
1237 spin_unlock(&inode->i_lock); in ocfs2_drop_inode()
1238 write_inode_now(inode, 1); in ocfs2_drop_inode()
1239 spin_lock(&inode->i_lock); in ocfs2_drop_inode()
1240 WARN_ON(inode->i_state & I_NEW); in ocfs2_drop_inode()
1241 inode->i_state &= ~I_WILL_FREE; in ocfs2_drop_inode()
1251 struct inode *inode = d_inode(dentry); in ocfs2_inode_revalidate() local
1254 trace_ocfs2_inode_revalidate(inode, in ocfs2_inode_revalidate()
1255 inode ? (unsigned long long)OCFS2_I(inode)->ip_blkno : 0ULL, in ocfs2_inode_revalidate()
1256 inode ? (unsigned long long)OCFS2_I(inode)->ip_flags : 0); in ocfs2_inode_revalidate()
1258 if (!inode) { in ocfs2_inode_revalidate()
1263 spin_lock(&OCFS2_I(inode)->ip_lock); in ocfs2_inode_revalidate()
1264 if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) { in ocfs2_inode_revalidate()
1265 spin_unlock(&OCFS2_I(inode)->ip_lock); in ocfs2_inode_revalidate()
1269 spin_unlock(&OCFS2_I(inode)->ip_lock); in ocfs2_inode_revalidate()
1273 status = ocfs2_inode_lock(inode, NULL, 0); in ocfs2_inode_revalidate()
1279 ocfs2_inode_unlock(inode, 0); in ocfs2_inode_revalidate()
1290 struct inode *inode, in ocfs2_mark_inode_dirty() argument
1296 trace_ocfs2_mark_inode_dirty((unsigned long long)OCFS2_I(inode)->ip_blkno); in ocfs2_mark_inode_dirty()
1298 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), bh, in ocfs2_mark_inode_dirty()
1305 spin_lock(&OCFS2_I(inode)->ip_lock); in ocfs2_mark_inode_dirty()
1306 fe->i_clusters = cpu_to_le32(OCFS2_I(inode)->ip_clusters); in ocfs2_mark_inode_dirty()
1307 ocfs2_get_inode_flags(OCFS2_I(inode)); in ocfs2_mark_inode_dirty()
1308 fe->i_attr = cpu_to_le32(OCFS2_I(inode)->ip_attr); in ocfs2_mark_inode_dirty()
1309 fe->i_dyn_features = cpu_to_le16(OCFS2_I(inode)->ip_dyn_features); in ocfs2_mark_inode_dirty()
1310 spin_unlock(&OCFS2_I(inode)->ip_lock); in ocfs2_mark_inode_dirty()
1312 fe->i_size = cpu_to_le64(i_size_read(inode)); in ocfs2_mark_inode_dirty()
1313 ocfs2_set_links_count(fe, inode->i_nlink); in ocfs2_mark_inode_dirty()
1314 fe->i_uid = cpu_to_le32(i_uid_read(inode)); in ocfs2_mark_inode_dirty()
1315 fe->i_gid = cpu_to_le32(i_gid_read(inode)); in ocfs2_mark_inode_dirty()
1316 fe->i_mode = cpu_to_le16(inode->i_mode); in ocfs2_mark_inode_dirty()
1317 fe->i_atime = cpu_to_le64(inode->i_atime.tv_sec); in ocfs2_mark_inode_dirty()
1318 fe->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec); in ocfs2_mark_inode_dirty()
1319 fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); in ocfs2_mark_inode_dirty()
1320 fe->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); in ocfs2_mark_inode_dirty()
1321 fe->i_mtime = cpu_to_le64(inode->i_mtime.tv_sec); in ocfs2_mark_inode_dirty()
1322 fe->i_mtime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec); in ocfs2_mark_inode_dirty()
1325 ocfs2_update_inode_fsync_trans(handle, inode, 1); in ocfs2_mark_inode_dirty()
1335 void ocfs2_refresh_inode(struct inode *inode, in ocfs2_refresh_inode() argument
1338 spin_lock(&OCFS2_I(inode)->ip_lock); in ocfs2_refresh_inode()
1340 OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); in ocfs2_refresh_inode()
1341 OCFS2_I(inode)->ip_attr = le32_to_cpu(fe->i_attr); in ocfs2_refresh_inode()
1342 OCFS2_I(inode)->ip_dyn_features = le16_to_cpu(fe->i_dyn_features); in ocfs2_refresh_inode()
1343 ocfs2_set_inode_flags(inode); in ocfs2_refresh_inode()
1344 i_size_write(inode, le64_to_cpu(fe->i_size)); in ocfs2_refresh_inode()
1345 set_nlink(inode, ocfs2_read_links_count(fe)); in ocfs2_refresh_inode()
1346 i_uid_write(inode, le32_to_cpu(fe->i_uid)); in ocfs2_refresh_inode()
1347 i_gid_write(inode, le32_to_cpu(fe->i_gid)); in ocfs2_refresh_inode()
1348 inode->i_mode = le16_to_cpu(fe->i_mode); in ocfs2_refresh_inode()
1349 if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0) in ocfs2_refresh_inode()
1350 inode->i_blocks = 0; in ocfs2_refresh_inode()
1352 inode->i_blocks = ocfs2_inode_sector_count(inode); in ocfs2_refresh_inode()
1353 inode->i_atime.tv_sec = le64_to_cpu(fe->i_atime); in ocfs2_refresh_inode()
1354 inode->i_atime.tv_nsec = le32_to_cpu(fe->i_atime_nsec); in ocfs2_refresh_inode()
1355 inode->i_mtime.tv_sec = le64_to_cpu(fe->i_mtime); in ocfs2_refresh_inode()
1356 inode->i_mtime.tv_nsec = le32_to_cpu(fe->i_mtime_nsec); in ocfs2_refresh_inode()
1357 inode->i_ctime.tv_sec = le64_to_cpu(fe->i_ctime); in ocfs2_refresh_inode()
1358 inode->i_ctime.tv_nsec = le32_to_cpu(fe->i_ctime_nsec); in ocfs2_refresh_inode()
1360 spin_unlock(&OCFS2_I(inode)->ip_lock); in ocfs2_refresh_inode()
1564 ocfs2_filecheck_read_inode_block_full(struct inode *inode, in ocfs2_filecheck_read_inode_block_full() argument
1572 rc = ocfs2_read_blocks(INODE_CACHE(inode), in ocfs2_filecheck_read_inode_block_full()
1573 OCFS2_I(inode)->ip_blkno, in ocfs2_filecheck_read_inode_block_full()
1577 rc = ocfs2_read_blocks(INODE_CACHE(inode), in ocfs2_filecheck_read_inode_block_full()
1578 OCFS2_I(inode)->ip_blkno, in ocfs2_filecheck_read_inode_block_full()
1589 int ocfs2_read_inode_block_full(struct inode *inode, struct buffer_head **bh, in ocfs2_read_inode_block_full() argument
1595 rc = ocfs2_read_blocks(INODE_CACHE(inode), OCFS2_I(inode)->ip_blkno, in ocfs2_read_inode_block_full()
1605 int ocfs2_read_inode_block(struct inode *inode, struct buffer_head **bh) in ocfs2_read_inode_block() argument
1607 return ocfs2_read_inode_block_full(inode, bh, 0); in ocfs2_read_inode_block()