prevent btrfsck to run on mounted filesystems
authorAndi Drebes <lists-receive@programmierforen.de>
Thu, 9 Sep 2010 02:58:43 +0000 (10:58 +0800)
committerChris Mason <chris.mason@oracle.com>
Fri, 24 Sep 2010 00:26:49 +0000 (20:26 -0400)
commit659d37c68d0676dcb9a9990bdbe61b98f11b0246
treebf6792f098cb12f44d5a85a9aec67e1819820d0c
parent09559bfe7bcd43965bf8d3090f6f761fd785d093
prevent btrfsck to run on mounted filesystems

As recently discussed on the list, btrfsck should only be run on
unmounted filesystems. This patch adds a short check for the mount
status at the beginning of btrfsck. If the FS is mounted, the
program aborts showing an error message.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
btrfsck.c