diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3aab10ce63e8..e913328d0f2a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -921,7 +921,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait) | |||
921 | return 0; | 921 | return 0; |
922 | } | 922 | } |
923 | 923 | ||
924 | btrfs_wait_all_ordered_extents(fs_info, 1); | 924 | btrfs_wait_all_ordered_extents(fs_info); |
925 | 925 | ||
926 | trans = btrfs_attach_transaction_barrier(root); | 926 | trans = btrfs_attach_transaction_barrier(root); |
927 | if (IS_ERR(trans)) { | 927 | if (IS_ERR(trans)) { |
@@ -1340,6 +1340,12 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) | |||
1340 | if (ret) | 1340 | if (ret) |
1341 | goto restore; | 1341 | goto restore; |
1342 | } else { | 1342 | } else { |
1343 | if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) { | ||
1344 | btrfs_err(fs_info, | ||
1345 | "Remounting read-write after error is not allowed\n"); | ||
1346 | ret = -EINVAL; | ||
1347 | goto restore; | ||
1348 | } | ||
1343 | if (fs_info->fs_devices->rw_devices == 0) { | 1349 | if (fs_info->fs_devices->rw_devices == 0) { |
1344 | ret = -EACCES; | 1350 | ret = -EACCES; |
1345 | goto restore; | 1351 | goto restore; |
@@ -1377,6 +1383,16 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) | |||
1377 | pr_warn("btrfs: failed to resume dev_replace\n"); | 1383 | pr_warn("btrfs: failed to resume dev_replace\n"); |
1378 | goto restore; | 1384 | goto restore; |
1379 | } | 1385 | } |
1386 | |||
1387 | if (!fs_info->uuid_root) { | ||
1388 | pr_info("btrfs: creating UUID tree\n"); | ||
1389 | ret = btrfs_create_uuid_tree(fs_info); | ||
1390 | if (ret) { | ||
1391 | pr_warn("btrfs: failed to create the uuid tree" | ||
1392 | "%d\n", ret); | ||
1393 | goto restore; | ||
1394 | } | ||
1395 | } | ||
1380 | sb->s_flags &= ~MS_RDONLY; | 1396 | sb->s_flags &= ~MS_RDONLY; |
1381 | } | 1397 | } |
1382 | out: | 1398 | out: |
@@ -1762,6 +1778,9 @@ static void btrfs_print_info(void) | |||
1762 | #ifdef CONFIG_BTRFS_DEBUG | 1778 | #ifdef CONFIG_BTRFS_DEBUG |
1763 | ", debug=on" | 1779 | ", debug=on" |
1764 | #endif | 1780 | #endif |
1781 | #ifdef CONFIG_BTRFS_ASSERT | ||
1782 | ", assert=on" | ||
1783 | #endif | ||
1765 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY | 1784 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY |
1766 | ", integrity-checker=on" | 1785 | ", integrity-checker=on" |
1767 | #endif | 1786 | #endif |