Re: [PATCH 2/7] dm: Simplify dm_table_determine_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/16/2016 06:54 AM, Mike Snitzer wrote:
On Tue, Nov 15 2016 at  6:33pm -0500,
Bart Van Assche <bart.vanassche@xxxxxxxxxxx> wrote:
+/*
+ * Returns true if all paths are blk-mq devices. Returns false if all paths
+ * are single queue block devices or if there are no paths.
+ */

This code isn't specific to multipath.  So "paths" is misplaced.
"devices" is more appropriate.  Not seeing the need for the comment to
be honest.  The function name is pretty descriptive.

 bool dm_table_all_blk_mq_devices(struct dm_table *t)
 {
 	return t->all_blk_mq;

Hello Mike,

After having added WARN_ON_ONCE(sq_count == 0 && mq_count == 0) close to the end of dm_table_determine_type() the following output appeared:

WARNING: CPU: 0 PID: 2458 at drivers/md/dm-table.c:966 dm_table_complete+0x60e/0x6b0 [dm_mod]
[ ... ]
Call Trace:
 [<ffffffff81329b45>] dump_stack+0x68/0x93
 [<ffffffff810650e6>] __warn+0xc6/0xe0
 [<ffffffff810651b8>] warn_slowpath_null+0x18/0x20
 [<ffffffffa0021c8e>] dm_table_complete+0x60e/0x6b0 [dm_mod]
 [<ffffffffa00245cd>] table_load+0x13d/0x330 [dm_mod]
 [<ffffffffa0024490>] ? retrieve_status+0x1b0/0x1b0 [dm_mod]
 [<ffffffffa0025145>] ctl_ioctl+0x1f5/0x520 [dm_mod]
 [<ffffffffa002547e>] dm_ctl_ioctl+0xe/0x20 [dm_mod]
 [<ffffffff811f26cf>] do_vfs_ioctl+0x8f/0x6b0
 [<ffffffff811ff41c>] ? __fget+0x10c/0x200
 [<ffffffff811ff310>] ? expand_files+0x2a0/0x2a0
 [<ffffffff811f2d2c>] SyS_ioctl+0x3c/0x70
 [<ffffffff8163f9aa>] entry_SYSCALL_64_fastpath+0x18/0xad

Is it intentional that dm_table_determine_type() can get called for a dm device with an empty table?

Thanks,

Bart.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux