Skip to content

Commit 5b0de9d

Browse files
committed
partitioning/writer: Always sync before close
Otherwise, the buffers don't flush and nothing works without divine intervention. Signed-off-by: Ikey Doherty <[email protected]>
1 parent 53d2214 commit 5b0de9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/partitioning/src/writer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ impl<'a> DiskWriter<'a> {
159159
);
160160
}
161161

162+
// Consume and sync the GPT table
162163
if writable {
163-
gpt_table.write_inplace()?;
164+
let original = gpt_table.write()?;
165+
original.sync_all()?;
164166
}
165167

166168
Ok(())

0 commit comments

Comments
 (0)