Skip to content

Commit 6d50eb4

Browse files
Mikulas PatockaMike Snitzer
authored andcommitted
dm integrity: reduce vmalloc space footprint on 32-bit architectures
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: [email protected] Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 81ca2db commit 6d50eb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/dm-integrity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
#define DEFAULT_BUFFER_SECTORS 128
3535
#define DEFAULT_JOURNAL_WATERMARK 50
3636
#define DEFAULT_SYNC_MSEC 10000
37-
#define DEFAULT_MAX_JOURNAL_SECTORS 131072
37+
#define DEFAULT_MAX_JOURNAL_SECTORS (IS_ENABLED(CONFIG_64BIT) ? 131072 : 8192)
3838
#define MIN_LOG2_INTERLEAVE_SECTORS 3
3939
#define MAX_LOG2_INTERLEAVE_SECTORS 31
4040
#define METADATA_WORKQUEUE_MAX_ACTIVE 16
41-
#define RECALC_SECTORS 32768
41+
#define RECALC_SECTORS (IS_ENABLED(CONFIG_64BIT) ? 32768 : 2048)
4242
#define RECALC_WRITE_SUPER 16
4343
#define BITMAP_BLOCK_SIZE 4096 /* don't change it */
4444
#define BITMAP_FLUSH_INTERVAL (10 * HZ)

0 commit comments

Comments
 (0)