- dm-vdo: add missing spin_lock_init
- dm-integrity: divide-by-zero fix - dm-integrity: do not report unused entries in the table line -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRnH8MwLyZDhyYfesYTAyx9YGnhbQUCZ7xnCRQcbXBhdG9ja2FA cmVkaGF0LmNvbQAKCRATAyx9YGnhbVueAP47A+AczQa868MpFc2p8w5AmqqF6jyW s303VCS9wUCtBwD/TkFcYz5AtIRvIIdZiwtOKALPekjeLeOZaOSnrdJVkw0= =x00V -----END PGP SIGNATURE----- Merge tag 'for-6.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mikulas Patocka: - dm-vdo: add missing spin_lock_init - dm-integrity: divide-by-zero fix - dm-integrity: do not report unused entries in the table line * tag 'for-6.14/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm vdo: add missing spin_lock_init dm-integrity: Do not emit journal configuration in DM table for Inline mode dm-integrity: Avoid divide by zero in table status in Inline mode
This commit is contained in:
commit
2c24478e5f
2 changed files with 15 additions and 11 deletions
drivers/md
|
@ -3790,20 +3790,18 @@ static void dm_integrity_status(struct dm_target *ti, status_type_t type,
|
|||
break;
|
||||
|
||||
case STATUSTYPE_TABLE: {
|
||||
__u64 watermark_percentage = (__u64)(ic->journal_entries - ic->free_sectors_threshold) * 100;
|
||||
|
||||
watermark_percentage += ic->journal_entries / 2;
|
||||
do_div(watermark_percentage, ic->journal_entries);
|
||||
arg_count = 3;
|
||||
arg_count = 1; /* buffer_sectors */
|
||||
arg_count += !!ic->meta_dev;
|
||||
arg_count += ic->sectors_per_block != 1;
|
||||
arg_count += !!(ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING));
|
||||
arg_count += ic->reset_recalculate_flag;
|
||||
arg_count += ic->discard;
|
||||
arg_count += ic->mode == 'J';
|
||||
arg_count += ic->mode == 'J';
|
||||
arg_count += ic->mode == 'B';
|
||||
arg_count += ic->mode == 'B';
|
||||
arg_count += ic->mode != 'I'; /* interleave_sectors */
|
||||
arg_count += ic->mode == 'J'; /* journal_sectors */
|
||||
arg_count += ic->mode == 'J'; /* journal_watermark */
|
||||
arg_count += ic->mode == 'J'; /* commit_time */
|
||||
arg_count += ic->mode == 'B'; /* sectors_per_bit */
|
||||
arg_count += ic->mode == 'B'; /* bitmap_flush_interval */
|
||||
arg_count += !!ic->internal_hash_alg.alg_string;
|
||||
arg_count += !!ic->journal_crypt_alg.alg_string;
|
||||
arg_count += !!ic->journal_mac_alg.alg_string;
|
||||
|
@ -3822,10 +3820,15 @@ static void dm_integrity_status(struct dm_target *ti, status_type_t type,
|
|||
DMEMIT(" reset_recalculate");
|
||||
if (ic->discard)
|
||||
DMEMIT(" allow_discards");
|
||||
DMEMIT(" journal_sectors:%u", ic->initial_sectors - SB_SECTORS);
|
||||
DMEMIT(" interleave_sectors:%u", 1U << ic->sb->log2_interleave_sectors);
|
||||
if (ic->mode != 'I')
|
||||
DMEMIT(" interleave_sectors:%u", 1U << ic->sb->log2_interleave_sectors);
|
||||
DMEMIT(" buffer_sectors:%u", 1U << ic->log2_buffer_sectors);
|
||||
if (ic->mode == 'J') {
|
||||
__u64 watermark_percentage = (__u64)(ic->journal_entries - ic->free_sectors_threshold) * 100;
|
||||
|
||||
watermark_percentage += ic->journal_entries / 2;
|
||||
do_div(watermark_percentage, ic->journal_entries);
|
||||
DMEMIT(" journal_sectors:%u", ic->initial_sectors - SB_SECTORS);
|
||||
DMEMIT(" journal_watermark:%u", (unsigned int)watermark_percentage);
|
||||
DMEMIT(" commit_time:%u", ic->autocommit_msec);
|
||||
}
|
||||
|
|
|
@ -2178,6 +2178,7 @@ static int initialize_index(struct vdo *vdo, struct hash_zones *zones)
|
|||
|
||||
vdo_set_dedupe_index_timeout_interval(vdo_dedupe_index_timeout_interval);
|
||||
vdo_set_dedupe_index_min_timer_interval(vdo_dedupe_index_min_timer_interval);
|
||||
spin_lock_init(&zones->lock);
|
||||
|
||||
/*
|
||||
* Since we will save up the timeouts that would have been reported but were ratelimited,
|
||||
|
|
Loading…
Add table
Reference in a new issue