diff --git a/include/bcachefs.h b/include/bcachefs.h index 94a4d80f..b04744b9 100644 --- a/include/bcachefs.h +++ b/include/bcachefs.h @@ -36,6 +36,7 @@ public: bool create(const Partition& new_partition, OperationDetail& operationdetail); void read_label(Partition& partition); void read_uuid(Partition& partition); + bool resize(const Partition& partition_new, OperationDetail& operationdetail, bool fill_partition); }; diff --git a/src/bcachefs.cc b/src/bcachefs.cc index f8c1f082..1a6514ae 100644 --- a/src/bcachefs.cc +++ b/src/bcachefs.cc @@ -45,6 +45,11 @@ FS bcachefs::get_filesystem_support() fs.create_with_label = FS::EXTERNAL; fs.read_label = FS::EXTERNAL; fs.read_uuid = FS::EXTERNAL; + fs.grow = FS::EXTERNAL; +#ifdef ENABLE_ONLINE_RESIZE + if (Utils::kernel_version_at_least(3, 6, 0)) + fs.online_grow = FS::EXTERNAL; +#endif } fs_limits.min_size = 32 * MEBIBYTE; @@ -131,4 +136,11 @@ void bcachefs::read_uuid(Partition& partition) } +bool bcachefs::resize(const Partition& partition_new, OperationDetail& operationdetail, bool fill_partition) +{ + return ! execute_command("bcachefs device resize " + Glib::shell_quote(partition_new.get_path()), + operationdetail, EXEC_CHECK_STATUS); +} + + } //GParted