common/populate: fix S_IFDIR.FMT_BLOCK and ATTR.FMT_LOCAL for ext4 encryption
authorTheodore Ts'o <tytso@mit.edu>
Tue, 12 Dec 2017 05:19:37 +0000 (00:19 -0500)
committerEryu Guan <eguan@redhat.com>
Thu, 14 Dec 2017 04:39:57 +0000 (12:39 +0800)
commitc71205ec949f21850383c5398fb9693b4bfbc8a9
tree52294d05a0a12f78241c20b0274a912e6150e9a1
parentbe341e36fd02cc73cb8360c7a61d406eb00cc48d
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 <tytso@mit.edu>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/populate