From: Theodore Ts'o Date: Tue, 12 Dec 2017 05:19:37 +0000 (-0500) Subject: common/populate: fix S_IFDIR.FMT_BLOCK and ATTR.FMT_LOCAL for ext4 encryption X-Git-Tag: v2022.05.01~1739 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c71205ec949f21850383c5398fb9693b4bfbc8a9;p=users%2Fhch%2Fxfstests-dev.git common/populate: fix S_IFDIR.FMT_BLOCK and ATTR.FMT_LOCAL for ext4 encryption 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/populate b/common/populate index b77c50810..07ea7e60a 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"