From 028b94603e6213a42a7a48ad34125aa569716f35 Mon Sep 17 00:00:00 2001 From: johann Date: Fri, 3 Apr 2009 23:15:28 +0000 Subject: [PATCH] Branch b_release_1_8_0 b=18695 i=adilger Add LASSERTF in fsfilt_ext3_setattr() when truncating a directory. --- lustre/lvfs/fsfilt_ext3.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 43b3f0c..5a79a3d 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -510,6 +510,10 @@ static int fsfilt_ext3_setattr(struct dentry *dentry, void *handle, struct inode *inode = dentry->d_inode; int rc = 0; + LASSERTF(!(iattr->ia_valid & ATTR_SIZE) || !S_ISDIR(inode->i_mode), + "changing i_size on directory #%lu (%p) new %lu old %lu\n", + inode->i_ino, inode, iattr->ia_size, i_size_read(inode)); + /* Avoid marking the inode dirty on the superblock list unnecessarily. * We are already writing the inode to disk as part of this * transaction and want to avoid a lot of extra inode writeout -- 1.8.3.1