Hi Shailabh,
Got around to merging your io controller into my kernel. Oddly enough I get the same compilation error message from before, as shown below:
drivers/block/ckrm-io.c:97: error: `cki_tsk_icls' redeclared as different kind of symbol include/linux/ckrm-io.h:36: error: previous declaration of `cki_tsk_icls' drivers/block/ckrm-io.c:98: error: `cki_tsk_ioprio' redeclared as different kind of symbol include/linux/ckrm-io.h:37: error: previous declaration of `cki_tsk_ioprio' make[2]: *** [drivers/block/ckrm-io.o] Error 1 make[1]: *** [drivers/block] Error 2 make: *** [drivers] Error 2
There is an easy work around for this. What compiler are you using on your linux box? I am using the following below:
[EMAIL PROTECTED] linux]$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-thre ads=posix --disable-checking --disable-libu nwind-exceptions --with-system-zlib --enable-__cxa_atexit --host=i386-redhat -linux Thread model: posix gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
[EMAIL PROTECTED] ckrm-e16test]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
I think the problem is that gcc doesn't see the equivalence of the
icls_tsk_t type definition in ckrm-io.h and the function declaration in ckrm-io.c. Since my gcc is older, it probably doesn't check as much and I don't see the error.
Please apply the attached patch and try again.
-- Shailabh
diff -Nru a/drivers/block/ckrm-io.c b/drivers/block/ckrm-io.c --- a/drivers/block/ckrm-io.c Thu Sep 23 11:36:51 2004 +++ b/drivers/block/ckrm-io.c Thu Sep 23 11:36:51 2004 @@ -94,8 +94,8 @@ static void cki_recalc_propagate(cki_icls_t *res, cki_icls_t *parres); /* External functions e.g. interface to ioscheduler */ -void *cki_tsk_icls(struct task_struct *tsk); -int cki_tsk_ioprio(struct task_struct *tsk); +void *cki_tsk_icls (struct task_struct *tsk); +int cki_tsk_ioprio (struct task_struct *tsk); extern void cki_cfq_set(icls_tsk_t tskicls, icls_ioprio_t tskioprio); diff -Nru a/include/linux/ckrm-io.h b/include/linux/ckrm-io.h --- a/include/linux/ckrm-io.h Thu Sep 23 11:36:51 2004 +++ b/include/linux/ckrm-io.h Thu Sep 23 11:36:51 2004 @@ -33,8 +33,8 @@ #ifdef CONFIG_CKRM_RES_BLKIO -extern icls_tsk_t cki_tsk_icls; -extern icls_ioprio_t cki_tsk_ioprio; +extern void *cki_tsk_icls (struct task_struct *tsk); +extern int cki_tsk_ioprio (struct task_struct *tsk); #endif /* CONFIG_CKRM_RES_BLKIO */
