Commit a531a141 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: reverse inline-data truncate args
  ocfs2: Fix comparison in ocfs2_size_fits_inline_data()
  ocfs2: Remove bug statement in ocfs2_dentry_iput()
  [PATCH] ocfs2: Remove expensive bitmap scanning
  ocfs2: log valid inode # on bad inode
  ocfs2: Filter -ENOSPC in mlog_errno()
  [PATCH] fs/ocfs2: Add missing "space"
  ocfs2: Reset journal parameters after s_mount_opt update
parents 5e6ddf9a b1967d0e
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -459,6 +459,15 @@ config OCFS2_DEBUG_MASKLOG
	  This option will enlarge your kernel, but it allows debugging of
	  This option will enlarge your kernel, but it allows debugging of
	  ocfs2 filesystem issues.
	  ocfs2 filesystem issues.


config OCFS2_DEBUG_FS
	bool "OCFS2 expensive checks"
	depends on OCFS2_FS
	default n
	help
	  This option will enable expensive consistency checks. Enable
	  this option for debugging only as it is likely to decrease
	  performance of the filesystem.

config MINIX_FS
config MINIX_FS
	tristate "Minix fs support"
	tristate "Minix fs support"
	help
	help
+1 −1
Original line number Original line Diff line number Diff line
@@ -1514,7 +1514,7 @@ int ocfs2_size_fits_inline_data(struct buffer_head *di_bh, u64 new_size)
{
{
	struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
	struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;


	if (new_size < le16_to_cpu(di->id2.i_data.id_count))
	if (new_size <= le16_to_cpu(di->id2.i_data.id_count))
		return 1;
		return 1;
	return 0;
	return 0;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -212,7 +212,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
#define mlog_errno(st) do {						\
#define mlog_errno(st) do {						\
	int _st = (st);							\
	int _st = (st);							\
	if (_st != -ERESTARTSYS && _st != -EINTR &&			\
	if (_st != -ERESTARTSYS && _st != -EINTR &&			\
	    _st != AOP_TRUNCATED_PAGE)					\
	    _st != AOP_TRUNCATED_PAGE && _st != -ENOSPC)		\
		mlog(ML_ERROR, "status = %lld\n", (long long)_st);	\
		mlog(ML_ERROR, "status = %lld\n", (long long)_st);	\
} while (0)
} while (0)


+16 −4
Original line number Original line Diff line number Diff line
@@ -344,12 +344,24 @@ static void ocfs2_dentry_iput(struct dentry *dentry, struct inode *inode)
{
{
	struct ocfs2_dentry_lock *dl = dentry->d_fsdata;
	struct ocfs2_dentry_lock *dl = dentry->d_fsdata;


	mlog_bug_on_msg(!dl && !(dentry->d_flags & DCACHE_DISCONNECTED),
	if (!dl) {
			"dentry: %.*s\n", dentry->d_name.len,
		/*
		 * No dentry lock is ok if we're disconnected or
		 * unhashed.
		 */
		if (!(dentry->d_flags & DCACHE_DISCONNECTED) &&
		    !d_unhashed(dentry)) {
			unsigned long long ino = 0ULL;
			if (inode)
				ino = (unsigned long long)OCFS2_I(inode)->ip_blkno;
			mlog(ML_ERROR, "Dentry is missing cluster lock. "
			     "inode: %llu, d_flags: 0x%x, d_name: %.*s\n",
			     ino, dentry->d_flags, dentry->d_name.len,
			     dentry->d_name.name);
			     dentry->d_name.name);
		}


	if (!dl)
		goto out;
		goto out;
	}


	mlog_bug_on_msg(dl->dl_count == 0, "dentry: %.*s, count: %u\n",
	mlog_bug_on_msg(dl->dl_count == 0, "dentry: %.*s, count: %u\n",
			dentry->d_name.len, dentry->d_name.name,
			dentry->d_name.len, dentry->d_name.name,
+15 −4
Original line number Original line Diff line number Diff line
@@ -399,7 +399,7 @@ static int ocfs2_truncate_file(struct inode *inode,


	if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
	if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
		status = ocfs2_truncate_inline(inode, di_bh, new_i_size,
		status = ocfs2_truncate_inline(inode, di_bh, new_i_size,
					       i_size_read(inode), 0);
					       i_size_read(inode), 1);
		if (status)
		if (status)
			mlog_errno(status);
			mlog_errno(status);


@@ -1521,6 +1521,7 @@ static int ocfs2_remove_inode_range(struct inode *inode,
	u32 trunc_start, trunc_len, cpos, phys_cpos, alloc_size;
	u32 trunc_start, trunc_len, cpos, phys_cpos, alloc_size;
	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
	struct ocfs2_cached_dealloc_ctxt dealloc;
	struct ocfs2_cached_dealloc_ctxt dealloc;
	struct address_space *mapping = inode->i_mapping;


	ocfs2_init_dealloc_ctxt(&dealloc);
	ocfs2_init_dealloc_ctxt(&dealloc);


@@ -1529,10 +1530,20 @@ static int ocfs2_remove_inode_range(struct inode *inode,


	if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
	if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
		ret = ocfs2_truncate_inline(inode, di_bh, byte_start,
		ret = ocfs2_truncate_inline(inode, di_bh, byte_start,
					    byte_start + byte_len, 1);
					    byte_start + byte_len, 0);
		if (ret)
		if (ret) {
			mlog_errno(ret);
			mlog_errno(ret);
		return ret;
			goto out;
		}
		/*
		 * There's no need to get fancy with the page cache
		 * truncate of an inline-data inode. We're talking
		 * about less than a page here, which will be cached
		 * in the dinode buffer anyway.
		 */
		unmap_mapping_range(mapping, 0, 0, 0);
		truncate_inode_pages(mapping, 0);
		goto out;
	}
	}


	trunc_start = ocfs2_clusters_for_bytes(osb->sb, byte_start);
	trunc_start = ocfs2_clusters_for_bytes(osb->sb, byte_start);
Loading