]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/super.h
New upstream release
[bcachefs-tools-debian] / libbcachefs / super.h
index 3c83e9b9cb7b6b50248a441945aee545d683cf4d..36bcb9ec2b3ad9c07a8a4f6e0f1154d30c38b0ad 100644 (file)
@@ -223,7 +223,7 @@ static inline bool is_superblock_bucket(struct bch_dev *ca, u64 b)
 }
 
 struct bch_fs *bch2_dev_to_fs(dev_t);
-struct bch_fs *bch2_uuid_to_fs(uuid_le);
+struct bch_fs *bch2_uuid_to_fs(__uuid_t);
 
 bool bch2_dev_state_allowed(struct bch_fs *, struct bch_dev *,
                           enum bch_member_state, int);
@@ -251,7 +251,8 @@ int bch2_fs_read_write_early(struct bch_fs *);
  */
 static inline void bch2_fs_lazy_rw(struct bch_fs *c)
 {
-       if (percpu_ref_is_zero(&c->writes))
+       if (!test_bit(BCH_FS_RW, &c->flags) &&
+           !test_bit(BCH_FS_WAS_RW, &c->flags))
                bch2_fs_read_write_early(c);
 }