OSDN Git Service

btrfs: waiting on qgroup rescan should not always be interruptible
authorJeff Mahoney <jeffm@suse.com>
Tue, 9 Aug 2016 02:08:06 +0000 (22:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2016 06:32:43 +0000 (08:32 +0200)
commitf31d48a091877f7580c0c6aa70e3d35d9b6e8625
treec7fa04fe921d752be3167c6498d5f987af2565b3
parent104b0d196dc23023dfd8401574585f16ce7ca57a
btrfs: waiting on qgroup rescan should not always be interruptible

commit d06f23d6a947c9abae41dc46be69a56baf36f436 upstream.

We wait on qgroup rescan completion in three places: file system
shutdown, the quota disable ioctl, and the rescan wait ioctl.  If the
user sends a signal while we're waiting, we continue happily along.  This
is expected behavior for the rescan wait ioctl.  It's racy in the shutdown
path but mostly works due to other unrelated synchronization points.
In the quota disable path, it Oopses the kernel pretty much immediately.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/disk-io.c
fs/btrfs/ioctl.c
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h