]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: extend mkfs/mount errorators to enospc
authorMatan Breizman <mbreizma@redhat.com>
Mon, 29 Sep 2025 11:38:46 +0000 (11:38 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 29 Sep 2025 11:38:46 +0000 (11:38 +0000)
Previously when after being unable to open enough segments:
```
 ERROR 2025-09-29 11:21:53,993 [shard 2:main] seastore_epm -
 ExtentPlacementManager::open_for_write: Not enough EMPTY segments!
 Consider increasing the device size (needed 6 got 2)
```

The abort message was:
```
ERROR 2025-09-29 11:21:53,994 [shard 2:main] osd -
/home/matan/ceph/src/crimson/common/errorator.h:1319 : In function
'crimson::ct_error::assert_all::operator()<const ..., abort()
 Invalid error in mount_managers: Input/output error
```

Where it would have been easier to understand the issue with:
```
ERROR 2025-09-29 11:36:57,901 [shard 2:main] osd -
/home/matan/ceph/src/crimson/common/errorator.h:1319 : In function
'crimson::ct_error::assert_all::operator()<const ..., abort()
 Invalid error in mount_managers: No space left on device
```

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/os/seastore/extent_placement_manager.cc
src/crimson/os/seastore/extent_placement_manager.h
src/crimson/os/seastore/transaction_manager.h

index 7a11dc7cf2e55df798ce9ab3c2caa4dd3ee1d803..99a713fcbc5082ee63122cef76603d140ff5fdf6 100644 (file)
@@ -458,8 +458,7 @@ ExtentPlacementManager::open_for_write()
     ERROR("Not enough EMPTY segments! "
           "Consider increasing the device size (needed {} got {})",
           total_writers_num, segments->get_num_empty());
-    // TODO: open_ertr should be expanded to enospc
-    co_await open_ertr::future<>(crimson::ct_error::input_output_error::make());
+    co_await open_ertr::future<>(crimson::ct_error::enospc::make());
   }
 
   DEBUG("opening DATA writers", num_devices);
index e603ccf9d436841927d53747711192010cdaf5c3..3d3980b9949550ba3812b0da648ad8dedb978444 100644 (file)
@@ -35,7 +35,8 @@ public:
 
   virtual writer_stats_t get_stats() const = 0;
 
-  using open_ertr = base_ertr;
+  using open_ertr = base_ertr::extend<
+    crimson::ct_error::enospc>;
   virtual open_ertr::future<> open() = 0;
 
   virtual paddr_t alloc_paddr(extent_len_t length) = 0;
index 9f2988ec8e2b41cfcf38d7f18cae9fba351ad057..e582d55abe9609f4752f6ad9d0adbfdabc77cd00 100644 (file)
@@ -76,11 +76,13 @@ public:
     shard_stats_t& shard_stats);
 
   /// Writes initial metadata to disk
-  using mkfs_ertr = base_ertr;
+  using mkfs_ertr = base_ertr::extend<
+    crimson::ct_error::enospc>;
   mkfs_ertr::future<> mkfs();
 
   /// Reads initial metadata from disk
-  using mount_ertr = base_ertr;
+  using mount_ertr = base_ertr::extend<
+    crimson::ct_error::enospc>;
   mount_ertr::future<> mount();
 
   /// Closes transaction_manager