* Re: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
2021-10-20 18:43 ` [PATCH 2/2] scsi: target: iblock: Report " Konstantin Shelekhin
@ 2021-10-22 5:27 ` kernel test robot
2021-11-08 9:59 ` kernel test robot
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-10-22 5:27 UTC (permalink / raw)
To: Konstantin Shelekhin, Martin Petersen, Mike Christie,
target-devel
Cc: kbuild-all, linux-scsi, linux, Konstantin Shelekhin,
Dmitry Bogdanov
[-- Attachment #1: Type: text/plain, Size: 3463 bytes --]
Hi Konstantin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.15-rc6 next-20211021]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-s001-20211021 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/15d4d8f9601b04ee21f8f6042481828c4c34f6b7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
git checkout 15d4d8f9601b04ee21f8f6042481828c4c34f6b7
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:329:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted blk_status_t [usertype] status @@ got int @@
drivers/target/target_core_iblock.c:329:57: sparse: expected restricted blk_status_t [usertype] status
drivers/target/target_core_iblock.c:329:57: sparse: got int
>> drivers/target/target_core_iblock.c:351:61: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int new @@ got restricted blk_status_t [usertype] bi_status @@
drivers/target/target_core_iblock.c:351:61: sparse: expected int new
drivers/target/target_core_iblock.c:351:61: sparse: got restricted blk_status_t [usertype] bi_status
vim +329 drivers/target/target_core_iblock.c
319
320 static void iblock_complete_cmd(struct se_cmd *cmd)
321 {
322 struct iblock_req *ibr = cmd->priv;
323 u8 status;
324 sense_reason_t reason;
325
326 if (!refcount_dec_and_test(&ibr->pending))
327 return;
328
> 329 reason = iblock_blk_status_to_reason(atomic_read(&ibr->status));
330
331 if (reason != TCM_NO_SENSE)
332 status = SAM_STAT_CHECK_CONDITION;
333 else
334 status = SAM_STAT_GOOD;
335
336 target_complete_cmd_with_sense(cmd, status, reason);
337 kfree(ibr);
338 }
339
340 static void iblock_bio_done(struct bio *bio)
341 {
342 struct se_cmd *cmd = bio->bi_private;
343 struct iblock_req *ibr = cmd->priv;
344
345 if (bio->bi_status) {
346 pr_err("bio error: %p, err: %d\n", bio, bio->bi_status);
347 /*
348 * Set the error status of the iblock request to the error
349 * status of the first failed bio.
350 */
> 351 atomic_cmpxchg(&ibr->status, BLK_STS_OK, bio->bi_status);
352 smp_mb__after_atomic();
353 }
354
355 bio_put(bio);
356
357 iblock_complete_cmd(cmd);
358 }
359
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33974 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
2021-10-20 18:43 ` [PATCH 2/2] scsi: target: iblock: Report " Konstantin Shelekhin
2021-10-22 5:27 ` kernel test robot
@ 2021-11-08 9:59 ` kernel test robot
2021-11-23 13:29 ` kernel test robot
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-11-08 9:59 UTC (permalink / raw)
To: Konstantin Shelekhin, Martin Petersen, Mike Christie,
target-devel
Cc: kbuild-all, linux-scsi, linux, Konstantin Shelekhin,
Dmitry Bogdanov
[-- Attachment #1: Type: text/plain, Size: 3459 bytes --]
Hi Konstantin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.15 next-20211108]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-s001-20211021 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/15d4d8f9601b04ee21f8f6042481828c4c34f6b7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
git checkout 15d4d8f9601b04ee21f8f6042481828c4c34f6b7
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:329:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted blk_status_t [usertype] status @@ got int @@
drivers/target/target_core_iblock.c:329:57: sparse: expected restricted blk_status_t [usertype] status
drivers/target/target_core_iblock.c:329:57: sparse: got int
>> drivers/target/target_core_iblock.c:351:61: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int new @@ got restricted blk_status_t [usertype] bi_status @@
drivers/target/target_core_iblock.c:351:61: sparse: expected int new
drivers/target/target_core_iblock.c:351:61: sparse: got restricted blk_status_t [usertype] bi_status
vim +329 drivers/target/target_core_iblock.c
319
320 static void iblock_complete_cmd(struct se_cmd *cmd)
321 {
322 struct iblock_req *ibr = cmd->priv;
323 u8 status;
324 sense_reason_t reason;
325
326 if (!refcount_dec_and_test(&ibr->pending))
327 return;
328
> 329 reason = iblock_blk_status_to_reason(atomic_read(&ibr->status));
330
331 if (reason != TCM_NO_SENSE)
332 status = SAM_STAT_CHECK_CONDITION;
333 else
334 status = SAM_STAT_GOOD;
335
336 target_complete_cmd_with_sense(cmd, status, reason);
337 kfree(ibr);
338 }
339
340 static void iblock_bio_done(struct bio *bio)
341 {
342 struct se_cmd *cmd = bio->bi_private;
343 struct iblock_req *ibr = cmd->priv;
344
345 if (bio->bi_status) {
346 pr_err("bio error: %p, err: %d\n", bio, bio->bi_status);
347 /*
348 * Set the error status of the iblock request to the error
349 * status of the first failed bio.
350 */
> 351 atomic_cmpxchg(&ibr->status, BLK_STS_OK, bio->bi_status);
352 smp_mb__after_atomic();
353 }
354
355 bio_put(bio);
356
357 iblock_complete_cmd(cmd);
358 }
359
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33972 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
2021-10-20 18:43 ` [PATCH 2/2] scsi: target: iblock: Report " Konstantin Shelekhin
2021-10-22 5:27 ` kernel test robot
2021-11-08 9:59 ` kernel test robot
@ 2021-11-23 13:29 ` kernel test robot
2021-11-25 2:36 ` kernel test robot
2021-11-25 7:26 ` kernel test robot
4 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-11-23 13:29 UTC (permalink / raw)
To: Konstantin Shelekhin, Martin Petersen, Mike Christie,
target-devel
Cc: kbuild-all, linux-scsi, linux, Konstantin Shelekhin,
Dmitry Bogdanov
Hi Konstantin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.16-rc2 next-20211123]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-s001-20211021 (https://download.01.org/0day-ci/archive/20211123/202111232117.VwHDjjtU-lkp@intel.com/config.gz)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/15d4d8f9601b04ee21f8f6042481828c4c34f6b7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
git checkout 15d4d8f9601b04ee21f8f6042481828c4c34f6b7
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:329:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted blk_status_t [usertype] status @@ got int @@
drivers/target/target_core_iblock.c:329:57: sparse: expected restricted blk_status_t [usertype] status
drivers/target/target_core_iblock.c:329:57: sparse: got int
>> drivers/target/target_core_iblock.c:351:61: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int new @@ got restricted blk_status_t [usertype] bi_status @@
drivers/target/target_core_iblock.c:351:61: sparse: expected int new
drivers/target/target_core_iblock.c:351:61: sparse: got restricted blk_status_t [usertype] bi_status
vim +329 drivers/target/target_core_iblock.c
319
320 static void iblock_complete_cmd(struct se_cmd *cmd)
321 {
322 struct iblock_req *ibr = cmd->priv;
323 u8 status;
324 sense_reason_t reason;
325
326 if (!refcount_dec_and_test(&ibr->pending))
327 return;
328
> 329 reason = iblock_blk_status_to_reason(atomic_read(&ibr->status));
330
331 if (reason != TCM_NO_SENSE)
332 status = SAM_STAT_CHECK_CONDITION;
333 else
334 status = SAM_STAT_GOOD;
335
336 target_complete_cmd_with_sense(cmd, status, reason);
337 kfree(ibr);
338 }
339
340 static void iblock_bio_done(struct bio *bio)
341 {
342 struct se_cmd *cmd = bio->bi_private;
343 struct iblock_req *ibr = cmd->priv;
344
345 if (bio->bi_status) {
346 pr_err("bio error: %p, err: %d\n", bio, bio->bi_status);
347 /*
348 * Set the error status of the iblock request to the error
349 * status of the first failed bio.
350 */
> 351 atomic_cmpxchg(&ibr->status, BLK_STS_OK, bio->bi_status);
352 smp_mb__after_atomic();
353 }
354
355 bio_put(bio);
356
357 iblock_complete_cmd(cmd);
358 }
359
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
2021-10-20 18:43 ` [PATCH 2/2] scsi: target: iblock: Report " Konstantin Shelekhin
` (2 preceding siblings ...)
2021-11-23 13:29 ` kernel test robot
@ 2021-11-25 2:36 ` kernel test robot
2021-11-25 7:26 ` kernel test robot
4 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-11-25 2:36 UTC (permalink / raw)
To: Konstantin Shelekhin, Martin Petersen, Mike Christie,
target-devel
Cc: kbuild-all, linux-scsi, linux, Konstantin Shelekhin,
Dmitry Bogdanov
Hi Konstantin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.16-rc2 next-20211124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-s001-20211021 (https://download.01.org/0day-ci/archive/20211125/202111251031.jac0fCTW-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/15d4d8f9601b04ee21f8f6042481828c4c34f6b7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
git checkout 15d4d8f9601b04ee21f8f6042481828c4c34f6b7
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:329:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted blk_status_t [usertype] status @@ got int @@
drivers/target/target_core_iblock.c:329:57: sparse: expected restricted blk_status_t [usertype] status
drivers/target/target_core_iblock.c:329:57: sparse: got int
>> drivers/target/target_core_iblock.c:351:61: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int new @@ got restricted blk_status_t [usertype] bi_status @@
drivers/target/target_core_iblock.c:351:61: sparse: expected int new
drivers/target/target_core_iblock.c:351:61: sparse: got restricted blk_status_t [usertype] bi_status
vim +329 drivers/target/target_core_iblock.c
319
320 static void iblock_complete_cmd(struct se_cmd *cmd)
321 {
322 struct iblock_req *ibr = cmd->priv;
323 u8 status;
324 sense_reason_t reason;
325
326 if (!refcount_dec_and_test(&ibr->pending))
327 return;
328
> 329 reason = iblock_blk_status_to_reason(atomic_read(&ibr->status));
330
331 if (reason != TCM_NO_SENSE)
332 status = SAM_STAT_CHECK_CONDITION;
333 else
334 status = SAM_STAT_GOOD;
335
336 target_complete_cmd_with_sense(cmd, status, reason);
337 kfree(ibr);
338 }
339
340 static void iblock_bio_done(struct bio *bio)
341 {
342 struct se_cmd *cmd = bio->bi_private;
343 struct iblock_req *ibr = cmd->priv;
344
345 if (bio->bi_status) {
346 pr_err("bio error: %p, err: %d\n", bio, bio->bi_status);
347 /*
348 * Set the error status of the iblock request to the error
349 * status of the first failed bio.
350 */
> 351 atomic_cmpxchg(&ibr->status, BLK_STS_OK, bio->bi_status);
352 smp_mb__after_atomic();
353 }
354
355 bio_put(bio);
356
357 iblock_complete_cmd(cmd);
358 }
359
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
2021-10-20 18:43 ` [PATCH 2/2] scsi: target: iblock: Report " Konstantin Shelekhin
` (3 preceding siblings ...)
2021-11-25 2:36 ` kernel test robot
@ 2021-11-25 7:26 ` kernel test robot
4 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-11-25 7:26 UTC (permalink / raw)
To: Konstantin Shelekhin, Martin Petersen, Mike Christie,
target-devel
Cc: kbuild-all, linux-scsi, linux, Konstantin Shelekhin,
Dmitry Bogdanov
Hi Konstantin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.16-rc2 next-20211125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-s001-20211021 (https://download.01.org/0day-ci/archive/20211125/202111251517.Xys8GZym-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/15d4d8f9601b04ee21f8f6042481828c4c34f6b7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
git checkout 15d4d8f9601b04ee21f8f6042481828c4c34f6b7
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:329:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted blk_status_t [usertype] status @@ got int @@
drivers/target/target_core_iblock.c:329:57: sparse: expected restricted blk_status_t [usertype] status
drivers/target/target_core_iblock.c:329:57: sparse: got int
>> drivers/target/target_core_iblock.c:351:61: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int new @@ got restricted blk_status_t [usertype] bi_status @@
drivers/target/target_core_iblock.c:351:61: sparse: expected int new
drivers/target/target_core_iblock.c:351:61: sparse: got restricted blk_status_t [usertype] bi_status
vim +329 drivers/target/target_core_iblock.c
319
320 static void iblock_complete_cmd(struct se_cmd *cmd)
321 {
322 struct iblock_req *ibr = cmd->priv;
323 u8 status;
324 sense_reason_t reason;
325
326 if (!refcount_dec_and_test(&ibr->pending))
327 return;
328
> 329 reason = iblock_blk_status_to_reason(atomic_read(&ibr->status));
330
331 if (reason != TCM_NO_SENSE)
332 status = SAM_STAT_CHECK_CONDITION;
333 else
334 status = SAM_STAT_GOOD;
335
336 target_complete_cmd_with_sense(cmd, status, reason);
337 kfree(ibr);
338 }
339
340 static void iblock_bio_done(struct bio *bio)
341 {
342 struct se_cmd *cmd = bio->bi_private;
343 struct iblock_req *ibr = cmd->priv;
344
345 if (bio->bi_status) {
346 pr_err("bio error: %p, err: %d\n", bio, bio->bi_status);
347 /*
348 * Set the error status of the iblock request to the error
349 * status of the first failed bio.
350 */
> 351 atomic_cmpxchg(&ibr->status, BLK_STS_OK, bio->bi_status);
352 smp_mb__after_atomic();
353 }
354
355 bio_put(bio);
356
357 iblock_complete_cmd(cmd);
358 }
359
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 11+ messages in thread