[lkml]   [2010]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: iscsi warning in 2.6.33-rc2
On 12/29/2009 11:43 PM, Tao Ma wrote:
> Hi all,
> I met with this warning when using iscsi with the 2.6.33-rc2.
> ------------[ cut here ]------------
> WARNING: at drivers/scsi/libiscsi_tcp.c:996

> The other thing I can confirm is that I didn't meet with such problem in
> 2.6.32-rc8.

Sorry for the late reply. I am just getting back.

I think this is due to the kfifo changes that got merged recently.

For the iscsi side if there is nothing in the r2tqueue fifo at this time
it is fine. It just means that there is nothing to process, so I think
that the warn on should just not have been added.

Could you try the attached patch? I have only compile tested it. I am
starting up some testing for the patch and the other fifo changes that
got merged now.
An empty r2tqueue is a valid state. It just means that we have
processed all that there was to do.

This patch removes the WARN_ON.

Signed-off-by: Mike Christie <>

diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c
index db6856c..4ad87fd 100644
--- a/drivers/scsi/libiscsi_tcp.c
+++ b/drivers/scsi/libiscsi_tcp.c
@@ -992,12 +992,10 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task)
if (r2t == NULL) {
if (kfifo_out(&tcp_task->r2tqueue,
(void *)&tcp_task->r2t, sizeof(void *)) !=
- sizeof(void *)) {
- WARN_ONCE(1, "unexpected fifo state");
+ sizeof(void *))
r2t = NULL;
- }
- r2t = tcp_task->r2t;
+ else
+ r2t = tcp_task->r2t;
 \ /
  Last update: 2010-01-06 20:45    [from the cache]
©2003-2011 Jasper Spaans