]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcache/error.c
cmd_migrate
[bcachefs-tools-debian] / libbcache / error.c
index 9f39be1b6349f4c5b1dd38fd687aa91027007114..f4109da6ebebfe66cfec8332d7164588c7a9a604 100644 (file)
@@ -14,7 +14,7 @@ void bch_inconsistent_error(struct cache_set *c)
        case BCH_ON_ERROR_RO:
                if (!test_bit(BCH_FS_INITIAL_GC_DONE, &c->flags)) {
                        /* XXX do something better here? */
-                       bch_fs_stop(c);
+                       bch_fs_stop_async(c);
                        return;
                }
 
@@ -120,7 +120,7 @@ void bch_nonfatal_io_error_work(struct work_struct *work)
        } else {
                bch_notify_dev_error(ca, true);
 
-               mutex_lock(&bch_register_lock);
+               mutex_lock(&c->state_lock);
                dev = bch_dev_may_remove(ca);
                if (dev
                    ? bch_dev_read_only(ca)
@@ -129,7 +129,7 @@ void bch_nonfatal_io_error_work(struct work_struct *work)
                                "too many IO errors on %s, setting %s RO",
                                bdevname(ca->disk_sb.bdev, buf),
                                dev ? "device" : "filesystem");
-               mutex_unlock(&bch_register_lock);
+               mutex_unlock(&c->state_lock);
        }
 }