+
+/* Flush all blocks in a file to stable storage. */
+void bluesky_file_flush(BlueSkyInode *inode)
+{
+ g_return_if_fail(inode->type == BLUESKY_REGULAR);
+
+ for (int i = 0; i < inode->blocks->len; i++) {
+ BlueSkyBlock *b = &g_array_index(inode->blocks, BlueSkyBlock, i);
+ bluesky_block_flush(inode->fs, b);
+ }
+}