public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Aboo Valappil <aboo@aboo.org>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: dougg@torque.net, linux-scsi@vger.kernel.org
Subject: Re: Linux Virtual SCSI HBAs and Virtual disks
Date: Wed, 17 Jan 2007 21:24:57 +1100	[thread overview]
Message-ID: <45ADF979.7090003@aboo.org> (raw)
In-Reply-To: <45ADE01F.3020708@s5r6.in-berlin.de>

Hi All,
 
Thanks everyone to have a look at this.

I think i modified to have the latest kernel support. Unfortunately I 
could not test it with 2.6.20 kernel due to some issues in my laptop and 
2.6.20 kernel. But it should work with 2.6.20 with this modification.

The modified version is available through 
http://vscsihba.aboo.org/vscsihbav202.tgz.

1. I fixed the kmem_cache issue for sure.
2. I think i got around with INIT_WORK ... Made the following 
modifications ...


Here is the change ...

[root@goobu kernel]# diff device.c ../../vscsihba2/kernel/device.c
4,8c4
<
< struct scsitap_work_t {
<       struct scsitap_session *session;
<       struct work_struct work;
< } scsitap_work;
---
 > struct work_struct scsitap_work;
230c226
< void scsitap_scan_hba (void *work)
---
 > void scsitap_scan_hba (void *ptr)
232,233c228,229
<       struct scsitap_work_t *sw=container_of(work,struct 
scsitap_work_t, work)
;
<       struct scsitap_session *session=sw->session;
---
 >
 >       struct scsitap_session *session=(struct scsitap_session *)ptr;
239,240c235
<
<
---
 >
267,269c262,264
<               scsitap_work.session=session;
<               SCSITAP_INIT_WORK(&scsitap_work.work,scsitap_scan_hba);
<               schedule_work(&scsitap_work.work);
---
 >
 >               INIT_WORK(&scsitap_work,scsitap_scan_hba,session);
 >               schedule_work(&scsitap_work);




[root@goobu kernel]# diff ../include/vscsihba.h 
../../vscsihba2/include/vscsihba.h
16d15
< #include <linux/version.h>
51,56d49
< #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
<         #define SCSITAP_INIT_WORK(work, func)     INIT_WORK((work), 
(func), (void *)(work));
< #else
<         #define SCSITAP_INIT_WORK(work, func)     INIT_WORK((work), ( 
void (*) (struct work_struct *))(func));
< #endif
<


Aboo



Aboo

Stefan Richter wrote:
> Douglas Gilbert wrote:
>   
>> The table would be for different versions as it looks
>> like you may need a new one for bleeding edge kernels.
>>
>> I didn't get far trying to build the kernel module
>> against lk 2.6.20-rc5:
>>
>> # make
>> make -C /lib/modules/2.6.20-rc5/build M=/home/upgrades/apps/vscsihba1/vscsihba1/kernel modules
>> make[1]: Entering directory `/usr/src/linux-2.6.19'
>>   CC [M]  /home/upgrades/apps/vscsihba1/vscsihba1/kernel/hba.o
>> /home/upgrades/apps/vscsihba1/vscsihba1/kernel/hba.c:26: warning: ‘kmem_cache_t’ is deprecated
>>   CC [M]  /home/upgrades/apps/vscsihba1/vscsihba1/kernel/device.o
>> /home/upgrades/apps/vscsihba1/vscsihba1/kernel/device.c:263:51: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
>>     
> [...]
>
> Aboo,
>
> the workqueue API changes after 2.6.19 are for example explained here:
> http://lwn.net/Articles/213149/
> There are a lot of workqueue API conversion patches in 2.6.20-rc1 which
> can be taken as example. The first step when converting to the new API
> is to determine whether the work has to be delayed sometimes or can
> always be queued as immediate work. In the latter case, a slimmed-down
> variant of delayed work is used.
>
> The conversion away from kmem_cache_t is trivial. There are also some
> patches in 2.6.20-rc1 or later to use as example.
>   

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

  reply	other threads:[~2007-01-17 10:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16 10:22 Linux Virtual SCSI HBAs and Virtual disks Aboo Valappil
2007-01-16 21:52 ` Erik Mouw
2007-01-16 23:01   ` aboo
2007-01-17  1:50 ` Douglas Gilbert
2007-01-17  8:36   ` Stefan Richter
2007-01-17 10:24     ` Aboo Valappil [this message]
2007-01-17 22:20       ` Douglas Gilbert
2007-01-17 21:59         ` aboo
2007-01-18  0:38           ` Stefan Richter
2007-01-21  9:48         ` Aboo Valappil
2007-01-21  9:53           ` Aboo Valappil
2007-01-21 11:24             ` Stefan Richter
2007-01-22  0:43               ` aboo
2007-01-22  2:23                 ` aboo
2007-01-22 16:47                   ` Stefan Richter
2007-01-22 16:58                     ` Stefan Richter
2007-01-22 18:07                     ` James Bottomley
2007-01-23 13:11                     ` Aboo Valappil
2007-01-23 16:36                       ` Randy Dunlap
2007-01-23 17:22                         ` Stefan Richter
2007-01-24  9:47                           ` Aboo Valappil
2007-01-25 22:02                           ` Aboo Valappil
2007-01-23 17:16                       ` Stefan Richter
2007-01-23 22:12                         ` Aboo Valappil
2007-01-24  0:09                           ` Stefan Richter
2007-01-24  3:24                       ` Douglas Gilbert
2007-01-24  9:40                         ` Aboo Valappil
2007-01-25 21:41                         ` Aboo Valappil
2007-01-25 22:01                           ` Stefan Richter

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=45ADF979.7090003@aboo.org \
    --to=aboo@aboo.org \
    --cc=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stefanr@s5r6.in-berlin.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox