From owner-svn-src-all@FreeBSD.ORG Thu Dec 26 01:11:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53715E2C; Thu, 26 Dec 2013 01:11:52 +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 24FF5127C; Thu, 26 Dec 2013 01:11:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ1BpiL004643; Thu, 26 Dec 2013 01:11:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ1BppW004640; Thu, 26 Dec 2013 01:11:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312260111.rBQ1BppW004640@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 26 Dec 2013 01:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259903 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 01:11:52 -0000 Author: pfg Date: Thu Dec 26 01:11:51 2013 New Revision: 259903 URL: http://svnweb.freebsd.org/changeset/base/259903 Log: MFC r252397, r258904, r259780: Small ext2fs updates. Use the unsigned random() range in i_gen. Add two new reserved inodes. Make the hashing algorithm match the linux code. PR: kern/183230 Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h stable/9/sys/fs/ext2fs/ext2_hash.c stable/9/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 01:11:51 2013 (r259903) @@ -44,6 +44,8 @@ #define EXT2_UNDELDIRINO ((ino_t)6) #define EXT2_RESIZEINO ((ino_t)7) #define EXT2_JOURNALINO ((ino_t)8) +#define EXT2_EXCLUDEINO ((ino_t)9) +#define EXT2_REPLICAINO ((ino_t)10) #define EXT2_FIRSTINO ((ino_t)11) /* Modified: stable/9/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 01:11:51 2013 (r259903) @@ -289,8 +289,8 @@ ext2_htree_hash(const char *name, int le len -= 32; name += 32; } - major = hash[0]; - minor = hash[1]; + major = hash[1]; + minor = hash[2]; break; default: goto error; Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Dec 26 01:11:51 2013 (r259903) @@ -1006,7 +1006,7 @@ ext2_vget(struct mount *mp, ino_t ino, i * already have one. This should only happen on old filesystems. */ if (ip->i_gen == 0) { - ip->i_gen = random() / 2 + 1; + ip->i_gen = random() + 1; if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0) ip->i_flag |= IN_MODIFIED; }