* Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type
[not found] <537d6b74.lQGMmmapPq/MP5Nx%fengguang.wu@intel.com>
@ 2014-05-22 20:46 ` Nicholas A. Bellinger
2014-05-23 9:20 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Nicholas A. Bellinger @ 2014-05-22 20:46 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Paolo Bonzini, Martin K. Petersen, linux-scsi
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.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type
2014-05-22 20:46 ` [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type Nicholas A. Bellinger
@ 2014-05-23 9:20 ` Paolo Bonzini
2014-05-23 17:45 ` Nicholas A. Bellinger
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2014-05-23 9:20 UTC (permalink / raw)
To: Nicholas A. Bellinger, kbuild test robot
Cc: kbuild-all, Martin K. Petersen, linux-scsi
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type
2014-05-23 9:20 ` Paolo Bonzini
@ 2014-05-23 17:45 ` Nicholas A. Bellinger
2014-05-26 17:30 ` Martin K. Petersen
0 siblings, 1 reply; 6+ messages in thread
From: Nicholas A. Bellinger @ 2014-05-23 17:45 UTC (permalink / raw)
To: Paolo Bonzini
Cc: kbuild test robot, kbuild-all, Martin K. Petersen, linux-scsi
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type
2014-05-23 17:45 ` Nicholas A. Bellinger
@ 2014-05-26 17:30 ` Martin K. Petersen
2014-05-27 22:21 ` Nicholas A. Bellinger
0 siblings, 1 reply; 6+ messages in thread
From: Martin K. Petersen @ 2014-05-26 17:30 UTC (permalink / raw)
To: Nicholas A. Bellinger
Cc: Paolo Bonzini, kbuild test robot, kbuild-all, Martin K. Petersen,
linux-scsi
>>>>> "Nic" == Nicholas A Bellinger <nab@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type
2014-05-26 17:30 ` Martin K. Petersen
@ 2014-05-27 22:21 ` Nicholas A. Bellinger
2014-05-28 11:25 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Nicholas A. Bellinger @ 2014-05-27 22:21 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Paolo Bonzini, kbuild test robot, kbuild-all, linux-scsi
On Mon, 2014-05-26 at 13:30 -0400, Martin K. Petersen wrote:
> >>>>> "Nic" == Nicholas A Bellinger <nab@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type
2014-05-27 22:21 ` Nicholas A. Bellinger
@ 2014-05-28 11:25 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-05-28 11:25 UTC (permalink / raw)
To: Nicholas A. Bellinger, Martin K. Petersen
Cc: kbuild test robot, kbuild-all, linux-scsi
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 <nab@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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-28 11:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <537d6b74.lQGMmmapPq/MP5Nx%fengguang.wu@intel.com>
2014-05-22 20:46 ` [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type Nicholas A. Bellinger
2014-05-23 9:20 ` Paolo Bonzini
2014-05-23 17:45 ` Nicholas A. Bellinger
2014-05-26 17:30 ` Martin K. Petersen
2014-05-27 22:21 ` Nicholas A. Bellinger
2014-05-28 11:25 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).