On Mon, Sep 15, 2025 at 4:40 PM Eric Biggers <ebigg...@kernel.org> wrote: > > On Mon, Sep 15, 2025 at 12:04:51PM +0200, Jan Prusakowski wrote: > > common/encrypt: Do not run _verify_ciphertext_for_encryption_policy on > > compressed FS > > A better title would be something like > "common/encrypt: Explicitly set the test file to uncompressed".
Agreed, will fix that in v3. > > @@ -790,6 +790,13 @@ _do_verify_ciphertext_for_encryption_policy() > > _set_encpolicy $dir $keyspec $set_encpolicy_args -f $policy_flags > > for src in $tmp.testfile_*; do > > dst=$dir/${src##*.} > > + # To make sure the test file is not compressed we create an > > empty one > > + # and disable compression first (F2FS won't allow resetting > > the > > + # compression flag if the file has data already in it). > > + touch $dst > > + if lsattr $dst | grep -qE ".+c.+ $dst" ; then > > + chattr -c $dst > > + fi > > cp $src $dst > > inode=$(stat -c %i $dst) > > blocklist=$(_get_ciphertext_block_list $dst) > > Is adding 'm' (FS_NOCOMP_FL) needed too? If not, why does it exist? In my setup files created have FS_COMPR_FL set from the start. Just clearing FS_COMPR_FL appears to help as now all the tests using _verify_ciphertext_for_encryption_policy pass when I run them on f2fs with "-o compress_extension=*". Do you think we should add 'm' (FS_NOCOMP_FL) as well just in case some other FS behaves differently? Do you have any ideas on what other FS I should check? > Also, have you verified that the tests that use this function still pass > on both ext4 and f2fs? Yes, there are no regressions on ext4 and f2fs. I checked generic/369, generic/548, generic/549, generic/550, generic/582, generic/583, generic/584, generic/592, generic/602, generic/693 and generic/739. All now pass except generic/369 which is skipped due to no support for hardware-wrapped inline encryption keys). Kind regards, Jan _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel