Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-28 Thread Paolo Bonzini

Il 28/05/2014 00:21, Nicholas A. Bellinger ha scritto:

On Mon, 2014-05-26 at 13:30 -0400, Martin K. Petersen wrote:

Nic == Nicholas A Bellinger n...@linux-iscsi.org writes:



What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if
!CONFIG_BLK_DEV_INTEGRITY?


Nic I figured it was slightly cleaner to enable BLK_DEV_INTEGRITY by
Nic default when referencing struct blk_integrity (following what
Nic IBLOCK does), than adding the equivalent #ifdef's..

Nic MKP, do you have a preference on this..?

Well, I guess how important the virtio stuff is in the embedded space?

In the block layer we have all these wrappers that allow things to Do
The Right Thing when the BLK_DEV_INTEGRITY is disabled. I'm not entirely
sure it worth the hassle to do the same for target and virtio. The
memory savings aren't that big to begin with.

And besides, the bip pointer field in struct bio is about to become
generic with my impending copy offload patches anyway,



In that case, I'll leave as is unless Paolo has an objection.


No, that's fine.

Paolo

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-27 Thread Nicholas A. Bellinger
On Mon, 2014-05-26 at 13:30 -0400, Martin K. Petersen wrote:
  Nic == Nicholas A Bellinger n...@linux-iscsi.org writes:
 
  What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if
  !CONFIG_BLK_DEV_INTEGRITY?
 
 Nic I figured it was slightly cleaner to enable BLK_DEV_INTEGRITY by
 Nic default when referencing struct blk_integrity (following what
 Nic IBLOCK does), than adding the equivalent #ifdef's..
 
 Nic MKP, do you have a preference on this..?
 
 Well, I guess how important the virtio stuff is in the embedded space?
 
 In the block layer we have all these wrappers that allow things to Do
 The Right Thing when the BLK_DEV_INTEGRITY is disabled. I'm not entirely
 sure it worth the hassle to do the same for target and virtio. The
 memory savings aren't that big to begin with.
 
 And besides, the bip pointer field in struct bio is about to become
 generic with my impending copy offload patches anyway,
 

In that case, I'll leave as is unless Paolo has an objection.

--nab

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-26 Thread Martin K. Petersen
 Nic == Nicholas A Bellinger n...@linux-iscsi.org writes:

 What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if
 !CONFIG_BLK_DEV_INTEGRITY?

Nic I figured it was slightly cleaner to enable BLK_DEV_INTEGRITY by
Nic default when referencing struct blk_integrity (following what
Nic IBLOCK does), than adding the equivalent #ifdef's..

Nic MKP, do you have a preference on this..?

Well, I guess how important the virtio stuff is in the embedded space?

In the block layer we have all these wrappers that allow things to Do
The Right Thing when the BLK_DEV_INTEGRITY is disabled. I'm not entirely
sure it worth the hassle to do the same for target and virtio. The
memory savings aren't that big to begin with.

And besides, the bip pointer field in struct bio is about to become
generic with my impending copy offload patches anyway,

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-23 Thread Paolo Bonzini

Il 22/05/2014 22:46, Nicholas A. Bellinger ha scritto:

Hi Fengguang,

On Thu, 2014-05-22 at 11:13 +0800, kbuild test robot wrote:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
for-next
head:   4baaa7d589e24bfe87dfd6c7a1229108be404a28
commit: 4baaa7d589e24bfe87dfd6c7a1229108be404a28 [20/20] virtio-scsi: Enable 
DIF/DIX modes in SCSI host LLD
config: x86_64-randconfig-x000 (attached as .config)

All error/warnings:

   drivers/scsi/virtio_scsi.c: In function 'virtio_scsi_init_hdr_pi':

drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete 
type

  cmd_pi-pi_bytesout = blk_rq_sectors(rq) * bi-tuple_size;
   ^

drivers/scsi/virtio_scsi.c:533:47: error: dereferencing pointer to incomplete 
type

  cmd_pi-pi_bytesin = blk_rq_sectors(rq) * bi-tuple_size;
  ^

vim +531 drivers/scsi/virtio_scsi.c

   525  if (!rq || !scsi_prot_sg_count(sc))
   526  return;
   527  
   528  bi = blk_get_integrity(rq-rq_disk);
   529  
   530  if (sc-sc_data_direction == DMA_TO_DEVICE)
  531   cmd_pi-pi_bytesout = blk_rq_sectors(rq) * 
bi-tuple_size;
   532  else if (sc-sc_data_direction == DMA_FROM_DEVICE)
  533   cmd_pi-pi_bytesin = blk_rq_sectors(rq) * 
bi-tuple_size;
   534  }
   535  
   536  static int virtscsi_queuecommand(struct virtio_scsi *vscsi,



Squashing the following into the original commit to enable blk-integrity
for virtio-scsi to address the randconfig build failure above.

Thanks!

--nab

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 02832d6..baca589 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1773,6 +1773,7 @@ config SCSI_BFA_FC
 config SCSI_VIRTIO
tristate virtio-scsi support
depends on VIRTIO
+   select BLK_DEV_INTEGRITY
help
   This is the virtual HBA driver for virtio.  If the kernel will
   be used in a virtual machine, say Y or M.


What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if 
!CONFIG_BLK_DEV_INTEGRITY?


Paolo
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-23 Thread Nicholas A. Bellinger
On Fri, 2014-05-23 at 11:20 +0200, Paolo Bonzini wrote:
 Il 22/05/2014 22:46, Nicholas A. Bellinger ha scritto:
  Hi Fengguang,
 
  On Thu, 2014-05-22 at 11:13 +0800, kbuild test robot wrote:
  tree:   
  git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
  for-next
  head:   4baaa7d589e24bfe87dfd6c7a1229108be404a28
  commit: 4baaa7d589e24bfe87dfd6c7a1229108be404a28 [20/20] virtio-scsi: 
  Enable DIF/DIX modes in SCSI host LLD
  config: x86_64-randconfig-x000 (attached as .config)
 
  All error/warnings:
 
 drivers/scsi/virtio_scsi.c: In function 'virtio_scsi_init_hdr_pi':
  drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to 
  incomplete type
cmd_pi-pi_bytesout = blk_rq_sectors(rq) * bi-tuple_size;
 ^
  drivers/scsi/virtio_scsi.c:533:47: error: dereferencing pointer to 
  incomplete type
cmd_pi-pi_bytesin = blk_rq_sectors(rq) * bi-tuple_size;
^
 
  vim +531 drivers/scsi/virtio_scsi.c
 
 525 if (!rq || !scsi_prot_sg_count(sc))
 526 return;
 527 
 528 bi = blk_get_integrity(rq-rq_disk);
 529 
 530 if (sc-sc_data_direction == DMA_TO_DEVICE)
531 cmd_pi-pi_bytesout = blk_rq_sectors(rq) * 
  bi-tuple_size;
 532 else if (sc-sc_data_direction == DMA_FROM_DEVICE)
533 cmd_pi-pi_bytesin = blk_rq_sectors(rq) * 
  bi-tuple_size;
 534 }
 535 
 536 static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
 
 
  Squashing the following into the original commit to enable blk-integrity
  for virtio-scsi to address the randconfig build failure above.
 
  Thanks!
 
  --nab
 
  diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
  index 02832d6..baca589 100644
  --- a/drivers/scsi/Kconfig
  +++ b/drivers/scsi/Kconfig
  @@ -1773,6 +1773,7 @@ config SCSI_BFA_FC
   config SCSI_VIRTIO
  tristate virtio-scsi support
  depends on VIRTIO
  +   select BLK_DEV_INTEGRITY
  help
 This is the virtual HBA driver for virtio.  If the kernel will
 be used in a virtual machine, say Y or M.
 
 What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if 
 !CONFIG_BLK_DEV_INTEGRITY?
 

I figured it was slightly cleaner to enable BLK_DEV_INTEGRITY by default
when referencing struct blk_integrity (following what IBLOCK does), than
adding the equivalent #ifdef's..

MKP, do you have a preference on this..?

--nab

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-22 Thread Nicholas A. Bellinger
Hi Fengguang,

On Thu, 2014-05-22 at 11:13 +0800, kbuild test robot wrote:
 tree:   git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
 for-next
 head:   4baaa7d589e24bfe87dfd6c7a1229108be404a28
 commit: 4baaa7d589e24bfe87dfd6c7a1229108be404a28 [20/20] virtio-scsi: Enable 
 DIF/DIX modes in SCSI host LLD
 config: x86_64-randconfig-x000 (attached as .config)
 
 All error/warnings:
 
drivers/scsi/virtio_scsi.c: In function 'virtio_scsi_init_hdr_pi':
  drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to 
  incomplete type
   cmd_pi-pi_bytesout = blk_rq_sectors(rq) * bi-tuple_size;
^
  drivers/scsi/virtio_scsi.c:533:47: error: dereferencing pointer to 
  incomplete type
   cmd_pi-pi_bytesin = blk_rq_sectors(rq) * bi-tuple_size;
   ^
 
 vim +531 drivers/scsi/virtio_scsi.c
 
525if (!rq || !scsi_prot_sg_count(sc))
526return;
527
528bi = blk_get_integrity(rq-rq_disk);
529
530if (sc-sc_data_direction == DMA_TO_DEVICE)
   531cmd_pi-pi_bytesout = blk_rq_sectors(rq) * 
 bi-tuple_size;
532else if (sc-sc_data_direction == DMA_FROM_DEVICE)
   533cmd_pi-pi_bytesin = blk_rq_sectors(rq) * 
 bi-tuple_size;
534}
535
536static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
 

Squashing the following into the original commit to enable blk-integrity
for virtio-scsi to address the randconfig build failure above.

Thanks!

--nab

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 02832d6..baca589 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1773,6 +1773,7 @@ config SCSI_BFA_FC
 config SCSI_VIRTIO
tristate virtio-scsi support
depends on VIRTIO
+   select BLK_DEV_INTEGRITY
help
   This is the virtual HBA driver for virtio.  If the kernel will
   be used in a virtual machine, say Y or M.


--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html