Skip to content
This repository has been archived by the owner on Nov 28, 2017. It is now read-only.

Circular buffer #85

Merged
merged 4 commits into from Nov 9, 2015
Merged

Circular buffer #85

merged 4 commits into from Nov 9, 2015

Conversation

jonludlam
Copy link
Contributor

Use the metadata area properly.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
We currently do not update the position of the last metadata position
when writing the metadata to disk. This means that if you make
multiple updates without rereading, the new metadata will always be
written in the same area of the disk, thus causing apparent corruption
if you're trying to read at the same time (the 'corruption' is
detected by a CRC check, and is only transient).

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
The test was comparing the vg metadata before and after writing
to disk, which fails as the location of the metadata changes.
This fix removes the 'headers' field from the vg metadata, which
contain the locations, before the comparison is made.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
We now reread the metadata after writing it and look for the
LV in the re-read data. Also, the test is tweaked so that it
actually does wrap around in the metadata area.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
@simonjbeaumont
Copy link
Contributor

Cool. Looks good.

@jonludlam
Copy link
Contributor Author

Thanks @simonjbeaumont

jonludlam pushed a commit that referenced this pull request Nov 9, 2015
@jonludlam jonludlam merged commit 2ffe5a1 into djs55:master Nov 9, 2015
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.

None yet

2 participants