From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hch-block:blkdev.h-includes 7/8] drivers/md/dm-table.c:1100:11: error: implicit declaration of function 'blk_get_integrity'
Date: Sat, 04 Sep 2021 22:52:16 +0800 [thread overview]
Message-ID: <202109042200.yUxMTSes-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 27800 bytes --]
tree: git://git.infradead.org/users/hch/block.git blkdev.h-includes
head: c404937ee66601b9936ecbe31d7f24a396ead2c2
commit: 4cff104f02339e4b1f8f65fe2dff8f6c07c1784b [7/8] block: move integrity handling out of <linux/blkdev.h>
config: mips-randconfig-r031-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block blkdev.h-includes
git checkout 4cff104f02339e4b1f8f65fe2dff8f6c07c1784b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/md/dm-table.c:1100:11: error: implicit declaration of function 'blk_get_integrity' [-Werror,-Wimplicit-function-declaration]
return !!blk_get_integrity(disk);
^
>> drivers/md/dm-table.c:1125:5: error: implicit declaration of function 'blk_integrity_compare' [-Werror,-Wimplicit-function-declaration]
blk_integrity_compare(prev_disk, template_disk) < 0)
^
>> drivers/md/dm-table.c:1170:3: error: implicit declaration of function 'blk_integrity_register' [-Werror,-Wimplicit-function-declaration]
blk_integrity_register(dm_disk(md),
^
drivers/md/dm-table.c:1171:12: error: implicit declaration of function 'blk_get_integrity' [-Werror,-Wimplicit-function-declaration]
blk_get_integrity(template_disk));
^
drivers/md/dm-table.c:1179:6: error: implicit declaration of function 'blk_integrity_compare' [-Werror,-Wimplicit-function-declaration]
if (blk_integrity_compare(dm_disk(md), template_disk) < 0) {
^
drivers/md/dm-table.c:1755:7: error: implicit declaration of function 'blk_integrity_compare' [-Werror,-Wimplicit-function-declaration]
blk_integrity_compare(dm_disk(t->md), template_disk) >= 0)
^
>> drivers/md/dm-table.c:1762:3: error: implicit declaration of function 'blk_integrity_unregister' [-Werror,-Wimplicit-function-declaration]
blk_integrity_unregister(dm_disk(t->md));
^
drivers/md/dm-table.c:1762:3: note: did you mean 'blkcg_policy_unregister'?
include/linux/blk-cgroup.h:190:6: note: 'blkcg_policy_unregister' declared here
void blkcg_policy_unregister(struct blkcg_policy *pol);
^
7 errors generated.
--
>> drivers/md/dm-crypt.c:1164:29: error: implicit declaration of function 'blk_get_integrity' [-Werror,-Wimplicit-function-declaration]
struct blk_integrity *bi = blk_get_integrity(cc->dev->bdev->bd_disk);
^
>> drivers/md/dm-crypt.c:1164:24: warning: incompatible integer to pointer conversion initializing 'struct blk_integrity *' with an expression of type 'int' [-Wint-conversion]
struct blk_integrity *bi = blk_get_integrity(cc->dev->bdev->bd_disk);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/md/dm-crypt.c:1168:35: error: incomplete definition of type 'struct blk_integrity_profile'
if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
>> drivers/md/dm-crypt.c:1168:35: error: incomplete definition of type 'struct blk_integrity_profile'
if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
>> drivers/md/dm-crypt.c:1168:35: error: incomplete definition of type 'struct blk_integrity_profile'
if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
1 warning and 4 errors generated.
--
>> drivers/scsi/sd_dif.c:54:15: error: use of undeclared identifier 'BLK_INTEGRITY_IP_CHECKSUM'
bi.flags |= BLK_INTEGRITY_IP_CHECKSUM;
^
>> drivers/scsi/sd_dif.c:63:47: error: incomplete definition of type 'struct blk_integrity_profile'
"Enabling DIX %s protection\n", bi.profile->name);
~~~~~~~~~~^
drivers/scsi/sd.h:139:38: note: expanded from macro 'sd_printk'
(sdsk)->disk->disk_name, fmt, ##a) : \
^
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
>> drivers/scsi/sd_dif.c:63:47: error: incomplete definition of type 'struct blk_integrity_profile'
"Enabling DIX %s protection\n", bi.profile->name);
~~~~~~~~~~^
drivers/scsi/sd.h:140:51: note: expanded from macro 'sd_printk'
sdev_printk(prefix, (sdsk)->device, fmt, ##a)
^
include/scsi/scsi_device.h:269:43: note: expanded from macro 'sdev_printk'
sdev_prefix_printk(l, sdev, NULL, fmt, ##a)
^
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
>> drivers/scsi/sd_dif.c:66:15: error: use of undeclared identifier 'BLK_INTEGRITY_DEVICE_CAPABLE'
bi.flags |= BLK_INTEGRITY_DEVICE_CAPABLE;
^
>> drivers/scsi/sd_dif.c:81:2: error: implicit declaration of function 'blk_integrity_register' [-Werror,-Wimplicit-function-declaration]
blk_integrity_register(disk, &bi);
^
5 errors generated.
--
>> drivers/target/target_core_iblock.c:138:7: error: implicit declaration of function 'bdev_get_integrity' [-Werror,-Wimplicit-function-declaration]
bi = bdev_get_integrity(bd);
^
>> drivers/target/target_core_iblock.c:138:5: warning: incompatible integer to pointer conversion assigning to 'struct blk_integrity *' from 'int' [-Wint-conversion]
bi = bdev_get_integrity(bd);
^ ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/target/target_core_iblock.c:142:26: error: incomplete definition of type 'struct blk_integrity_profile'
if (!strcmp(bi->profile->name, "T10-DIF-TYPE3-IP") ||
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:143:26: error: incomplete definition of type 'struct blk_integrity_profile'
!strcmp(bi->profile->name, "T10-DIF-TYPE1-IP")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
>> drivers/target/target_core_iblock.c:142:26: error: incomplete definition of type 'struct blk_integrity_profile'
if (!strcmp(bi->profile->name, "T10-DIF-TYPE3-IP") ||
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:143:26: error: incomplete definition of type 'struct blk_integrity_profile'
!strcmp(bi->profile->name, "T10-DIF-TYPE1-IP")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
>> drivers/target/target_core_iblock.c:142:26: error: incomplete definition of type 'struct blk_integrity_profile'
if (!strcmp(bi->profile->name, "T10-DIF-TYPE3-IP") ||
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:143:26: error: incomplete definition of type 'struct blk_integrity_profile'
!strcmp(bi->profile->name, "T10-DIF-TYPE1-IP")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:145:38: error: incomplete definition of type 'struct blk_integrity_profile'
" supported\n", bi->profile->name);
~~~~~~~~~~~^
include/linux/printk.h:489:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:150:26: error: incomplete definition of type 'struct blk_integrity_profile'
if (!strcmp(bi->profile->name, "T10-DIF-TYPE3-CRC")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:150:26: error: incomplete definition of type 'struct blk_integrity_profile'
if (!strcmp(bi->profile->name, "T10-DIF-TYPE3-CRC")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:150:26: error: incomplete definition of type 'struct blk_integrity_profile'
if (!strcmp(bi->profile->name, "T10-DIF-TYPE3-CRC")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:152:33: error: incomplete definition of type 'struct blk_integrity_profile'
} else if (!strcmp(bi->profile->name, "T10-DIF-TYPE1-CRC")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/genhd.h:120:15: note: forward declaration of 'struct blk_integrity_profile'
const struct blk_integrity_profile *profile;
^
drivers/target/target_core_iblock.c:152:33: error: incomplete definition of type 'struct blk_integrity_profile'
} else if (!strcmp(bi->profile->name, "T10-DIF-TYPE1-CRC")) {
~~~~~~~~~~~^
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
vim +/blk_get_integrity +1100 drivers/md/dm-table.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1097
25520d55cdb6ee Martin K. Petersen 2015-10-21 1098 static bool integrity_profile_exists(struct gendisk *disk)
25520d55cdb6ee Martin K. Petersen 2015-10-21 1099 {
25520d55cdb6ee Martin K. Petersen 2015-10-21 @1100 return !!blk_get_integrity(disk);
25520d55cdb6ee Martin K. Petersen 2015-10-21 1101 }
25520d55cdb6ee Martin K. Petersen 2015-10-21 1102
a63a5cf84dac7a Mike Snitzer 2011-04-01 1103 /*
a63a5cf84dac7a Mike Snitzer 2011-04-01 1104 * Get a disk whose integrity profile reflects the table's profile.
a63a5cf84dac7a Mike Snitzer 2011-04-01 1105 * Returns NULL if integrity support was inconsistent or unavailable.
a63a5cf84dac7a Mike Snitzer 2011-04-01 1106 */
25520d55cdb6ee Martin K. Petersen 2015-10-21 1107 static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t)
a63a5cf84dac7a Mike Snitzer 2011-04-01 1108 {
a63a5cf84dac7a Mike Snitzer 2011-04-01 1109 struct list_head *devices = dm_table_get_devices(t);
a63a5cf84dac7a Mike Snitzer 2011-04-01 1110 struct dm_dev_internal *dd = NULL;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1111 struct gendisk *prev_disk = NULL, *template_disk = NULL;
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1112 unsigned i;
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1113
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1114 for (i = 0; i < dm_table_get_num_targets(t); i++) {
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1115 struct dm_target *ti = dm_table_get_target(t, i);
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1116 if (!dm_target_passes_integrity(ti->type))
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1117 goto no_integrity;
e2460f2a4bc740 Mikulas Patocka 2017-04-18 1118 }
a63a5cf84dac7a Mike Snitzer 2011-04-01 1119
a63a5cf84dac7a Mike Snitzer 2011-04-01 1120 list_for_each_entry(dd, devices, list) {
86f1152b117a40 Benjamin Marzinski 2014-08-13 1121 template_disk = dd->dm_dev->bdev->bd_disk;
25520d55cdb6ee Martin K. Petersen 2015-10-21 1122 if (!integrity_profile_exists(template_disk))
a63a5cf84dac7a Mike Snitzer 2011-04-01 1123 goto no_integrity;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1124 else if (prev_disk &&
a63a5cf84dac7a Mike Snitzer 2011-04-01 @1125 blk_integrity_compare(prev_disk, template_disk) < 0)
a63a5cf84dac7a Mike Snitzer 2011-04-01 1126 goto no_integrity;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1127 prev_disk = template_disk;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1128 }
a63a5cf84dac7a Mike Snitzer 2011-04-01 1129
a63a5cf84dac7a Mike Snitzer 2011-04-01 1130 return template_disk;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1131
a63a5cf84dac7a Mike Snitzer 2011-04-01 1132 no_integrity:
a63a5cf84dac7a Mike Snitzer 2011-04-01 1133 if (prev_disk)
a63a5cf84dac7a Mike Snitzer 2011-04-01 1134 DMWARN("%s: integrity not set: %s and %s profile mismatch",
a63a5cf84dac7a Mike Snitzer 2011-04-01 1135 dm_device_name(t->md),
a63a5cf84dac7a Mike Snitzer 2011-04-01 1136 prev_disk->disk_name,
a63a5cf84dac7a Mike Snitzer 2011-04-01 1137 template_disk->disk_name);
a63a5cf84dac7a Mike Snitzer 2011-04-01 1138 return NULL;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1139 }
a63a5cf84dac7a Mike Snitzer 2011-04-01 1140
26803b9f06d365 Will Drewry 2010-08-12 1141 /*
25520d55cdb6ee Martin K. Petersen 2015-10-21 1142 * Register the mapped device for blk_integrity support if the
25520d55cdb6ee Martin K. Petersen 2015-10-21 1143 * underlying devices have an integrity profile. But all devices may
25520d55cdb6ee Martin K. Petersen 2015-10-21 1144 * not have matching profiles (checking all devices isn't reliable
a63a5cf84dac7a Mike Snitzer 2011-04-01 1145 * during table load because this table may use other DM device(s) which
25520d55cdb6ee Martin K. Petersen 2015-10-21 1146 * must be resumed before they will have an initialized integity
25520d55cdb6ee Martin K. Petersen 2015-10-21 1147 * profile). Consequently, stacked DM devices force a 2 stage integrity
25520d55cdb6ee Martin K. Petersen 2015-10-21 1148 * profile validation: First pass during table load, final pass during
25520d55cdb6ee Martin K. Petersen 2015-10-21 1149 * resume.
26803b9f06d365 Will Drewry 2010-08-12 1150 */
25520d55cdb6ee Martin K. Petersen 2015-10-21 1151 static int dm_table_register_integrity(struct dm_table *t)
26803b9f06d365 Will Drewry 2010-08-12 1152 {
25520d55cdb6ee Martin K. Petersen 2015-10-21 1153 struct mapped_device *md = t->md;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1154 struct gendisk *template_disk = NULL;
26803b9f06d365 Will Drewry 2010-08-12 1155
9b4b5a797cf8a8 Milan Broz 2017-01-04 1156 /* If target handles integrity itself do not register it here. */
9b4b5a797cf8a8 Milan Broz 2017-01-04 1157 if (t->integrity_added)
9b4b5a797cf8a8 Milan Broz 2017-01-04 1158 return 0;
9b4b5a797cf8a8 Milan Broz 2017-01-04 1159
25520d55cdb6ee Martin K. Petersen 2015-10-21 1160 template_disk = dm_table_get_integrity_disk(t);
a63a5cf84dac7a Mike Snitzer 2011-04-01 1161 if (!template_disk)
a63a5cf84dac7a Mike Snitzer 2011-04-01 1162 return 0;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1163
25520d55cdb6ee Martin K. Petersen 2015-10-21 1164 if (!integrity_profile_exists(dm_disk(md))) {
e83068a5faafb8 Mike Snitzer 2016-05-24 1165 t->integrity_supported = true;
25520d55cdb6ee Martin K. Petersen 2015-10-21 1166 /*
25520d55cdb6ee Martin K. Petersen 2015-10-21 1167 * Register integrity profile during table load; we can do
25520d55cdb6ee Martin K. Petersen 2015-10-21 1168 * this because the final profile must match during resume.
25520d55cdb6ee Martin K. Petersen 2015-10-21 1169 */
25520d55cdb6ee Martin K. Petersen 2015-10-21 @1170 blk_integrity_register(dm_disk(md),
25520d55cdb6ee Martin K. Petersen 2015-10-21 1171 blk_get_integrity(template_disk));
25520d55cdb6ee Martin K. Petersen 2015-10-21 1172 return 0;
a91a2785b20086 Martin K. Petersen 2011-03-17 1173 }
26803b9f06d365 Will Drewry 2010-08-12 1174
a63a5cf84dac7a Mike Snitzer 2011-04-01 1175 /*
25520d55cdb6ee Martin K. Petersen 2015-10-21 1176 * If DM device already has an initialized integrity
a63a5cf84dac7a Mike Snitzer 2011-04-01 1177 * profile the new profile should not conflict.
a63a5cf84dac7a Mike Snitzer 2011-04-01 1178 */
25520d55cdb6ee Martin K. Petersen 2015-10-21 1179 if (blk_integrity_compare(dm_disk(md), template_disk) < 0) {
a63a5cf84dac7a Mike Snitzer 2011-04-01 1180 DMWARN("%s: conflict with existing integrity profile: "
a63a5cf84dac7a Mike Snitzer 2011-04-01 1181 "%s profile mismatch",
a63a5cf84dac7a Mike Snitzer 2011-04-01 1182 dm_device_name(t->md),
a63a5cf84dac7a Mike Snitzer 2011-04-01 1183 template_disk->disk_name);
a63a5cf84dac7a Mike Snitzer 2011-04-01 1184 return 1;
a63a5cf84dac7a Mike Snitzer 2011-04-01 1185 }
a63a5cf84dac7a Mike Snitzer 2011-04-01 1186
25520d55cdb6ee Martin K. Petersen 2015-10-21 1187 /* Preserve existing integrity profile */
e83068a5faafb8 Mike Snitzer 2016-05-24 1188 t->integrity_supported = true;
26803b9f06d365 Will Drewry 2010-08-12 1189 return 0;
26803b9f06d365 Will Drewry 2010-08-12 1190 }
26803b9f06d365 Will Drewry 2010-08-12 1191
:::::: The code at line 1100 was first introduced by commit
:::::: 25520d55cdb6ee289abc68f553d364d22478ff54 block: Inline blk_integrity in struct gendisk
:::::: TO: Martin K. Petersen <martin.petersen@oracle.com>
:::::: CC: Jens Axboe <axboe@fb.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27784 bytes --]
reply other threads:[~2021-09-04 14:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109042200.yUxMTSes-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.