1

In older versions of the kernel (2.6.25.8), it was in drivers/scsi/scsi_error.c in the functions scsi_add_timer and scsi_delete_timer: http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/drivers/scsi/scsi_error.c?v=2.6.25.8

I can't seem to find anything similar in scsi_error.c in the 2.6.33.20 kernel, I've looked in other files (using grep and searching for time) and see mentions of timeouts, but nothing that looks similar like where you're setting the timeout value for the timer.

Any help is greatly appreciated, been banging my head on this for a while.

Thanks!

Jdban101
  • 367
  • 1
  • 3
  • 21

1 Answers1

1

I have a feeling that what you're trying to find was changed in 242f9dcb8ba6f68fcd217a119a7648a4f69290e9, when the timeouts were lifted out of the specific block devices and moved into the block device abstraction layer.

sarnold
  • 102,305
  • 22
  • 181
  • 238
  • Thanks so much. Do you have any tips on how I can find this stuff in the future? I'm going to be mucking around in the kernel a lot. – Jdban101 Jun 20 '12 at 16:44
  • For this specific one, I read the `git log` for the specific file you had and searched for `time` or `timer` or something like that. One patch was fixing incorrect braces introduced with that patch, and the changelog entry for that patch looked _perfect_. I got a bit lucky that the big change was clearly labeled in the log, but I probably would have found it eventually anyhow. – sarnold Jun 21 '12 at 01:20
  • Were you using this website or the actual git repository? http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary – Jdban101 Jun 21 '12 at 19:53
  • I was using a cloned `git` repository on my local machine; I included the link because it is far easier for casual browsing (you or other future visitors) but I would not rely solely on it for research work -- the latency is far too high between operations. – sarnold Jun 21 '12 at 20:30
  • I just cloned the repo and it was really easy to find the change. Thanks. – Jdban101 Jun 21 '12 at 20:50
  • Hating the kernel so much, haha. I keep looking and it seems like the really obfuscated all the timeout code with this commit. Can't find where the actual timeouts are dealt with similar to the scsi_add_timer and delete timer before – Jdban101 Jun 22 '12 at 20:23
  • In `block/blk-timeout.c` there's `blk_add_timer()` and `blk_delete_timer()`, along with some helpful utilities. If you're migrating a specific patch, you might wish to try to re-implement the patch in the new system rather than try to _port_ the patch over.. (It's a very subtle difference of attitude more than anything else, but you might find it helpful all the same. I know I have..) – sarnold Jun 22 '12 at 22:30