Patch "dm integrity: reduce vmalloc space footprint on 32-bit architectures" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dm integrity: reduce vmalloc space footprint on 32-bit architectures

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-integrity-reduce-vmalloc-space-footprint-on-32-bi.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 266a6fe275c55fed02aa8393a8964f85c76645af
Author: Mikulas Patocka <mpatocka@xxxxxxxxxx>
Date:   Mon Jun 26 16:44:34 2023 +0200

    dm integrity: reduce vmalloc space footprint on 32-bit architectures
    
    [ Upstream commit 6d50eb4725934fd22f5eeccb401000687c790fd0 ]
    
    It was reported that dm-integrity runs out of vmalloc space on 32-bit
    architectures. On x86, there is only 128MiB vmalloc space and dm-integrity
    consumes it quickly because it has a 64MiB journal and 8MiB recalculate
    buffer.
    
    Fix this by reducing the size of the journal to 4MiB and the size of
    the recalculate buffer to 1MiB, so that multiple dm-integrity devices
    can be created and activated on 32-bit architectures.
    
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
    Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index ea08eb4ed0d95..1667ac1406098 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -31,11 +31,11 @@
 #define DEFAULT_BUFFER_SECTORS		128
 #define DEFAULT_JOURNAL_WATERMARK	50
 #define DEFAULT_SYNC_MSEC		10000
-#define DEFAULT_MAX_JOURNAL_SECTORS	131072
+#define DEFAULT_MAX_JOURNAL_SECTORS	(IS_ENABLED(CONFIG_64BIT) ? 131072 : 8192)
 #define MIN_LOG2_INTERLEAVE_SECTORS	3
 #define MAX_LOG2_INTERLEAVE_SECTORS	31
 #define METADATA_WORKQUEUE_MAX_ACTIVE	16
-#define RECALC_SECTORS			32768
+#define RECALC_SECTORS			(IS_ENABLED(CONFIG_64BIT) ? 32768 : 2048)
 #define RECALC_WRITE_SUPER		16
 #define BITMAP_BLOCK_SIZE		4096	/* don't change it */
 #define BITMAP_FLUSH_INTERVAL		(10 * HZ)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux