From patchwork Thu Jan 5 01:17:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9498213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3A63606B4 for ; Thu, 5 Jan 2017 01:17:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD79A28339 for ; Thu, 5 Jan 2017 01:17:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2516283A6; Thu, 5 Jan 2017 01:17:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B7712839B for ; Thu, 5 Jan 2017 01:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935753AbdAEBR4 (ORCPT ); Wed, 4 Jan 2017 20:17:56 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:45742 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933960AbdAEBRz (ORCPT ); Wed, 4 Jan 2017 20:17:55 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v051HqxZ028773 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Jan 2017 01:17:53 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v051Hq7K005486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Jan 2017 01:17:52 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v051HqOR029580; Thu, 5 Jan 2017 01:17:52 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 04 Jan 2017 17:17:52 -0800 Subject: [PATCH 8/9] common/populate: create attrs in different namespaces From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Wed, 04 Jan 2017 17:17:51 -0800 Message-ID: <148357907124.10436.3642646882075522970.stgit@birch.djwong.org> In-Reply-To: <148357902056.10436.12795484251467155460.stgit@birch.djwong.org> References: <148357902056.10436.12795484251467155460.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Darrick J. Wong --- common/populate | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/common/populate b/common/populate index 91a7753..9cd9362 100644 --- a/common/populate +++ b/common/populate @@ -166,6 +166,9 @@ _scratch_xfs_populate() { mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1 mknod "${SCRATCH_MNT}/S_IFBLK" c 1 1 + # special file with an xattr + setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR + # Attribute formats # LOCAL echo "+ local attr" @@ -183,6 +186,18 @@ _scratch_xfs_populate() { echo "+ btree attr" __populate_create_attr "${SCRATCH_MNT}/ATTR.FMT_BTREE" "$((64 * blksz / 40))" true + # trusted namespace + touch ${SCRATCH_MNT}/ATTR.TRUSTED + setfattr -n trusted.moo -v urk ${SCRATCH_MNT}/ATTR.TRUSTED + + # security namespace + touch ${SCRATCH_MNT}/ATTR.SECURITY + setfattr -n security.foo -v bar ${SCRATCH_MNT}/ATTR.SECURITY + + # system namespace + touch ${SCRATCH_MNT}/ATTR.SYSTEM + setfacl -m u:root:r ${SCRATCH_MNT}/ATTR.SYSTEM + # FMT_EXTENTS with a remote less-than-a-block value echo "+ attr extents with a remote less-than-a-block value" touch "${SCRATCH_MNT}/ATTR.FMT_EXTENTS_REMOTE3K" @@ -305,6 +320,9 @@ _scratch_ext4_populate() { mknod "${SCRATCH_MNT}/S_IFCHR" c 1 1 mknod "${SCRATCH_MNT}/S_IFBLK" c 1 1 + # special file with an xattr + setfacl -P -m u:nobody:r ${SCRATCH_MNT}/S_IFCHR + # Attribute formats # LOCAL echo "+ local attr" @@ -314,6 +332,18 @@ _scratch_ext4_populate() { echo "+ block attr" __populate_create_attr "${SCRATCH_MNT}/ATTR.FMT_BLOCK" "$((blksz / 40))" + # trusted namespace + touch ${SCRATCH_MNT}/ATTR.TRUSTED + setfattr -n trusted.moo -v urk ${SCRATCH_MNT}/ATTR.TRUSTED + + # security namespace + touch ${SCRATCH_MNT}/ATTR.SECURITY + setfattr -n security.foo -v bar ${SCRATCH_MNT}/ATTR.SECURITY + + # system namespace + touch ${SCRATCH_MNT}/ATTR.SYSTEM + setfacl -m u:root:r ${SCRATCH_MNT}/ATTR.SYSTEM + # Make an unused inode echo "+ empty file" touch "${SCRATCH_MNT}/unused"