]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: fix prefetch queue limiting
authorDave Chinner <dchinner@redhat.com>
Mon, 3 Mar 2014 01:17:46 +0000 (12:17 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 3 Mar 2014 01:17:46 +0000 (12:17 +1100)
commit004e18d4795711f06f95d1113663da2203f89918
treec0bd202dae8fe73faa8d917e504a6502fdc6b39d
parent1177f6693696a66f19b3a307b0ff141f7afdef67
repair: fix prefetch queue limiting

The length of the prefetch queue is limited by a semaphore. To avoid
a ABBA deadlock, we only trywait on the semaphore so if we fail to
get it we can kick the IO queues before sleeping. Unfortunately,
the "need to sleep" detection is just a little wrong - it needs to
lok at errno, not err for the EAGAIN value.

Hence this queue throttling has not been working for a long time.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/phase6.c
repair/prefetch.c