Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

Add truncate() and sync() on resize.#286

Merged
benbjohnson merged 1 commit intoboltdb:masterfrom
benbjohnson:trunc-n-sync
Jan 18, 2015
Merged

Add truncate() and sync() on resize.#286
benbjohnson merged 1 commit intoboltdb:masterfrom
benbjohnson:trunc-n-sync

Conversation

@benbjohnson
Copy link
Member

Overview

This commit fixes an issue with ext3/ext4 filesystems where metadata file size is not synced when resizing a file. It also resizes the entire resize instead of updating the size during individual page writes.

Fixes #284.

Thanks to @tv42 for the fix.

This commit fixes an issue with ext3/ext4 filesystems where metadata file size is not synced
when resizing a file. It also resizes the entire resize instead of updating the size during
individual page writes.

Thanks to @tv42 for the fix.
@benbjohnson
Copy link
Member Author

@tv42 how does this look?

@tv42
Copy link
Contributor

tv42 commented Jan 18, 2015

Can't see anything wrong with it. As the paper pointed out, there's a devil in every detail ;)

@benbjohnson
Copy link
Member Author

cool, thanks for looking it over.

benbjohnson added a commit that referenced this pull request Jan 18, 2015
Add truncate() and sync() on resize.
@benbjohnson benbjohnson merged commit 4397537 into boltdb:master Jan 18, 2015
@benbjohnson benbjohnson deleted the trunc-n-sync branch January 18, 2015 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ext3/ext4 is not fully POSIX, to be safe there, need to fsync after file size changes

2 participants