Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm: avoid split of quoted strings where possible

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Heinz Mauelshagen and committed by
Mike Snitzer
2e84fecf 2d0f25cb

+37 -67
+1 -2
drivers/md/dm-crypt.c
··· 733 733 } 734 734 735 735 if (crypto_skcipher_blocksize(any_tfm(cc)) != cc->iv_size) { 736 - ti->error = "Block size of EBOIV cipher does " 737 - "not match IV size of block cipher"; 736 + ti->error = "Block size of EBOIV cipher does not match IV size of block cipher"; 738 737 return -EINVAL; 739 738 } 740 739
+2 -4
drivers/md/dm-ioctl.c
··· 449 449 hc = __get_name_cell(new); 450 450 451 451 if (hc) { 452 - DMERR("Unable to change %s on mapped device %s to one that " 453 - "already exists: %s", 452 + DMERR("Unable to change %s on mapped device %s to one that already exists: %s", 454 453 change_uuid ? "uuid" : "name", 455 454 param->name, new); 456 455 dm_put(hc->md); ··· 1837 1838 1838 1839 if ((DM_VERSION_MAJOR != version[0]) || 1839 1840 (DM_VERSION_MINOR < version[1])) { 1840 - DMERR("ioctl interface mismatch: " 1841 - "kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)", 1841 + DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)", 1842 1842 DM_VERSION_MAJOR, DM_VERSION_MINOR, 1843 1843 DM_VERSION_PATCHLEVEL, 1844 1844 version[0], version[1], version[2], cmd);
+2 -3
drivers/md/dm-log-userspace-transfer.c
··· 109 109 if (pkg->error != -EAGAIN) 110 110 *(pkg->data_size) = 0; 111 111 } else if (tfr->data_size > *(pkg->data_size)) { 112 - DMERR("Insufficient space to receive package [%u] " 113 - "(%u vs %zu)", tfr->request_type, 114 - tfr->data_size, *(pkg->data_size)); 112 + DMERR("Insufficient space to receive package [%u] (%u vs %zu)", 113 + tfr->request_type, tfr->data_size, *(pkg->data_size)); 115 114 116 115 *(pkg->data_size) = 0; 117 116 pkg->error = -ENOSPC;
+1 -2
drivers/md/dm-log.c
··· 389 389 else if (!strcmp(argv[1], "nosync")) 390 390 sync = NOSYNC; 391 391 else { 392 - DMWARN("unrecognised sync argument to " 393 - "dirty region log: %s", argv[1]); 392 + DMWARN("unrecognised sync argument to dirty region log: %s", argv[1]); 394 393 return -EINVAL; 395 394 } 396 395 }
+3 -4
drivers/md/dm-raid1.c
··· 239 239 * Better to issue requests to same failing device 240 240 * than to risk returning corrupt data. 241 241 */ 242 - DMERR("Primary mirror (%s) failed while out-of-sync: " 243 - "Reads may fail.", m->dev->name); 242 + DMERR("Primary mirror (%s) failed while out-of-sync: Reads may fail.", 243 + m->dev->name); 244 244 goto out; 245 245 } 246 246 ··· 526 526 fail_mirror(m, DM_RAID1_READ_ERROR); 527 527 528 528 if (likely(default_ok(m)) || mirror_available(m->ms, bio)) { 529 - DMWARN_LIMIT("Read failure on mirror device %s. " 530 - "Trying alternative device.", 529 + DMWARN_LIMIT("Read failure on mirror device %s. Trying alternative device.", 531 530 m->dev->name); 532 531 queue_bio(m->ms, bio, bio_data_dir(bio)); 533 532 return;
+2 -4
drivers/md/dm-snap-persistent.c
··· 358 358 return 0; 359 359 360 360 if (chunk_size_supplied) 361 - DMWARN("chunk size %u in device metadata overrides " 362 - "table chunk size of %u.", 361 + DMWARN("chunk size %u in device metadata overrides table chunk size of %u.", 363 362 chunk_size, ps->store->chunk_size); 364 363 365 364 /* We had a bogus chunk_size. Fix stuff up. */ ··· 965 966 966 967 r = dm_exception_store_type_register(&_persistent_compat_type); 967 968 if (r) { 968 - DMERR("Unable to register old-style persistent exception " 969 - "store type"); 969 + DMERR("Unable to register old-style persistent exception store type"); 970 970 dm_exception_store_type_unregister(&_persistent_type); 971 971 return r; 972 972 }
+1 -2
drivers/md/dm-snap-transient.c
··· 143 143 144 144 r = dm_exception_store_type_register(&_transient_compat_type); 145 145 if (r) { 146 - DMWARN("Unable to register old-style transient " 147 - "exception store type"); 146 + DMWARN("Unable to register old-style transient exception store type"); 148 147 dm_exception_store_type_unregister(&_transient_type); 149 148 return r; 150 149 }
+7 -14
drivers/md/dm-snap.c
··· 495 495 if ((__find_snapshots_sharing_cow(snap, &snap_src, &snap_dest, 496 496 &snap_merge) == 2) || 497 497 snap_dest) { 498 - snap->ti->error = "Snapshot cow pairing for exception " 499 - "table handover failed"; 498 + snap->ti->error = "Snapshot cow pairing for exception table handover failed"; 500 499 return -EINVAL; 501 500 } 502 501 ··· 522 523 523 524 if (!snap_src->store->type->prepare_merge || 524 525 !snap_src->store->type->commit_merge) { 525 - snap->ti->error = "Snapshot exception store does not " 526 - "support snapshot-merge."; 526 + snap->ti->error = "Snapshot exception store does not support snapshot-merge."; 527 527 return -EINVAL; 528 528 } 529 529 ··· 941 943 942 944 e = dm_lookup_exception(&s->complete, old_chunk); 943 945 if (!e) { 944 - DMERR("Corruption detected: exception for block %llu is " 945 - "on disk but not in memory", 946 + DMERR("Corruption detected: exception for block %llu is on disk but not in memory", 946 947 (unsigned long long)old_chunk); 947 948 return -EINVAL; 948 949 } ··· 968 971 e->new_chunk++; 969 972 } else if (old_chunk != e->old_chunk + 970 973 dm_consecutive_chunk_count(e)) { 971 - DMERR("Attempt to merge block %llu from the " 972 - "middle of a chunk range [%llu - %llu]", 974 + DMERR("Attempt to merge block %llu from the middle of a chunk range [%llu - %llu]", 973 975 (unsigned long long)old_chunk, 974 976 (unsigned long long)e->old_chunk, 975 977 (unsigned long long) ··· 1061 1065 &new_chunk); 1062 1066 if (linear_chunks <= 0) { 1063 1067 if (linear_chunks < 0) { 1064 - DMERR("Read error in exception store: " 1065 - "shutting down merge"); 1068 + DMERR("Read error in exception store: shutting down merge"); 1066 1069 down_write(&s->lock); 1067 1070 s->merge_failed = true; 1068 1071 up_write(&s->lock); ··· 2210 2215 if (snap_src && snap_dest) { 2211 2216 down_read(&snap_src->lock); 2212 2217 if (s == snap_src) { 2213 - DMERR("Unable to resume snapshot source until " 2214 - "handover completes."); 2218 + DMERR("Unable to resume snapshot source until handover completes."); 2215 2219 r = -EINVAL; 2216 2220 } else if (!dm_suspended(snap_src->ti)) { 2217 - DMERR("Unable to perform snapshot handover until " 2218 - "source is suspended."); 2221 + DMERR("Unable to perform snapshot handover until source is suspended."); 2219 2222 r = -EINVAL; 2220 2223 } 2221 2224 up_read(&snap_src->lock);
+4 -8
drivers/md/dm-stripe.c
··· 109 109 110 110 width = ti->len; 111 111 if (sector_div(width, stripes)) { 112 - ti->error = "Target length not divisible by " 113 - "number of stripes"; 112 + ti->error = "Target length not divisible by number of stripes"; 114 113 return -EINVAL; 115 114 } 116 115 117 116 tmp_len = width; 118 117 if (sector_div(tmp_len, chunk_size)) { 119 - ti->error = "Target length not divisible by " 120 - "chunk size"; 118 + ti->error = "Target length not divisible by chunk size"; 121 119 return -EINVAL; 122 120 } 123 121 ··· 123 125 * Do we have enough arguments for that many stripes ? 124 126 */ 125 127 if (argc != (2 + 2 * stripes)) { 126 - ti->error = "Not enough destinations " 127 - "specified"; 128 + ti->error = "Not enough destinations specified"; 128 129 return -EINVAL; 129 130 } 130 131 131 132 sc = kmalloc(struct_size(sc, stripe, stripes), GFP_KERNEL); 132 133 if (!sc) { 133 - ti->error = "Memory allocation for striped context " 134 - "failed"; 134 + ti->error = "Memory allocation for striped context failed"; 135 135 return -ENOMEM; 136 136 } 137 137
+6 -12
drivers/md/dm-table.c
··· 235 235 return 0; 236 236 237 237 if ((start >= dev_size) || (start + len > dev_size)) { 238 - DMERR("%s: %pg too small for target: " 239 - "start=%llu, len=%llu, dev_size=%llu", 238 + DMERR("%s: %pg too small for target: start=%llu, len=%llu, dev_size=%llu", 240 239 dm_device_name(ti->table->md), bdev, 241 240 (unsigned long long)start, 242 241 (unsigned long long)len, ··· 280 281 return 0; 281 282 282 283 if (start & (logical_block_size_sectors - 1)) { 283 - DMERR("%s: start=%llu not aligned to h/w " 284 - "logical block size %u of %pg", 284 + DMERR("%s: start=%llu not aligned to h/w logical block size %u of %pg", 285 285 dm_device_name(ti->table->md), 286 286 (unsigned long long)start, 287 287 limits->logical_block_size, bdev); ··· 288 290 } 289 291 290 292 if (len & (logical_block_size_sectors - 1)) { 291 - DMERR("%s: len=%llu not aligned to h/w " 292 - "logical block size %u of %pg", 293 + DMERR("%s: len=%llu not aligned to h/w logical block size %u of %pg", 293 294 dm_device_name(ti->table->md), 294 295 (unsigned long long)len, 295 296 limits->logical_block_size, bdev); ··· 881 884 bio_based = 1; 882 885 883 886 if (bio_based && request_based) { 884 - DMERR("Inconsistent table: different target types" 885 - " can't be mixed up"); 887 + DMERR("Inconsistent table: different target types can't be mixed up"); 886 888 return -EINVAL; 887 889 } 888 890 } ··· 1184 1188 * profile the new profile should not conflict. 1185 1189 */ 1186 1190 if (blk_integrity_compare(dm_disk(md), template_disk) < 0) { 1187 - DMERR("%s: conflict with existing integrity profile: " 1188 - "%s profile mismatch", 1191 + DMERR("%s: conflict with existing integrity profile: %s profile mismatch", 1189 1192 dm_device_name(t->md), 1190 1193 template_disk->disk_name); 1191 1194 return 1; ··· 1706 1711 * for the table. 1707 1712 */ 1708 1713 if (blk_stack_limits(limits, &ti_limits, 0) < 0) 1709 - DMWARN("%s: adding target device " 1710 - "(start sect %llu len %llu) " 1714 + DMWARN("%s: adding target device (start sect %llu len %llu) " 1711 1715 "caused an alignment inconsistency", 1712 1716 dm_device_name(t->md), 1713 1717 (unsigned long long) ti->begin,
+4 -4
drivers/md/dm-thin-metadata.c
··· 269 269 __le32 csum_le; 270 270 271 271 if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) { 272 - DMERR("sb_check failed: blocknr %llu: " 273 - "wanted %llu", le64_to_cpu(disk_super->blocknr), 272 + DMERR("sb_check failed: blocknr %llu: wanted %llu", 273 + le64_to_cpu(disk_super->blocknr), 274 274 (unsigned long long)dm_block_location(b)); 275 275 return -ENOTBLK; 276 276 } 277 277 278 278 if (le64_to_cpu(disk_super->magic) != THIN_SUPERBLOCK_MAGIC) { 279 - DMERR("sb_check failed: magic %llu: " 280 - "wanted %llu", le64_to_cpu(disk_super->magic), 279 + DMERR("sb_check failed: magic %llu: wanted %llu", 280 + le64_to_cpu(disk_super->magic), 281 281 (unsigned long long)THIN_SUPERBLOCK_MAGIC); 282 282 return -EILSEQ; 283 283 }
+4 -8
drivers/md/dm-zoned-metadata.c
··· 1014 1014 1015 1015 sb_block = le64_to_cpu(sb->sb_block); 1016 1016 if (sb_block != (u64)dsb->zone->id << zmd->zone_nr_blocks_shift) { 1017 - dmz_dev_err(dev, "Invalid superblock position " 1018 - "(is %llu expected %llu)", 1019 - sb_block, 1020 - (u64)dsb->zone->id << zmd->zone_nr_blocks_shift); 1017 + dmz_dev_err(dev, "Invalid superblock position (is %llu expected %llu)", 1018 + sb_block, (u64)dsb->zone->id << zmd->zone_nr_blocks_shift); 1021 1019 return -EINVAL; 1022 1020 } 1023 1021 if (zmd->sb_version > 1) { ··· 1028 1030 } else if (uuid_is_null(&zmd->uuid)) { 1029 1031 uuid_copy(&zmd->uuid, &sb_uuid); 1030 1032 } else if (!uuid_equal(&zmd->uuid, &sb_uuid)) { 1031 - dmz_dev_err(dev, "mismatching DM-Zoned uuid, " 1032 - "is %pUl expected %pUl", 1033 + dmz_dev_err(dev, "mismatching DM-Zoned uuid, is %pUl expected %pUl", 1033 1034 &sb_uuid, &zmd->uuid); 1034 1035 return -ENXIO; 1035 1036 } 1036 1037 if (!strlen(zmd->label)) 1037 1038 memcpy(zmd->label, sb->dmz_label, BDEVNAME_SIZE); 1038 1039 else if (memcmp(zmd->label, sb->dmz_label, BDEVNAME_SIZE)) { 1039 - dmz_dev_err(dev, "mismatching DM-Zoned label, " 1040 - "is %s expected %s", 1040 + dmz_dev_err(dev, "mismatching DM-Zoned label, is %s expected %s", 1041 1041 sb->dmz_label, zmd->label); 1042 1042 return -ENXIO; 1043 1043 }