mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-28 09:22:08 +00:00
dm: prefer '"%s...", __func__'
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
This commit is contained in:
parent
aa07f9d806
commit
1c13188669
@ -203,15 +203,15 @@ static int sb_check(struct dm_block_validator *v,
|
|||||||
__le32 csum_le;
|
__le32 csum_le;
|
||||||
|
|
||||||
if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) {
|
if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) {
|
||||||
DMERR("sb_check failed: blocknr %llu: wanted %llu",
|
DMERR("%s failed: blocknr %llu: wanted %llu",
|
||||||
le64_to_cpu(disk_super->blocknr),
|
__func__, le64_to_cpu(disk_super->blocknr),
|
||||||
(unsigned long long)dm_block_location(b));
|
(unsigned long long)dm_block_location(b));
|
||||||
return -ENOTBLK;
|
return -ENOTBLK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (le64_to_cpu(disk_super->magic) != CACHE_SUPERBLOCK_MAGIC) {
|
if (le64_to_cpu(disk_super->magic) != CACHE_SUPERBLOCK_MAGIC) {
|
||||||
DMERR("sb_check failed: magic %llu: wanted %llu",
|
DMERR("%s failed: magic %llu: wanted %llu",
|
||||||
le64_to_cpu(disk_super->magic),
|
__func__, le64_to_cpu(disk_super->magic),
|
||||||
(unsigned long long)CACHE_SUPERBLOCK_MAGIC);
|
(unsigned long long)CACHE_SUPERBLOCK_MAGIC);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
@ -220,8 +220,8 @@ static int sb_check(struct dm_block_validator *v,
|
|||||||
sb_block_size - sizeof(__le32),
|
sb_block_size - sizeof(__le32),
|
||||||
SUPERBLOCK_CSUM_XOR));
|
SUPERBLOCK_CSUM_XOR));
|
||||||
if (csum_le != disk_super->csum) {
|
if (csum_le != disk_super->csum) {
|
||||||
DMERR("sb_check failed: csum %u: wanted %u",
|
DMERR("%s failed: csum %u: wanted %u",
|
||||||
le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
|
__func__, le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,15 +229,15 @@ static int sb_check(struct dm_block_validator *v,
|
|||||||
__le32 csum_le;
|
__le32 csum_le;
|
||||||
|
|
||||||
if (dm_block_location(b) != le64_to_cpu(disk->blocknr)) {
|
if (dm_block_location(b) != le64_to_cpu(disk->blocknr)) {
|
||||||
DMERR("sb_check failed: blocknr %llu: wanted %llu",
|
DMERR("%s failed: blocknr %llu: wanted %llu",
|
||||||
le64_to_cpu(disk->blocknr),
|
__func__, le64_to_cpu(disk->blocknr),
|
||||||
(unsigned long long)dm_block_location(b));
|
(unsigned long long)dm_block_location(b));
|
||||||
return -ENOTBLK;
|
return -ENOTBLK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (le64_to_cpu(disk->magic) != SUPERBLOCK_MAGIC) {
|
if (le64_to_cpu(disk->magic) != SUPERBLOCK_MAGIC) {
|
||||||
DMERR("sb_check failed: magic %llu: wanted %llu",
|
DMERR("%s failed: magic %llu: wanted %llu",
|
||||||
le64_to_cpu(disk->magic),
|
__func__, le64_to_cpu(disk->magic),
|
||||||
(unsigned long long) SUPERBLOCK_MAGIC);
|
(unsigned long long) SUPERBLOCK_MAGIC);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
@ -246,8 +246,8 @@ static int sb_check(struct dm_block_validator *v,
|
|||||||
sb_block_size - sizeof(__le32),
|
sb_block_size - sizeof(__le32),
|
||||||
SUPERBLOCK_CSUM_XOR));
|
SUPERBLOCK_CSUM_XOR));
|
||||||
if (csum_le != disk->csum) {
|
if (csum_le != disk->csum) {
|
||||||
DMERR("sb_check failed: csum %u: wanted %u",
|
DMERR("%s failed: csum %u: wanted %u",
|
||||||
le32_to_cpu(csum_le), le32_to_cpu(disk->csum));
|
__func__, le32_to_cpu(csum_le), le32_to_cpu(disk->csum));
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3093,7 +3093,7 @@ static void replay_journal(struct dm_integrity_c *ic)
|
|||||||
|
|
||||||
static void dm_integrity_enter_synchronous_mode(struct dm_integrity_c *ic)
|
static void dm_integrity_enter_synchronous_mode(struct dm_integrity_c *ic)
|
||||||
{
|
{
|
||||||
DEBUG_print("dm_integrity_enter_synchronous_mode\n");
|
DEBUG_print("%s\n", __func__);
|
||||||
|
|
||||||
if (ic->mode == 'B') {
|
if (ic->mode == 'B') {
|
||||||
ic->bitmap_flush_interval = msecs_to_jiffies(10) + 1;
|
ic->bitmap_flush_interval = msecs_to_jiffies(10) + 1;
|
||||||
@ -3109,7 +3109,7 @@ static int dm_integrity_reboot(struct notifier_block *n, unsigned long code, voi
|
|||||||
{
|
{
|
||||||
struct dm_integrity_c *ic = container_of(n, struct dm_integrity_c, reboot_notifier);
|
struct dm_integrity_c *ic = container_of(n, struct dm_integrity_c, reboot_notifier);
|
||||||
|
|
||||||
DEBUG_print("dm_integrity_reboot\n");
|
DEBUG_print("%s\n", __func__);
|
||||||
|
|
||||||
dm_integrity_enter_synchronous_mode(ic);
|
dm_integrity_enter_synchronous_mode(ic);
|
||||||
|
|
||||||
|
@ -1409,7 +1409,7 @@ static int populate_table(struct dm_table *table,
|
|||||||
char *target_params;
|
char *target_params;
|
||||||
|
|
||||||
if (!param->target_count) {
|
if (!param->target_count) {
|
||||||
DMERR("populate_table: no targets specified");
|
DMERR("%s: no targets specified", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,15 +739,15 @@ static void process_queued_bios(struct work_struct *work)
|
|||||||
/*
|
/*
|
||||||
* If we run out of usable paths, should we queue I/O or error it?
|
* If we run out of usable paths, should we queue I/O or error it?
|
||||||
*/
|
*/
|
||||||
static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
|
static int queue_if_no_path(struct multipath *m, bool f_queue_if_no_path,
|
||||||
bool save_old_value, const char *caller)
|
bool save_old_value, const char *caller)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
bool queue_if_no_path_bit, saved_queue_if_no_path_bit;
|
bool queue_if_no_path_bit, saved_queue_if_no_path_bit;
|
||||||
const char *dm_dev_name = dm_table_device_name(m->ti->table);
|
const char *dm_dev_name = dm_table_device_name(m->ti->table);
|
||||||
|
|
||||||
DMDEBUG("%s: %s caller=%s queue_if_no_path=%d save_old_value=%d",
|
DMDEBUG("%s: %s caller=%s f_queue_if_no_path=%d save_old_value=%d",
|
||||||
dm_dev_name, __func__, caller, queue_if_no_path, save_old_value);
|
dm_dev_name, __func__, caller, f_queue_if_no_path, save_old_value);
|
||||||
|
|
||||||
spin_lock_irqsave(&m->lock, flags);
|
spin_lock_irqsave(&m->lock, flags);
|
||||||
|
|
||||||
@ -760,11 +760,11 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
|
|||||||
dm_dev_name);
|
dm_dev_name);
|
||||||
} else
|
} else
|
||||||
assign_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags, queue_if_no_path_bit);
|
assign_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags, queue_if_no_path_bit);
|
||||||
} else if (!queue_if_no_path && saved_queue_if_no_path_bit) {
|
} else if (!f_queue_if_no_path && saved_queue_if_no_path_bit) {
|
||||||
/* due to "fail_if_no_path" message, need to honor it. */
|
/* due to "fail_if_no_path" message, need to honor it. */
|
||||||
clear_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags);
|
clear_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &m->flags);
|
||||||
}
|
}
|
||||||
assign_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags, queue_if_no_path);
|
assign_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags, f_queue_if_no_path);
|
||||||
|
|
||||||
DMDEBUG("%s: after %s changes; QIFNP = %d; SQIFNP = %d; DNFS = %d",
|
DMDEBUG("%s: after %s changes; QIFNP = %d; SQIFNP = %d; DNFS = %d",
|
||||||
dm_dev_name, __func__,
|
dm_dev_name, __func__,
|
||||||
@ -774,7 +774,7 @@ static int queue_if_no_path(struct multipath *m, bool queue_if_no_path,
|
|||||||
|
|
||||||
spin_unlock_irqrestore(&m->lock, flags);
|
spin_unlock_irqrestore(&m->lock, flags);
|
||||||
|
|
||||||
if (!queue_if_no_path) {
|
if (!f_queue_if_no_path) {
|
||||||
dm_table_run_md_queue_async(m->ti->table);
|
dm_table_run_md_queue_async(m->ti->table);
|
||||||
process_queued_io_list(m);
|
process_queued_io_list(m);
|
||||||
}
|
}
|
||||||
@ -1468,7 +1468,7 @@ static int switch_pg_num(struct multipath *m, const char *pgstr)
|
|||||||
|
|
||||||
if (!pgstr || (sscanf(pgstr, "%u%c", &pgnum, &dummy) != 1) || !pgnum ||
|
if (!pgstr || (sscanf(pgstr, "%u%c", &pgnum, &dummy) != 1) || !pgnum ||
|
||||||
!m->nr_priority_groups || (pgnum > m->nr_priority_groups)) {
|
!m->nr_priority_groups || (pgnum > m->nr_priority_groups)) {
|
||||||
DMWARN("invalid PG number supplied to switch_pg_num");
|
DMWARN("invalid PG number supplied to %s", __func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,15 +269,15 @@ static int sb_check(struct dm_block_validator *v,
|
|||||||
__le32 csum_le;
|
__le32 csum_le;
|
||||||
|
|
||||||
if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) {
|
if (dm_block_location(b) != le64_to_cpu(disk_super->blocknr)) {
|
||||||
DMERR("sb_check failed: blocknr %llu: wanted %llu",
|
DMERR("%s failed: blocknr %llu: wanted %llu",
|
||||||
le64_to_cpu(disk_super->blocknr),
|
__func__, le64_to_cpu(disk_super->blocknr),
|
||||||
(unsigned long long)dm_block_location(b));
|
(unsigned long long)dm_block_location(b));
|
||||||
return -ENOTBLK;
|
return -ENOTBLK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (le64_to_cpu(disk_super->magic) != THIN_SUPERBLOCK_MAGIC) {
|
if (le64_to_cpu(disk_super->magic) != THIN_SUPERBLOCK_MAGIC) {
|
||||||
DMERR("sb_check failed: magic %llu: wanted %llu",
|
DMERR("%s failed: magic %llu: wanted %llu",
|
||||||
le64_to_cpu(disk_super->magic),
|
__func__, le64_to_cpu(disk_super->magic),
|
||||||
(unsigned long long)THIN_SUPERBLOCK_MAGIC);
|
(unsigned long long)THIN_SUPERBLOCK_MAGIC);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
@ -286,8 +286,8 @@ static int sb_check(struct dm_block_validator *v,
|
|||||||
block_size - sizeof(__le32),
|
block_size - sizeof(__le32),
|
||||||
SUPERBLOCK_CSUM_XOR));
|
SUPERBLOCK_CSUM_XOR));
|
||||||
if (csum_le != disk_super->csum) {
|
if (csum_le != disk_super->csum) {
|
||||||
DMERR("sb_check failed: csum %u: wanted %u",
|
DMERR("%s failed: csum %u: wanted %u",
|
||||||
le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
|
__func__, le32_to_cpu(csum_le), le32_to_cpu(disk_super->csum));
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ static int verity_hash_final(struct dm_verity *v, struct ahash_request *req,
|
|||||||
r = verity_hash_update(v, req, v->salt, v->salt_size, wait);
|
r = verity_hash_update(v, req, v->salt, v->salt_size, wait);
|
||||||
|
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
DMERR("verity_hash_final failed updating salt: %d", r);
|
DMERR("%s failed updating salt: %d", __func__, r);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ static int verity_for_io_block(struct dm_verity *v, struct dm_verity_io *io,
|
|||||||
r = crypto_wait_req(crypto_ahash_update(req), wait);
|
r = crypto_wait_req(crypto_ahash_update(req), wait);
|
||||||
|
|
||||||
if (unlikely(r < 0)) {
|
if (unlikely(r < 0)) {
|
||||||
DMERR("verity_for_io_block crypto op failed: %d", r);
|
DMERR("%s crypto op failed: %d", __func__, r);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ static int array_block_check(struct dm_block_validator *v,
|
|||||||
__le32 csum_disk;
|
__le32 csum_disk;
|
||||||
|
|
||||||
if (dm_block_location(b) != le64_to_cpu(bh_le->blocknr)) {
|
if (dm_block_location(b) != le64_to_cpu(bh_le->blocknr)) {
|
||||||
DMERR_LIMIT("array_block_check failed: blocknr %llu != wanted %llu",
|
DMERR_LIMIT("%s failed: blocknr %llu != wanted %llu", __func__,
|
||||||
(unsigned long long) le64_to_cpu(bh_le->blocknr),
|
(unsigned long long) le64_to_cpu(bh_le->blocknr),
|
||||||
(unsigned long long) dm_block_location(b));
|
(unsigned long long) dm_block_location(b));
|
||||||
return -ENOTBLK;
|
return -ENOTBLK;
|
||||||
@ -68,7 +68,7 @@ static int array_block_check(struct dm_block_validator *v,
|
|||||||
size_of_block - sizeof(__le32),
|
size_of_block - sizeof(__le32),
|
||||||
CSUM_XOR));
|
CSUM_XOR));
|
||||||
if (csum_disk != bh_le->csum) {
|
if (csum_disk != bh_le->csum) {
|
||||||
DMERR_LIMIT("array_block_check failed: csum %u != wanted %u",
|
DMERR_LIMIT("%s failed: csum %u != wanted %u", __func__,
|
||||||
(unsigned int) le32_to_cpu(csum_disk),
|
(unsigned int) le32_to_cpu(csum_disk),
|
||||||
(unsigned int) le32_to_cpu(bh_le->csum));
|
(unsigned int) le32_to_cpu(bh_le->csum));
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
|
@ -40,7 +40,7 @@ static int node_check(struct dm_block_validator *v,
|
|||||||
uint32_t flags, nr_entries, max_entries;
|
uint32_t flags, nr_entries, max_entries;
|
||||||
|
|
||||||
if (dm_block_location(b) != le64_to_cpu(h->blocknr)) {
|
if (dm_block_location(b) != le64_to_cpu(h->blocknr)) {
|
||||||
DMERR_LIMIT("node_check failed: blocknr %llu != wanted %llu",
|
DMERR_LIMIT("%s failed: blocknr %llu != wanted %llu", __func__,
|
||||||
le64_to_cpu(h->blocknr), dm_block_location(b));
|
le64_to_cpu(h->blocknr), dm_block_location(b));
|
||||||
return -ENOTBLK;
|
return -ENOTBLK;
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ static int node_check(struct dm_block_validator *v,
|
|||||||
block_size - sizeof(__le32),
|
block_size - sizeof(__le32),
|
||||||
BTREE_CSUM_XOR));
|
BTREE_CSUM_XOR));
|
||||||
if (csum_disk != h->csum) {
|
if (csum_disk != h->csum) {
|
||||||
DMERR_LIMIT("node_check failed: csum %u != wanted %u",
|
DMERR_LIMIT("%s failed: csum %u != wanted %u", __func__,
|
||||||
le32_to_cpu(csum_disk), le32_to_cpu(h->csum));
|
le32_to_cpu(csum_disk), le32_to_cpu(h->csum));
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
@ -60,12 +60,12 @@ static int node_check(struct dm_block_validator *v,
|
|||||||
|
|
||||||
if (sizeof(struct node_header) +
|
if (sizeof(struct node_header) +
|
||||||
(sizeof(__le64) + value_size) * max_entries > block_size) {
|
(sizeof(__le64) + value_size) * max_entries > block_size) {
|
||||||
DMERR_LIMIT("node_check failed: max_entries too large");
|
DMERR_LIMIT("%s failed: max_entries too large", __func__);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nr_entries > max_entries) {
|
if (nr_entries > max_entries) {
|
||||||
DMERR_LIMIT("node_check failed: too many entries");
|
DMERR_LIMIT("%s failed: too many entries", __func__);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ static int node_check(struct dm_block_validator *v,
|
|||||||
*/
|
*/
|
||||||
flags = le32_to_cpu(h->flags);
|
flags = le32_to_cpu(h->flags);
|
||||||
if (!(flags & INTERNAL_NODE) && !(flags & LEAF_NODE)) {
|
if (!(flags & INTERNAL_NODE) && !(flags & LEAF_NODE)) {
|
||||||
DMERR_LIMIT("node_check failed: node is neither INTERNAL or LEAF");
|
DMERR_LIMIT("%s failed: node is neither INTERNAL or LEAF", __func__);
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ static int index_check(struct dm_block_validator *v,
|
|||||||
__le32 csum_disk;
|
__le32 csum_disk;
|
||||||
|
|
||||||
if (dm_block_location(b) != le64_to_cpu(mi_le->blocknr)) {
|
if (dm_block_location(b) != le64_to_cpu(mi_le->blocknr)) {
|
||||||
DMERR_LIMIT("index_check failed: blocknr %llu != wanted %llu",
|
DMERR_LIMIT("%s failed: blocknr %llu != wanted %llu", __func__,
|
||||||
le64_to_cpu(mi_le->blocknr), dm_block_location(b));
|
le64_to_cpu(mi_le->blocknr), dm_block_location(b));
|
||||||
return -ENOTBLK;
|
return -ENOTBLK;
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ static int index_check(struct dm_block_validator *v,
|
|||||||
block_size - sizeof(__le32),
|
block_size - sizeof(__le32),
|
||||||
INDEX_CSUM_XOR));
|
INDEX_CSUM_XOR));
|
||||||
if (csum_disk != mi_le->csum) {
|
if (csum_disk != mi_le->csum) {
|
||||||
DMERR_LIMIT("index_check failed: csum %u != wanted %u",
|
DMERR_LIMIT("i%s failed: csum %u != wanted %u", __func__,
|
||||||
le32_to_cpu(csum_disk), le32_to_cpu(mi_le->csum));
|
le32_to_cpu(csum_disk), le32_to_cpu(mi_le->csum));
|
||||||
return -EILSEQ;
|
return -EILSEQ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user