summaryrefslogtreecommitdiff
path: root/scripts/recordmcount.pl
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2016-01-26 18:42:40 +0800
committerDavid Sterba <dsterba@suse.com>2016-02-18 10:27:23 +0100
commit4fe7a0e13864238fe5b4cc2640e963581f96429e (patch)
tree6bbeac8bc14b6fa2683c454cafea277f1be88022 /scripts/recordmcount.pl
parent2fefd5583f8b86171c898f90cadac7c09ccf9d73 (diff)
btrfs: reada: avoid undone reada extents in btrfs_reada_wait
Reada background works is not designed to finish all jobs completely, it will break in following case: 1: When a device reaches workload limit (MAX_IN_FLIGHT) 2: Total reads reach max limit (10000) 3: All devices don't have queued more jobs, often happened in DUP case And if all background works exit with remaining jobs, btrfs_reada_wait() will wait indefinetelly. Above problem is rarely happened in old code, because: 1: Every work queues 2x new works So many works reduced chances of undone jobs. 2: One work will continue 10000 times loop in case of no-jobs It reduced no-thread window time. But after we fixed above case, the "undone reada extents" frequently happened. Fix: Check to ensure we have at least one thread if there are undone jobs in btrfs_reada_wait(). Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/recordmcount.pl')
0 files changed, 0 insertions, 0 deletions