Re: [PATCH v4] ocfs2: Let ocfs2_setattr use new truncate sequence.

From: Nick Piggin
Date: Fri Jun 11 2010 - 00:50:23 EST

On Fri, Jun 11, 2010 at 11:27:49AM +0800, Tao Ma wrote:
> Let ocfs2 use the new truncate sequence. The changes include:
> 1. Move inode_change_ok into cluster lock and remove inode_newsize_ok.
> 2. Use truncate_setsize directly since we don't implement our
> own ->truncate and what we need is "update i_size and
> truncate_pagecache" which truncate_setsize now does.
> 3. Change some i_size_read to inode->i_size in ocfs2_setattr
> since we have i_muext held.
> 4. For direct write, ocfs2 actually don't allow write to pass
> i_size(see ocfs2_prepare_inode_for_write), so we don't have
> a chance to increase i_size. So remove the bogus check.
> Cc: Joel Becker <joel.becker@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Nick Piggin <npiggin@xxxxxxx>

The patch looks fine to me. I really appreciate you working on truncate,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at