----- Original Message -----
From: "P.Basker" <[EMAIL PROTECTED]>
To: "Eric Youngdale" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, June 05, 2000 1:42 AM
Subject: Re: scsi buffer head write capturing
> Hi eric,
> Im actually viewing the buffer blocks that are written to the
> disk in each flush from the buffer cache. I capture the request function
> of the scsi device( do_sd_request() ) and invoke my own routine before
> actually calling the old routine. Now since the scsi layer in ll_rw_blk.c
> is doing a fiddling and attaching the new buffer heads to already
> existing requests it seems Im missing them out.
>
> Ive solved the problem by adding a few lines of code very similar
> to md request in ll_rw_block(). Hence I have created a hook up function on
> to which I can hook myself to capture every single buffer head.
OK, I can see what is going on here. Essentially the queueing function
gets called from a number of places. One is when ll_rw_blk calls down into
the disk driver to initiate a command. The function is also called when one
command is complete and we want to launch another command, for example.
Look through sd.c and you will see that the request functions are called
from a number of places.
> If there is a more elegant way of doing the same, please guide me.
> Alternatively if the scsi layer is going to be modified, I would like to
> know If such an interface would be possible in the future for me without
> myself adding hook up functions.
The queueing in the 2.4 series kernels is a complete rewrite, and I
suspect that you will need to redo quite a few things to get it working
again. Even the ll_rw_blk layer has undergone significant modifications.
I would tend to agree that using an approach like md would probably work
better. You effectively have a passthrough device which would log the I/O
request as it comes in, and then pass it down. The problem is that you
don't find out when the request is actually initiated on the device, but if
you just want a list of the requests being stuffed in the queue, that would
be good enough.
> Regards
> Animesh Singh
> & P.Basker
>
> PS: Is there only u and me in the mailing list?
No, there are quite a few others. Lots of the people have very specific
interests, and don't comment on stuff that isn't in their area.
-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]