.. | .. |
---|
31 | 31 | #define DEFAULT_BUFFER_SECTORS 128 |
---|
32 | 32 | #define DEFAULT_JOURNAL_WATERMARK 50 |
---|
33 | 33 | #define DEFAULT_SYNC_MSEC 10000 |
---|
34 | | -#define DEFAULT_MAX_JOURNAL_SECTORS 131072 |
---|
| 34 | +#define DEFAULT_MAX_JOURNAL_SECTORS (IS_ENABLED(CONFIG_64BIT) ? 131072 : 8192) |
---|
35 | 35 | #define MIN_LOG2_INTERLEAVE_SECTORS 3 |
---|
36 | 36 | #define MAX_LOG2_INTERLEAVE_SECTORS 31 |
---|
37 | 37 | #define METADATA_WORKQUEUE_MAX_ACTIVE 16 |
---|
38 | | -#define RECALC_SECTORS 8192 |
---|
| 38 | +#define RECALC_SECTORS (IS_ENABLED(CONFIG_64BIT) ? 32768 : 2048) |
---|
39 | 39 | #define RECALC_WRITE_SUPER 16 |
---|
40 | 40 | #define BITMAP_BLOCK_SIZE 4096 /* don't change it */ |
---|
41 | 41 | #define BITMAP_FLUSH_INTERVAL (10 * HZ) |
---|
.. | .. |
---|
4388 | 4388 | BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress)); |
---|
4389 | 4389 | BUG_ON(!list_empty(&ic->wait_list)); |
---|
4390 | 4390 | |
---|
| 4391 | + if (ic->mode == 'B') |
---|
| 4392 | + cancel_delayed_work_sync(&ic->bitmap_flush_work); |
---|
4391 | 4393 | if (ic->metadata_wq) |
---|
4392 | 4394 | destroy_workqueue(ic->metadata_wq); |
---|
4393 | 4395 | if (ic->wait_wq) |
---|
.. | .. |
---|
4479 | 4481 | } |
---|
4480 | 4482 | |
---|
4481 | 4483 | r = dm_register_target(&integrity_target); |
---|
4482 | | - |
---|
4483 | | - if (r < 0) |
---|
| 4484 | + if (r < 0) { |
---|
4484 | 4485 | DMERR("register failed %d", r); |
---|
| 4486 | + kmem_cache_destroy(journal_io_cache); |
---|
| 4487 | + return r; |
---|
| 4488 | + } |
---|
4485 | 4489 | |
---|
4486 | | - return r; |
---|
| 4490 | + return 0; |
---|
4487 | 4491 | } |
---|
4488 | 4492 | |
---|
4489 | 4493 | static void __exit dm_integrity_exit(void) |
---|