From owner-svn-src-all@freebsd.org Sun Jul 9 15:13:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4701D87EE9; Sun, 9 Jul 2017 15:13:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83B7C2B4A; Sun, 9 Jul 2017 15:13:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v69FDen4055474; Sun, 9 Jul 2017 15:13:40 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v69FDeK6055473; Sun, 9 Jul 2017 15:13:40 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201707091513.v69FDeK6055473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 9 Jul 2017 15:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320840 - stable/11/sys/fs/ext2fs X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/sys/fs/ext2fs X-SVN-Commit-Revision: 320840 X-SVN-Commit-Repository: base 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.23 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: Sun, 09 Jul 2017 15:13:41 -0000 Author: pfg Date: Sun Jul 9 15:13:40 2017 New Revision: 320840 URL: https://svnweb.freebsd.org/changeset/base/320840 Log: MFC r320408: ext2fs: Support e2di_uid_high and e2di_gid_high. The fields exist on all versions of the filesystem and using them is a mount option on linux. For FreeBSD, the corresponding i_uid and i_gid are always long enough so use them by default. Reviewed by: Fedor Uporov Modified: stable/11/sys/fs/ext2fs/ext2_inode_cnv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/11/sys/fs/ext2fs/ext2_inode_cnv.c Sun Jul 9 15:09:15 2017 (r320839) +++ stable/11/sys/fs/ext2fs/ext2_inode_cnv.c Sun Jul 9 15:13:40 2017 (r320840) @@ -122,6 +122,8 @@ ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip) ip->i_gen = ei->e2di_gen; ip->i_uid = ei->e2di_uid; ip->i_gid = ei->e2di_gid; + ip->i_uid |= (uint32_t)ei->e2di_uid_high << 16; + ip->i_gid |= (uint32_t)ei->e2di_gid_high << 16; /* XXX use memcpy */ for (i = 0; i < NDADDR; i++) ip->i_db[i] = ei->e2di_blocks[i]; @@ -166,8 +168,10 @@ ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei) ei->e2di_nblock = ip->i_blocks & 0xffffffff; ei->e2di_nblock_high = ip->i_blocks >> 32 & 0xffff; ei->e2di_gen = ip->i_gen; - ei->e2di_uid = ip->i_uid; - ei->e2di_gid = ip->i_gid; + ei->e2di_uid = ip->i_uid & 0xffff; + ei->e2di_uid_high = ip->i_uid >> 16 & 0xffff; + ei->e2di_gid = ip->i_gid & 0xffff; + ei->e2di_gid_high = ip->i_gid >> 16 & 0xffff; /* XXX use memcpy */ for (i = 0; i < NDADDR; i++) ei->e2di_blocks[i] = ip->i_db[i];