From owner-svn-src-head@FreeBSD.ORG Fri Jan 24 13:51:39 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38419760; Fri, 24 Jan 2014 13:51:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24F301EEC; Fri, 24 Jan 2014 13:51:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0ODpdBZ054071; Fri, 24 Jan 2014 13:51:39 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0ODpcnO054068; Fri, 24 Jan 2014 13:51:38 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401241351.s0ODpcnO054068@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 24 Jan 2014 13:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261120 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2014 13:51:39 -0000 Author: pfg Date: Fri Jan 24 13:51:38 2014 New Revision: 261120 URL: http://svnweb.freebsd.org/changeset/base/261120 Log: ext2fs: fix a bug in dirindex and re-enable. The IN_* flags should be set in i_flag instead of corrupting i_flags [1]. Re-enable HTree dirindex as the last series of bug fixes seems to have fixed the issues. Reported by: bde [1] Tested by: kevlo MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_lookup.c Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Fri Jan 24 13:36:41 2014 (r261119) +++ head/sys/fs/ext2fs/ext2_htree.c Fri Jan 24 13:51:38 2014 (r261120) @@ -89,12 +89,10 @@ static int ext2_htree_writebuf(struct ex int ext2_htree_has_idx(struct inode *ip) { -#ifdef EXT2FS_HTREE if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && ip->i_flags & E4_INDEX) return (1); else -#endif return (0); } Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Fri Jan 24 13:36:41 2014 (r261119) +++ head/sys/fs/ext2fs/ext2_lookup.c Fri Jan 24 13:51:38 2014 (r261120) @@ -884,13 +884,11 @@ ext2_direnter(struct inode *ip, struct v bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); -#ifdef EXT2FS_HTREE if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { - /* XXX: These are set in the wrong place. */ dp->i_flags &= ~E4_INDEX; - dp->i_flags |= IN_CHANGE | IN_UPDATE; + dp->i_flag |= IN_CHANGE | IN_UPDATE; } return (error); } @@ -906,7 +904,6 @@ ext2_direnter(struct inode *ip, struct v return ext2_htree_create_index(dvp, cnp, &newdir); } } -#endif /* EXT2FS_HTREE */ if (dp->i_count == 0) { /*