* Spinlock Related Debug Messages in Block Driver
@ 2006-07-11 6:03 Srinivas Ganji
2006-07-11 7:17 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Ganji @ 2006-07-11 6:03 UTC (permalink / raw)
To: linux-kernel
Dear All,
I implemented the sample block driver for the removable devices and
the code contains no statements related to the spin lock except a lock
to the blk_init_queue API as shown below.
spinlock_t qlock;
gDisk->blkqueue = blk_init_queue(do_my_request, &gDisk->qlock);
The kernel version is 2.6.10.
Everything works fine but when I try to copy a file of huge size
(about 100MB), the following debug messages are getting displayed on
the console:
Fc3: drivers/block/ll_rw_blk.c: 2351: spin_lock already locked by the drivers.
Fc3: drivers/block/ll_rw_blk.c: 2468: spin_unlock not locked by the drivers.
In spite of these debug messages; the file is getting copied successfully.
I studied the Block driver 16th chapter in LDD third edition.
Can any one provide a pointer to these debug messages. Do I need to
implement any patches for the kernel.
Regards,
Srinivas G.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Spinlock Related Debug Messages in Block Driver
2006-07-11 6:03 Spinlock Related Debug Messages in Block Driver Srinivas Ganji
@ 2006-07-11 7:17 ` Jens Axboe
2006-07-11 7:42 ` Srinivas Ganji
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2006-07-11 7:17 UTC (permalink / raw)
To: Srinivas Ganji; +Cc: linux-kernel
On Tue, Jul 11 2006, Srinivas Ganji wrote:
> Dear All,
>
> I implemented the sample block driver for the removable devices and
> the code contains no statements related to the spin lock except a lock
> to the blk_init_queue API as shown below.
>
> spinlock_t qlock;
> gDisk->blkqueue = blk_init_queue(do_my_request, &gDisk->qlock);
>
> The kernel version is 2.6.10.
>
> Everything works fine but when I try to copy a file of huge size
> (about 100MB), the following debug messages are getting displayed on
> the console:
>
> Fc3: drivers/block/ll_rw_blk.c: 2351: spin_lock already locked by the
> drivers.
> Fc3: drivers/block/ll_rw_blk.c: 2468: spin_unlock not locked by the drivers.
>
> In spite of these debug messages; the file is getting copied successfully.
> I studied the Block driver 16th chapter in LDD third edition.
>
> Can any one provide a pointer to these debug messages. Do I need to
> implement any patches for the kernel.
You need to initialize the lock passed to blk_init_queue() first. See eg
spin_lock_init(), or one of the static initializers
(SPIN_LOCK_UNLOCKED).
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Spinlock Related Debug Messages in Block Driver
2006-07-11 7:17 ` Jens Axboe
@ 2006-07-11 7:42 ` Srinivas Ganji
2006-07-11 7:46 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Ganji @ 2006-07-11 7:42 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-kernel
On 7/11/06, Jens Axboe <axboe@suse.de> wrote:
> On Tue, Jul 11 2006, Srinivas Ganji wrote:
> > Dear All,
> >
> > I implemented the sample block driver for the removable devices and
> > the code contains no statements related to the spin lock except a lock
> > to the blk_init_queue API as shown below.
> >
> > spinlock_t qlock;
> > gDisk->blkqueue = blk_init_queue(do_my_request, &gDisk->qlock);
> >
> > The kernel version is 2.6.10.
> >
> > Everything works fine but when I try to copy a file of huge size
> > (about 100MB), the following debug messages are getting displayed on
> > the console:
> >
> > Fc3: drivers/block/ll_rw_blk.c: 2351: spin_lock already locked by the
> > drivers.
> > Fc3: drivers/block/ll_rw_blk.c: 2468: spin_unlock not locked by the drivers.
> >
> > In spite of these debug messages; the file is getting copied successfully.
> > I studied the Block driver 16th chapter in LDD third edition.
> >
> > Can any one provide a pointer to these debug messages. Do I need to
> > implement any patches for the kernel.
>
> You need to initialize the lock passed to blk_init_queue() first. See eg
> spin_lock_init(), or one of the static initializers
> (SPIN_LOCK_UNLOCKED).
>
> --
> Jens Axboe
Dear Jen,
Thanks for your reply.
I used the spin_lock_init API before blk_init_queue API. Even though I
got the error.
Is there any other reason for gertting the error messages?
Thanks and Regards,
Srinivas G
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Spinlock Related Debug Messages in Block Driver
2006-07-11 7:42 ` Srinivas Ganji
@ 2006-07-11 7:46 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2006-07-11 7:46 UTC (permalink / raw)
To: Srinivas Ganji; +Cc: linux-kernel
On Tue, Jul 11 2006, Srinivas Ganji wrote:
> On 7/11/06, Jens Axboe <axboe@suse.de> wrote:
> >On Tue, Jul 11 2006, Srinivas Ganji wrote:
> >> Dear All,
> >>
> >> I implemented the sample block driver for the removable devices and
> >> the code contains no statements related to the spin lock except a lock
> >> to the blk_init_queue API as shown below.
> >>
> >> spinlock_t qlock;
> >> gDisk->blkqueue = blk_init_queue(do_my_request, &gDisk->qlock);
> >>
> >> The kernel version is 2.6.10.
> >>
> >> Everything works fine but when I try to copy a file of huge size
> >> (about 100MB), the following debug messages are getting displayed on
> >> the console:
> >>
> >> Fc3: drivers/block/ll_rw_blk.c: 2351: spin_lock already locked by the
> >> drivers.
> >> Fc3: drivers/block/ll_rw_blk.c: 2468: spin_unlock not locked by the
> >drivers.
> >>
> >> In spite of these debug messages; the file is getting copied
> >successfully.
> >> I studied the Block driver 16th chapter in LDD third edition.
> >>
> >> Can any one provide a pointer to these debug messages. Do I need to
> >> implement any patches for the kernel.
> >
> >You need to initialize the lock passed to blk_init_queue() first. See eg
> >spin_lock_init(), or one of the static initializers
> >(SPIN_LOCK_UNLOCKED).
> >
> >--
> >Jens Axboe
>
> Dear Jen,
>
> Thanks for your reply.
> I used the spin_lock_init API before blk_init_queue API. Even though I
> got the error.
>
> Is there any other reason for gertting the error messages?
Then it's probably a bug in your driver. I cannot say more without
seeing the source.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-11 7:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 6:03 Spinlock Related Debug Messages in Block Driver Srinivas Ganji
2006-07-11 7:17 ` Jens Axboe
2006-07-11 7:42 ` Srinivas Ganji
2006-07-11 7:46 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox