Re: [BK PATCHES] add ata scsi driver

James Bottomley
2003-05-27T17:57:37Z

On Tue, 2003-05-27 at 13:16, Jens Axboe wrote:
> If you increase it again, the maps are resized. Is that a problem? Seems
> ok to me.

What I mean is that you allocate memory whenever the depth increases.
Even if you have an array large enough to accommodate the increase
(because you don't release when you decrease the tag depth).

On further examination, there's also an invalid tag race: If a device
is throttling, it might want to do a big decrease followed fairly
quickly by a small increase. When it does the increase, you potentially
still have outstanding tags above the new depth, which will now run off
the end of your newly allocated tag array.

James