diff options
Diffstat (limited to 'fs/ocfs2/inode.c')
| -rw-r--r-- | fs/ocfs2/inode.c | 240 | 
1 files changed, 111 insertions, 129 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index f935fd6600d..437de7f768c 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -31,7 +31,6 @@  #include <asm/byteorder.h> -#define MLOG_MASK_PREFIX ML_INODE  #include <cluster/masklog.h>  #include "ocfs2.h" @@ -53,6 +52,7 @@  #include "uptodate.h"  #include "xattr.h"  #include "refcounttree.h" +#include "ocfs2_trace.h"  #include "buffer_head_io.h" @@ -130,8 +130,10 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,  	struct inode *inode = NULL;  	struct super_block *sb = osb->sb;  	struct ocfs2_find_inode_args args; +	journal_t *journal = OCFS2_SB(sb)->journal->j_journal; -	mlog_entry("(blkno = %llu)\n", (unsigned long long)blkno); +	trace_ocfs2_iget_begin((unsigned long long)blkno, flags, +			       sysfile_type);  	/* Ok. By now we've either got the offsets passed to us by the  	 * caller, or we just pulled them off the bh. Lets do some @@ -152,27 +154,52 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,  	/* inode was *not* in the inode cache. 2.6.x requires  	 * us to do our own read_inode call and unlock it  	 * afterwards. */ -	if (inode && inode->i_state & I_NEW) { -		mlog(0, "Inode was not in inode cache, reading it.\n"); -		ocfs2_read_locked_inode(inode, &args); -		unlock_new_inode(inode); -	}  	if (inode == NULL) {  		inode = ERR_PTR(-ENOMEM);  		mlog_errno(PTR_ERR(inode));  		goto bail;  	} +	trace_ocfs2_iget5_locked(inode->i_state); +	if (inode->i_state & I_NEW) { +		ocfs2_read_locked_inode(inode, &args); +		unlock_new_inode(inode); +	}  	if (is_bad_inode(inode)) {  		iput(inode);  		inode = ERR_PTR(-ESTALE);  		goto bail;  	} +	/* +	 * Set transaction id's of transactions that have to be committed +	 * to finish f[data]sync. We set them to currently running transaction +	 * as we cannot be sure that the inode or some of its metadata isn't +	 * part of the transaction - the inode could have been reclaimed and +	 * now it is reread from disk. +	 */ +	if (journal) { +		transaction_t *transaction; +		tid_t tid; +		struct ocfs2_inode_info *oi = OCFS2_I(inode); + +		read_lock(&journal->j_state_lock); +		if (journal->j_running_transaction) +			transaction = journal->j_running_transaction; +		else +			transaction = journal->j_committing_transaction; +		if (transaction) +			tid = transaction->t_tid; +		else +			tid = journal->j_commit_sequence; +		read_unlock(&journal->j_state_lock); +		oi->i_sync_tid = tid; +		oi->i_datasync_tid = tid; +	} +  bail:  	if (!IS_ERR(inode)) { -		mlog(0, "returning inode with number %llu\n", -		     (unsigned long long)OCFS2_I(inode)->ip_blkno); -		mlog_exit_ptr(inode); +		trace_ocfs2_iget_end(inode,  +			(unsigned long long)OCFS2_I(inode)->ip_blkno);  	}  	return inode; @@ -192,18 +219,17 @@ static int ocfs2_find_actor(struct inode *inode, void *opaque)  	struct ocfs2_inode_info *oi = OCFS2_I(inode);  	int ret = 0; -	mlog_entry("(0x%p, %lu, 0x%p)\n", inode, inode->i_ino, opaque); -  	args = opaque;  	mlog_bug_on_msg(!inode, "No inode in find actor!\n"); +	trace_ocfs2_find_actor(inode, inode->i_ino, opaque, args->fi_blkno); +  	if (oi->ip_blkno != args->fi_blkno)  		goto bail;  	ret = 1;  bail: -	mlog_exit(ret);  	return ret;  } @@ -218,8 +244,6 @@ static int ocfs2_init_locked_inode(struct inode *inode, void *opaque)  	static struct lock_class_key ocfs2_quota_ip_alloc_sem_key,  				     ocfs2_file_ip_alloc_sem_key; -	mlog_entry("inode = %p, opaque = %p\n", inode, opaque); -  	inode->i_ino = args->fi_ino;  	OCFS2_I(inode)->ip_blkno = args->fi_blkno;  	if (args->fi_sysfile_type != 0) @@ -235,7 +259,6 @@ static int ocfs2_init_locked_inode(struct inode *inode, void *opaque)  		lockdep_set_class(&OCFS2_I(inode)->ip_alloc_sem,  				  &ocfs2_file_ip_alloc_sem_key); -	mlog_exit(0);  	return 0;  } @@ -246,9 +269,6 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,  	struct ocfs2_super *osb;  	int use_plocks = 1; -	mlog_entry("(0x%p, size:%llu)\n", inode, -		   (unsigned long long)le64_to_cpu(fe->i_size)); -  	sb = inode->i_sb;  	osb = OCFS2_SB(sb); @@ -276,15 +296,17 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,  	inode->i_generation = le32_to_cpu(fe->i_generation);  	inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev));  	inode->i_mode = le16_to_cpu(fe->i_mode); -	inode->i_uid = le32_to_cpu(fe->i_uid); -	inode->i_gid = le32_to_cpu(fe->i_gid); +	i_uid_write(inode, le32_to_cpu(fe->i_uid)); +	i_gid_write(inode, le32_to_cpu(fe->i_gid));  	/* Fast symlinks will have i_size but no allocated clusters. */ -	if (S_ISLNK(inode->i_mode) && !fe->i_clusters) +	if (S_ISLNK(inode->i_mode) && !fe->i_clusters) {  		inode->i_blocks = 0; -	else +		inode->i_mapping->a_ops = &ocfs2_fast_symlink_aops; +	} else {  		inode->i_blocks = ocfs2_inode_sector_count(inode); -	inode->i_mapping->a_ops = &ocfs2_aops; +		inode->i_mapping->a_ops = &ocfs2_aops; +	}  	inode->i_atime.tv_sec = le64_to_cpu(fe->i_atime);  	inode->i_atime.tv_nsec = le32_to_cpu(fe->i_atime_nsec);  	inode->i_mtime.tv_sec = le64_to_cpu(fe->i_mtime); @@ -298,22 +320,22 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,  		     (unsigned long long)OCFS2_I(inode)->ip_blkno,  		     (unsigned long long)le64_to_cpu(fe->i_blkno)); -	inode->i_nlink = ocfs2_read_links_count(fe); +	set_nlink(inode, ocfs2_read_links_count(fe)); +	trace_ocfs2_populate_inode(OCFS2_I(inode)->ip_blkno, +				   le32_to_cpu(fe->i_flags));  	if (fe->i_flags & cpu_to_le32(OCFS2_SYSTEM_FL)) {  		OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SYSTEM_FILE;  		inode->i_flags |= S_NOQUOTA;  	} - +    	if (fe->i_flags & cpu_to_le32(OCFS2_LOCAL_ALLOC_FL)) {  		OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP; -		mlog(0, "local alloc inode: i_ino=%lu\n", inode->i_ino);  	} else if (fe->i_flags & cpu_to_le32(OCFS2_BITMAP_FL)) {  		OCFS2_I(inode)->ip_flags |= OCFS2_INODE_BITMAP;  	} else if (fe->i_flags & cpu_to_le32(OCFS2_QUOTA_FL)) {  		inode->i_flags |= S_NOQUOTA;  	} else if (fe->i_flags & cpu_to_le32(OCFS2_SUPER_BLOCK_FL)) { -		mlog(0, "superblock inode: i_ino=%lu\n", inode->i_ino);  		/* we can't actually hit this as read_inode can't  		 * handle superblocks today ;-) */  		BUG(); @@ -338,10 +360,7 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,  		    OCFS2_I(inode)->ip_dir_lock_gen = 1;  		    break;  	    case S_IFLNK: -		    if (ocfs2_inode_is_fast_symlink(inode)) -			inode->i_op = &ocfs2_fast_symlink_inode_operations; -		    else -			inode->i_op = &ocfs2_symlink_inode_operations; +		    inode->i_op = &ocfs2_symlink_inode_operations;  		    i_size_write(inode, le64_to_cpu(fe->i_size));  		    break;  	    default: @@ -381,7 +400,6 @@ void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,  	if (S_ISDIR(inode->i_mode))  		ocfs2_resv_set_type(&OCFS2_I(inode)->ip_la_data_resv,  				    OCFS2_RESV_FLAG_DIR); -	mlog_exit_void();  }  static int ocfs2_read_locked_inode(struct inode *inode, @@ -394,22 +412,10 @@ static int ocfs2_read_locked_inode(struct inode *inode,  	int status, can_lock;  	u32 generation = 0; -	mlog_entry("(0x%p, 0x%p)\n", inode, args); -  	status = -EINVAL; -	if (inode == NULL || inode->i_sb == NULL) { -		mlog(ML_ERROR, "bad inode\n"); -		return status; -	}  	sb = inode->i_sb;  	osb = OCFS2_SB(sb); -	if (!args) { -		mlog(ML_ERROR, "bad inode args\n"); -		make_bad_inode(inode); -		return status; -	} -  	/*  	 * To improve performance of cold-cache inode stats, we take  	 * the cluster lock here if possible. @@ -434,7 +440,7 @@ static int ocfs2_read_locked_inode(struct inode *inode,  	 * #1 and #2 can be simply solved by never taking the lock  	 * here for system files (which are the only type we read  	 * during mount). It's a heavier approach, but our main -	 * concern is user-accesible files anyway. +	 * concern is user-accessible files anyway.  	 *  	 * #3 works itself out because we'll eventually take the  	 * cluster lock before trusting anything anyway. @@ -443,6 +449,9 @@ static int ocfs2_read_locked_inode(struct inode *inode,  		&& !(args->fi_flags & OCFS2_FI_FLAG_ORPHAN_RECOVERY)  		&& !ocfs2_mount_local(osb); +	trace_ocfs2_read_locked_inode( +		(unsigned long long)OCFS2_I(inode)->ip_blkno, can_lock); +  	/*  	 * To maintain backwards compatibility with older versions of  	 * ocfs2-tools, we still store the generation value for system @@ -534,7 +543,6 @@ bail:  	if (args && bh)  		brelse(bh); -	mlog_exit(status);  	return status;  } @@ -551,8 +559,6 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,  	struct ocfs2_dinode *fe;  	handle_t *handle = NULL; -	mlog_entry_void(); -  	fe = (struct ocfs2_dinode *) fe_bh->b_data;  	/* @@ -600,7 +606,6 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb,  out:  	if (handle)  		ocfs2_commit_trans(osb, handle); -	mlog_exit(status);  	return status;  } @@ -696,8 +701,6 @@ static int ocfs2_check_orphan_recovery_state(struct ocfs2_super *osb,  	spin_lock(&osb->osb_lock);  	if (ocfs2_node_map_test_bit(osb, &osb->osb_recovering_orphan_dirs, slot)) { -		mlog(0, "Recovery is happening on orphan dir %d, will skip " -		     "this inode\n", slot);  		ret = -EDEADLK;  		goto out;  	} @@ -706,6 +709,7 @@ static int ocfs2_check_orphan_recovery_state(struct ocfs2_super *osb,  	osb->osb_orphan_wipes[slot]++;  out:  	spin_unlock(&osb->osb_lock); +	trace_ocfs2_check_orphan_recovery_state(slot, ret);  	return ret;  } @@ -816,6 +820,10 @@ static int ocfs2_inode_is_valid_to_delete(struct inode *inode)  	struct ocfs2_inode_info *oi = OCFS2_I(inode);  	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); +	trace_ocfs2_inode_is_valid_to_delete(current, osb->dc_task, +					     (unsigned long long)oi->ip_blkno, +					     oi->ip_flags); +  	/* We shouldn't be getting here for the root directory  	 * inode.. */  	if (inode == osb->root_inode) { @@ -823,16 +831,15 @@ static int ocfs2_inode_is_valid_to_delete(struct inode *inode)  		goto bail;  	} -	/* If we're coming from downconvert_thread we can't go into our own -	 * voting [hello, deadlock city!], so unforuntately we just -	 * have to skip deleting this guy. That's OK though because -	 * the node who's doing the actual deleting should handle it -	 * anyway. */ -	if (current == osb->dc_task) { -		mlog(0, "Skipping delete of %lu because we're currently " -		     "in downconvert\n", inode->i_ino); +	/* +	 * If we're coming from downconvert_thread we can't go into our own +	 * voting [hello, deadlock city!] so we cannot delete the inode. But +	 * since we dropped last inode ref when downconverting dentry lock, +	 * we cannot have the file open and thus the node doing unlink will +	 * take care of deleting the inode. +	 */ +	if (current == osb->dc_task)  		goto bail; -	}  	spin_lock(&oi->ip_lock);  	/* OCFS2 *never* deletes system files. This should technically @@ -844,15 +851,6 @@ static int ocfs2_inode_is_valid_to_delete(struct inode *inode)  		goto bail_unlock;  	} -	/* If we have allowd wipe of this inode for another node, it -	 * will be marked here so we can safely skip it. Recovery will -	 * cleanup any inodes we might inadvertantly skip here. */ -	if (oi->ip_flags & OCFS2_INODE_SKIP_DELETE) { -		mlog(0, "Skipping delete of %lu because another node " -		     "has done this for us.\n", inode->i_ino); -		goto bail_unlock; -	} -  	ret = 1;  bail_unlock:  	spin_unlock(&oi->ip_lock); @@ -868,28 +866,27 @@ static int ocfs2_query_inode_wipe(struct inode *inode,  				  struct buffer_head *di_bh,  				  int *wipe)  { -	int status = 0; +	int status = 0, reason = 0;  	struct ocfs2_inode_info *oi = OCFS2_I(inode);  	struct ocfs2_dinode *di;  	*wipe = 0; +	trace_ocfs2_query_inode_wipe_begin((unsigned long long)oi->ip_blkno, +					   inode->i_nlink); +  	/* While we were waiting for the cluster lock in  	 * ocfs2_delete_inode, another node might have asked to delete  	 * the inode. Recheck our flags to catch this. */  	if (!ocfs2_inode_is_valid_to_delete(inode)) { -		mlog(0, "Skipping delete of %llu because flags changed\n", -		     (unsigned long long)oi->ip_blkno); +		reason = 1;  		goto bail;  	}  	/* Now that we have an up to date inode, we can double check  	 * the link count. */ -	if (inode->i_nlink) { -		mlog(0, "Skipping delete of %llu because nlink = %u\n", -		     (unsigned long long)oi->ip_blkno, inode->i_nlink); +	if (inode->i_nlink)  		goto bail; -	}  	/* Do some basic inode verification... */  	di = (struct ocfs2_dinode *) di_bh->b_data; @@ -904,9 +901,7 @@ static int ocfs2_query_inode_wipe(struct inode *inode,  		 * ORPHANED_FL not.  		 */  		if (di->i_dyn_features & cpu_to_le16(OCFS2_HAS_REFCOUNT_FL)) { -			mlog(0, "Reflinked inode %llu is no longer orphaned.  " -			     "it shouldn't be deleted\n", -			     (unsigned long long)oi->ip_blkno); +			reason = 2;  			goto bail;  		} @@ -934,7 +929,7 @@ static int ocfs2_query_inode_wipe(struct inode *inode,  	 * the inode open lock in ocfs2_read_locked_inode(). When we  	 * get to ->delete_inode(), each node tries to convert it's  	 * lock to an exclusive. Trylocks are serialized by the inode -	 * meta data lock. If the upconvert suceeds, we know the inode +	 * meta data lock. If the upconvert succeeds, we know the inode  	 * is no longer live and can be deleted.  	 *  	 * Though we call this with the meta data lock held, the @@ -943,8 +938,7 @@ static int ocfs2_query_inode_wipe(struct inode *inode,  	status = ocfs2_try_open_lock(inode, 1);  	if (status == -EAGAIN) {  		status = 0; -		mlog(0, "Skipping delete of %llu because it is in use on " -		     "other nodes\n", (unsigned long long)oi->ip_blkno); +		reason = 3;  		goto bail;  	}  	if (status < 0) { @@ -953,11 +947,10 @@ static int ocfs2_query_inode_wipe(struct inode *inode,  	}  	*wipe = 1; -	mlog(0, "Inode %llu is ok to wipe from orphan dir %u\n", -	     (unsigned long long)oi->ip_blkno, -	     le16_to_cpu(di->i_orphaned_slot)); +	trace_ocfs2_query_inode_wipe_succ(le16_to_cpu(di->i_orphaned_slot));  bail: +	trace_ocfs2_query_inode_wipe_end(status, reason);  	return status;  } @@ -967,11 +960,11 @@ bail:  static void ocfs2_cleanup_delete_inode(struct inode *inode,  				       int sync_data)  { -	mlog(0, "Cleanup inode %llu, sync = %d\n", -	     (unsigned long long)OCFS2_I(inode)->ip_blkno, sync_data); +	trace_ocfs2_cleanup_delete_inode( +		(unsigned long long)OCFS2_I(inode)->ip_blkno, sync_data);  	if (sync_data) -		write_inode_now(inode, 1); -	truncate_inode_pages(&inode->i_data, 0); +		filemap_write_and_wait(inode->i_mapping); +	truncate_inode_pages_final(&inode->i_data);  }  static void ocfs2_delete_inode(struct inode *inode) @@ -980,17 +973,15 @@ static void ocfs2_delete_inode(struct inode *inode)  	sigset_t oldset;  	struct buffer_head *di_bh = NULL; -	mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino); +	trace_ocfs2_delete_inode(inode->i_ino, +				 (unsigned long long)OCFS2_I(inode)->ip_blkno, +				 is_bad_inode(inode));  	/* When we fail in read_inode() we mark inode as bad. The second test  	 * catches the case when inode allocation fails before allocating  	 * a block for inode. */ -	if (is_bad_inode(inode) || !OCFS2_I(inode)->ip_blkno) { -		mlog(0, "Skipping delete of bad inode\n"); +	if (is_bad_inode(inode) || !OCFS2_I(inode)->ip_blkno)  		goto bail; -	} - -	dquot_initialize(inode);  	if (!ocfs2_inode_is_valid_to_delete(inode)) {  		/* It's probably not necessary to truncate_inode_pages @@ -1000,6 +991,8 @@ static void ocfs2_delete_inode(struct inode *inode)  		goto bail;  	} +	dquot_initialize(inode); +  	/* We want to block signals in delete_inode as the lock and  	 * messaging paths may return us -ERESTARTSYS. Which would  	 * cause us to exit early, resulting in inodes being orphaned @@ -1080,19 +1073,18 @@ bail_unlock_nfs_sync:  bail_unblock:  	ocfs2_unblock_signals(&oldset);  bail: -	mlog_exit_void(); +	return;  }  static void ocfs2_clear_inode(struct inode *inode)  {  	int status;  	struct ocfs2_inode_info *oi = OCFS2_I(inode); +	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); -	mlog_entry_void(); - -	end_writeback(inode); -	mlog(0, "Clearing inode: %llu, nlink = %u\n", -	     (unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_nlink); +	clear_inode(inode); +	trace_ocfs2_clear_inode((unsigned long long)oi->ip_blkno, +				inode->i_nlink);  	mlog_bug_on_msg(OCFS2_SB(inode->i_sb) == NULL,  			"Inode=%lu\n", inode->i_ino); @@ -1105,9 +1097,9 @@ static void ocfs2_clear_inode(struct inode *inode)  	/* Do these before all the other work so that we don't bounce  	 * the downconvert thread while waiting to destroy the locks. */ -	ocfs2_mark_lockres_freeing(&oi->ip_rw_lockres); -	ocfs2_mark_lockres_freeing(&oi->ip_inode_lockres); -	ocfs2_mark_lockres_freeing(&oi->ip_open_lockres); +	ocfs2_mark_lockres_freeing(osb, &oi->ip_rw_lockres); +	ocfs2_mark_lockres_freeing(osb, &oi->ip_inode_lockres); +	ocfs2_mark_lockres_freeing(osb, &oi->ip_open_lockres);  	ocfs2_resv_discard(&OCFS2_SB(inode->i_sb)->osb_la_resmap,  			   &oi->ip_la_data_resv); @@ -1181,8 +1173,6 @@ static void ocfs2_clear_inode(struct inode *inode)  	 */  	jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal,  				       &oi->ip_jinode); - -	mlog_exit_void();  }  void ocfs2_evict_inode(struct inode *inode) @@ -1191,7 +1181,7 @@ void ocfs2_evict_inode(struct inode *inode)  	    (OCFS2_I(inode)->ip_flags & OCFS2_INODE_MAYBE_ORPHANED)) {  		ocfs2_delete_inode(inode);  	} else { -		truncate_inode_pages(&inode->i_data, 0); +		truncate_inode_pages_final(&inode->i_data);  	}  	ocfs2_clear_inode(inode);  } @@ -1204,17 +1194,14 @@ int ocfs2_drop_inode(struct inode *inode)  	struct ocfs2_inode_info *oi = OCFS2_I(inode);  	int res; -	mlog_entry_void(); - -	mlog(0, "Drop inode %llu, nlink = %u, ip_flags = 0x%x\n", -	     (unsigned long long)oi->ip_blkno, inode->i_nlink, oi->ip_flags); +	trace_ocfs2_drop_inode((unsigned long long)oi->ip_blkno, +				inode->i_nlink, oi->ip_flags);  	if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED)  		res = 1;  	else  		res = generic_drop_inode(inode); -	mlog_exit_void();  	return res;  } @@ -1226,11 +1213,11 @@ int ocfs2_inode_revalidate(struct dentry *dentry)  	struct inode *inode = dentry->d_inode;  	int status = 0; -	mlog_entry("(inode = 0x%p, ino = %llu)\n", inode, -		   inode ? (unsigned long long)OCFS2_I(inode)->ip_blkno : 0ULL); +	trace_ocfs2_inode_revalidate(inode, +		inode ? (unsigned long long)OCFS2_I(inode)->ip_blkno : 0ULL, +		inode ? (unsigned long long)OCFS2_I(inode)->ip_flags : 0);  	if (!inode) { -		mlog(0, "eep, no inode!\n");  		status = -ENOENT;  		goto bail;  	} @@ -1238,7 +1225,6 @@ int ocfs2_inode_revalidate(struct dentry *dentry)  	spin_lock(&OCFS2_I(inode)->ip_lock);  	if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) {  		spin_unlock(&OCFS2_I(inode)->ip_lock); -		mlog(0, "inode deleted!\n");  		status = -ENOENT;  		goto bail;  	} @@ -1254,8 +1240,6 @@ int ocfs2_inode_revalidate(struct dentry *dentry)  	}  	ocfs2_inode_unlock(inode, 0);  bail: -	mlog_exit(status); -  	return status;  } @@ -1271,8 +1255,7 @@ int ocfs2_mark_inode_dirty(handle_t *handle,  	int status;  	struct ocfs2_dinode *fe = (struct ocfs2_dinode *) bh->b_data; -	mlog_entry("(inode %llu)\n", -		   (unsigned long long)OCFS2_I(inode)->ip_blkno); +	trace_ocfs2_mark_inode_dirty((unsigned long long)OCFS2_I(inode)->ip_blkno);  	status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), bh,  					 OCFS2_JOURNAL_ACCESS_WRITE); @@ -1290,8 +1273,8 @@ int ocfs2_mark_inode_dirty(handle_t *handle,  	fe->i_size = cpu_to_le64(i_size_read(inode));  	ocfs2_set_links_count(fe, inode->i_nlink); -	fe->i_uid = cpu_to_le32(inode->i_uid); -	fe->i_gid = cpu_to_le32(inode->i_gid); +	fe->i_uid = cpu_to_le32(i_uid_read(inode)); +	fe->i_gid = cpu_to_le32(i_gid_read(inode));  	fe->i_mode = cpu_to_le16(inode->i_mode);  	fe->i_atime = cpu_to_le64(inode->i_atime.tv_sec);  	fe->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec); @@ -1301,8 +1284,8 @@ int ocfs2_mark_inode_dirty(handle_t *handle,  	fe->i_mtime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);  	ocfs2_journal_dirty(handle, bh); +	ocfs2_update_inode_fsync_trans(handle, inode, 1);  leave: -	mlog_exit(status);  	return status;  } @@ -1321,9 +1304,9 @@ void ocfs2_refresh_inode(struct inode *inode,  	OCFS2_I(inode)->ip_dyn_features = le16_to_cpu(fe->i_dyn_features);  	ocfs2_set_inode_flags(inode);  	i_size_write(inode, le64_to_cpu(fe->i_size)); -	inode->i_nlink = ocfs2_read_links_count(fe); -	inode->i_uid = le32_to_cpu(fe->i_uid); -	inode->i_gid = le32_to_cpu(fe->i_gid); +	set_nlink(inode, ocfs2_read_links_count(fe)); +	i_uid_write(inode, le32_to_cpu(fe->i_uid)); +	i_gid_write(inode, le32_to_cpu(fe->i_gid));  	inode->i_mode = le16_to_cpu(fe->i_mode);  	if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0)  		inode->i_blocks = 0; @@ -1345,8 +1328,7 @@ int ocfs2_validate_inode_block(struct super_block *sb,  	int rc;  	struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data; -	mlog(0, "Validating dinode %llu\n", -	     (unsigned long long)bh->b_blocknr); +	trace_ocfs2_validate_inode_block((unsigned long long)bh->b_blocknr);  	BUG_ON(!buffer_uptodate(bh));  | 
