From 49db2221a963f33be7f19de042549ac9fd5ce065 Mon Sep 17 00:00:00 2001 From: Libor Pechacek Date: May 11 2022 06:57:18 +0000 Subject: Revert "btrfs: props: change how empty value is interpreted" (bsc#1195224) --- diff --git a/patches.suse/revert-btrfs-props-change-how-empty-value-is-interpr.patch b/patches.suse/revert-btrfs-props-change-how-empty-value-is-interpr.patch new file mode 100644 index 0000000..d40ea45 --- /dev/null +++ b/patches.suse/revert-btrfs-props-change-how-empty-value-is-interpr.patch @@ -0,0 +1,52 @@ +From: Libor Pechacek +Date: Mon, 9 May 2022 14:08:44 +0200 +Subject: [PATCH] Revert "btrfs: props: change how empty value is interpreted" +Patch-mainline: never, the patch maintains compatibility in SLE +References: bsc#1195224 + +The change in compression parameter interpretation is an incompatible change +that was not requested in SLE. In the limited time left before release, revert +is the most straightforward resolution of the incompatibility. We may want to +adopt the change, along with btrfs-progs changes and proper documentation, in +SLE 15 SP5 or with the next kernel upgrade. + +This reverts commit 5548c8c6f55bf0097075b3720e14857e3272429f. + +Signed-off: Libor Pechacek +Acked-by: Qu Wenruo + +--- + fs/btrfs/props.c | 14 -------------- + 1 file changed, 14 deletions(-) + +--- a/fs/btrfs/props.c ++++ b/fs/btrfs/props.c +@@ -260,10 +260,6 @@ static int prop_compression_validate(con + if (btrfs_compress_is_valid_type(value, len)) + return 0; + +- if ((len == 2 && strncmp("no", value, 2) == 0) || +- (len == 4 && strncmp("none", value, 4) == 0)) +- return 0; +- + return -EINVAL; + } + +@@ -273,17 +269,7 @@ static int prop_compression_apply(struct + struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); + int type; + +- /* Reset to defaults */ + if (len == 0) { +- BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; +- BTRFS_I(inode)->flags &= ~BTRFS_INODE_NOCOMPRESS; +- BTRFS_I(inode)->prop_compress = BTRFS_COMPRESS_NONE; +- return 0; +- } +- +- /* Set NOCOMPRESS flag */ +- if ((len == 2 && strncmp("no", value, 2) == 0) || +- (len == 4 && strncmp("none", value, 4) == 0)) { + BTRFS_I(inode)->flags |= BTRFS_INODE_NOCOMPRESS; + BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS; + BTRFS_I(inode)->prop_compress = BTRFS_COMPRESS_NONE; diff --git a/series.conf b/series.conf index 20eb128..b5c1b61 100644 --- a/series.conf +++ b/series.conf @@ -8612,6 +8612,7 @@ patches.suse/btrfs-8447-serialize-subvolume-mounts-with-potentially-mi.patch patches.suse/btrfs-8888-add-allow_unsupported-module-parameter.patch patches.suse/btrfs-relocation-Work-around-dead-relocation-stage-l.patch + patches.suse/revert-btrfs-props-change-how-empty-value-is-interpr.patch # ext[2-4] patches.suse/ext4-dont-warn-when-enabling-DAX.patch