thin-provisioning-tools icon indicating copy to clipboard operation
thin-provisioning-tools copied to clipboard

era_invalidate reads the live metadata instead of the metadata snapshot when using the `--metadata-snapshot` parameter

Open ntsiron opened this issue 4 years ago • 2 comments

Hello,

I noticed that era_invalidate reads the live metadata (superblock) instead of the metadata snapshot when using the --metadata-snapshot parameter.

The offending code is https://github.com/jthornber/thin-provisioning-tools/blob/main/era/metadata.cc#L45: The metadata_snap parameter is not passed to open_metadata().

If I am not missing something, and this is indeed a bug, I can send a PR to fix it.

Thanks, Nikos

ntsiron avatar Jan 04 '22 20:01 ntsiron

Yes, definitely sounds like a bug. Thanks.

On Tue, 4 Jan 2022 at 20:44, Nikos Tsironis @.***> wrote:

Hello,

I noticed that era_invalidate reads the live metadata (superblock) instead of the metadata snapshot when using the --metadata-snapshot parameter.

The offending code is https://github.com/jthornber/thin-provisioning-tools/blob/main/era/metadata.cc#L45: The metadata_snap parameter is not passed to open_metadata().

If I am not missing something, and this is indeed a bug, I can send a PR to fix it.

Thanks, Nikos

— Reply to this email directly, view it on GitHub https://github.com/jthornber/thin-provisioning-tools/issues/192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABOSQ5OFMOK4LBBSD54N5LUUNLZPANCNFSM5LIKKV4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

jthornber avatar Jan 04 '22 20:01 jthornber

I noticed that while I was doing the Rust version recently. You could send a PR if possible, or I'll fix it in conjunction with some recent update/bugfixes in the next few days. Thanks.

mingnus avatar Jan 05 '22 04:01 mingnus