+ zram-add-pr_fmt-to-backend-files.patch added to mm-new branch
Andrew Morton <[email protected]> Tue, 04 Aug 2026 12:59:39 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The patch titled
Subject: zram: add pr_fmt to backend files
has been added to the -mm mm-new branch. Its filename is
zram-add-pr_fmt-to-backend-files.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-add-pr_fmt-to-backend-files.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Haoqin Huang <[email protected]>
Subject: zram: add pr_fmt to backend files
Date: Tue, 4 Aug 2026 17:38:39 +0800
Add pr_fmt to each backend so that pr_err() messages are auto-prefixed
with the algorithm name. While at it, tweak the deflate winbits pr_err to
avoid a duplicated "deflate" prefix.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Haoqin Huang <[email protected]>
Signed-off-by: Rongwei Wang <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Tested-by: Sergey Senozhatsky <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Nick Terrell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/block/zram/backend_842.c | 2 ++
drivers/block/zram/backend_deflate.c | 4 +++-
drivers/block/zram/backend_lz4.c | 4 ++++
drivers/block/zram/backend_lz4hc.c | 4 ++++
drivers/block/zram/backend_lzo.c | 2 ++
drivers/block/zram/backend_lzorle.c | 2 ++
drivers/block/zram/backend_zstd.c | 2 ++
7 files changed, 19 insertions(+), 1 deletion(-)
--- a/drivers/block/zram/backend_842.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_842.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
+#define pr_fmt(fmt) "842: " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sw842.h>
--- a/drivers/block/zram/backend_deflate.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_deflate.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
+#define pr_fmt(fmt) "deflate: " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
@@ -30,7 +32,7 @@ static int deflate_setup_params(struct z
s32 wb = params->deflate.winbits;
if ((wb < -15 || wb > -9) && (wb < 9 || wb > 15)) {
- pr_err("invalid deflate winbits: %d\n", wb);
+ pr_err("invalid winbits %d\n", wb);
return -EINVAL;
}
}
--- a/drivers/block/zram/backend_lz4.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_lz4.c
@@ -1,3 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#define pr_fmt(fmt) "lz4: " fmt
+
#include <linux/kernel.h>
#include <linux/lz4.h>
#include <linux/slab.h>
--- a/drivers/block/zram/backend_lz4hc.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_lz4hc.c
@@ -1,3 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#define pr_fmt(fmt) "lz4hc: " fmt
+
#include <linux/kernel.h>
#include <linux/lz4.h>
#include <linux/slab.h>
--- a/drivers/block/zram/backend_lzo.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_lzo.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
+#define pr_fmt(fmt) "lzo: " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/lzo.h>
--- a/drivers/block/zram/backend_lzorle.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_lzorle.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
+#define pr_fmt(fmt) "lzo-rle: " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/lzo.h>
--- a/drivers/block/zram/backend_zstd.c~zram-add-pr_fmt-to-backend-files
+++ a/drivers/block/zram/backend_zstd.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
+#define pr_fmt(fmt) "zstd: " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
_
Patches currently in -mm which might be from [email protected] are
zram-do-not-release-zstd-global-params-from-error-paths.patch
zram-reject-zero-size-dictionary.patch
zram-add-pr_fmt-to-backend-files.patch
zram-validate-parameters-in-each-backends-setup_params.patch
zram-reset-per-priority-params-when-changing-algorithm-before-init.patch