Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ds-flatfs
Commits
903d4a77
Commit
903d4a77
authored
Apr 01, 2018
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure diskUsage is correctly aligned for atomic operations.
parent
12c0c1d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
flatfs.go
flatfs.go
+5
-3
No files found.
flatfs.go
View file @
903d4a77
...
...
@@ -103,6 +103,11 @@ func init() {
// write operations to the same key. See the explanation in
// Put().
type
Datastore
struct
{
// atmoic operations should always be used with diskUsage.
// Must be first in struct to ensure correct alignment
// (see https://golang.org/pkg/sync/atomic/#pkg-note-BUG)
diskUsage
int64
path
string
shardStr
string
...
...
@@ -111,9 +116,6 @@ type Datastore struct {
// sychronize all writes and directory changes for added safety
sync
bool
// atmoic operations should always be used with diskUsage
diskUsage
int64
// these values should only be used during internalization or
// inside the checkpoint loop
dirty
bool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment