From: "Aneesh Kumar K.V" Subject: Re: e4defrag and chattr +e warnings Date: Tue, 25 Aug 2009 15:18:32 +0530 Message-ID: <20090825094832.GA16400@skywalker.linux.vnet.ibm.com> References: <4A93169C.7070106@xyzw.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-ext4@vger.kernel.org To: Brian Rogers Return-path: Received: from e23smtp06.au.ibm.com ([202.81.31.148]:55672 "EHLO e23smtp06.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbZHYJsz (ORCPT ); Tue, 25 Aug 2009 05:48:55 -0400 Received: from d23relay02.au.ibm.com (d23relay02.au.ibm.com [202.81.31.244]) by e23smtp06.au.ibm.com (8.14.3/8.13.1) with ESMTP id n7P9mtw4007395 for ; Tue, 25 Aug 2009 19:48:55 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay02.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7P9muPe1339634 for ; Tue, 25 Aug 2009 19:48:56 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7P9mtqK011943 for ; Tue, 25 Aug 2009 19:48:55 +1000 Content-Disposition: inline In-Reply-To: <4A93169C.7070106@xyzw.org> Sender: linux-ext4-owner@vger.kernel.org List-ID: On Mon, Aug 24, 2009 at 03:39:24PM -0700, Brian Rogers wrote: > Hi all. > > The first time since boot that I run e4defrag on a directory of > significant size, I get this warning in dmesg: > > > This might be happening when it hits files that don't use extents, but I > haven't tried e4defrag on a single non-extents file to verify that > theory. I've just so far only seen this happen when I defrag a directory > where I get the "operation not supported" message. > > If I use chattr +e to migrate a file to use extents, I get this: > > [ 470.400044] ------------[ cut here ]------------ > [ 470.400065] WARNING: at fs/inode.c:1210 generic_delete_inode+0x65/0x16a() Can you try this patch commit 832ecbfe5f3cf16916552759fbeff085992a66c4 Author: Aneesh Kumar K.V Date: Tue Aug 25 15:14:11 2009 +0530 ext4: unlock the new inode before iput We need to unlock the new inode before iput. This patch fix the below warning. [ 470.400044] ------------[ cut here ]------------ [ 470.400065] WARNING: at fs/inode.c:1210 generic_delete_inode+0x65/0x16a() [ 470.400072] Hardware name: N/A ..... ... [ 470.400353] Pid: 4451, comm: chattr Not tainted 2.6.31-rc7-red-debug #4 [ 470.400359] Call Trace: [ 470.400372] [] warn_slowpath_common+0x77/0x8f [ 470.400385] [] warn_slowpath_null+0xf/0x11 [ 470.400395] [] generic_delete_inode+0x65/0x16a [ 470.400405] [] generic_drop_inode+0x17/0x1bd [ 470.400413] [] iput+0x61/0x65 [ 470.400455] [] ext4_ext_migrate+0x5eb/0x66a [ext4] [ 470.400492] [] ext4_ioctl+0x340/0x756 [ext4] [ 470.400507] [] vfs_ioctl+0x1d/0x82 [ 470.400517] [] do_vfs_ioctl+0x483/0x4c9 [ 470.400527] [] ? trace_hardirqs_on+0xd/0xf [ 470.400537] [] sys_ioctl+0x51/0x74 [ 470.400549] [] system_call_fastpath+0x16/0x1b [ 470.400557] ---[ end trace ab85723542352dac ]--- Signed-off-by: Aneesh Kumar K.V diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 313a50b..05361ad 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -618,7 +618,7 @@ err_out: tmp_inode->i_nlink = 0; ext4_journal_stop(handle);