]> git.ipfire.org Git - people/arne_f/kernel.git/commit - fs/btrfs/extent-tree.c
Btrfs: use a worker thread to do caching
authorJosef Bacik <josef@redhat.com>
Thu, 30 Jun 2011 18:42:28 +0000 (14:42 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 27 Jul 2011 16:46:25 +0000 (12:46 -0400)
commitbab39bf998133510f2dad08158006197ec0dabea
tree0ea50b2b07a9f75988829de6c42b6936e2355545
parentdf98b6e2c52f65665eaf0fc23e647fb64335b289
Btrfs: use a worker thread to do caching

A user reported a deadlock when copying a bunch of files.  This is because they
were low on memory and kthreadd got hung up trying to migrate pages for an
allocation when starting the caching kthread.  The page was locked by the person
starting the caching kthread.  To fix this we just need to use the async thread
stuff so that the threads are already created and we don't have to worry about
deadlocks.  Thanks,

Reported-by: Roman Mamedov <rm@romanrm.ru>
Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c