From: Akira Fujita Subject: Re: [BUG] ext3/ext4 migration problem with dir_nlink feature flag Date: Fri, 21 Jan 2011 16:34:24 +0900 Message-ID: <4D393700.4060804@rs.jp.nec.com> References: <4CABE2A5.3000103@rs.jp.nec.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050408040101010601040608" To: Theodore Tso , ext4 development Return-path: Received: from TYO202.gate.nec.co.jp ([202.32.8.206]:44334 "EHLO tyo202.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872Ab1AUHeq (ORCPT ); Fri, 21 Jan 2011 02:34:46 -0500 In-Reply-To: <4CABE2A5.3000103@rs.jp.nec.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------050408040101010601040608 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Hi, Unfortunately, this bug still exists in 2.6.38-rc1 with e2fsprogs-1.41.13. Attached test program can reproduce this bug easily. Please have a look and try. Regards, Akira Fujita (2010/10/06 11:44), Akira Fujita wrote: > Hi, > > I found a bug which returns EIO by file access on ext3 (was ext4) whose > dir_nlink feature flag is removed and has more than 64000 directories. > Kernel: 2.6.36-rc6, e2fsprogs: 1.41.2 > Steps to reproduce are as follows: > > 1. Create ext4 which does not have extent and flex_bg feature flags > (Because this fs will be mounted as ext3 in step 3), > then create more than 64000 directories. > Therefore dir_nlink feature flag is set and link count becomes 1. > 2. Remove dir_nlink feature flag with tune2fs command > (e.g. tune2fs -O ^dir_nlink /dev/sdx). > 3. Mount ext4 as ext3, then remove subdir (Link: 1->0). > We cannot access parent directory, because link count goes wrong. > > We should disallow tune2fs command to remove dir_nlink feature flag. > > Regards, > Akira Fujita > > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > --------------050408040101010601040608 Content-Type: application/x-shellscript; name="dir_nlink.sh" Content-Transfer-Encoding: base64 Content-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