From patchwork Tue Dec 12 05:19:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 10106221 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 0D7CB6032B for ; Tue, 12 Dec 2017 05:19:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0085A29049 for ; Tue, 12 Dec 2017 05:19:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7EE529923; Tue, 12 Dec 2017 05:19:44 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 4BABF29049 for ; Tue, 12 Dec 2017 05:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750749AbdLLFTn (ORCPT ); Tue, 12 Dec 2017 00:19:43 -0500 Received: from imap.thunk.org ([74.207.234.97]:33012 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbdLLFTn (ORCPT ); Tue, 12 Dec 2017 00:19:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ceJMNbaVtYqimwlZ2seA9pxdWaonh0DUZczKzojJFvA=; b=XqVeNkBnQ0XRcmFz5Xij86A3pR 9OSrf1Iq4bX+3JlqWN7g4TX4v7Mj8e5Z/JnthylUw77056mW0jTWsFBGdKvt0y8XiCH9lCi79kFJ6 NAnzvnJjP6G2ZVkdjKilMSN6ReFqW1w/dpwD+N65xIvtkE7l4l59USPKmQFt4gubfRrg=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1eOcyk-0005mi-7s; Tue, 12 Dec 2017 05:19:42 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id E7D4EC00241; Tue, 12 Dec 2017 00:19:40 -0500 (EST) From: Theodore Ts'o To: fstests@vger.kernel.org Cc: Theodore Ts'o Subject: [PATCH] common/populate: fix S_IFDIR.FMT_BLOCK and ATTR.FMT_LOCAL for ext4 encryption Date: Tue, 12 Dec 2017 00:19:37 -0500 Message-Id: <20171212051937.25984-1-tytso@mit.edu> X-Mailer: git-send-email 2.11.0.rc0.7.gbe5a750 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When ext4 encryption is enabled, the directory entries are encrypted so we need to create fewer directory entries to guarantee that they will all fit in a single block. Also, the encryption metadata takes up extended attribute room so we can only add a single xattr to guarantee that the xattrs will fit in the inode. Signed-off-by: Theodore Ts'o --- common/populate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/populate b/common/populate index b77c5081..07ea7e60 100644 --- a/common/populate +++ b/common/populate @@ -343,7 +343,7 @@ _scratch_ext4_populate() { # - BLOCK echo "+ block dir" - __populate_create_dir "${SCRATCH_MNT}/S_IFDIR.FMT_BLOCK" "$((dblksz / 24))" + __populate_create_dir "${SCRATCH_MNT}/S_IFDIR.FMT_BLOCK" "$((dblksz / 32))" # - HTREE echo "+ htree dir" @@ -369,7 +369,7 @@ _scratch_ext4_populate() { # Attribute formats # LOCAL echo "+ local attr" - __populate_create_attr "${SCRATCH_MNT}/ATTR.FMT_LOCAL" 1 + __populate_create_attr "${SCRATCH_MNT}/ATTR.FMT_LOCAL" 0 # BLOCK echo "+ block attr"