Whamcloud - gitweb
Branch b1_8
authorjohann <johann>
Fri, 3 Apr 2009 23:38:58 +0000 (23:38 +0000)
committerjohann <johann>
Fri, 3 Apr 2009 23:38:58 +0000 (23:38 +0000)
b=18695
i=adilger

Add LASSERTF in fsfilt_ext3_setattr() when truncating a directory.

lustre/lvfs/fsfilt_ext3.c

index 4554eb6..f222a8f 100644 (file)
@@ -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