-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(backup): skip loading the backingFile when doing backup or when user requests exporting the volume without backingFile #1187
Conversation
Doing more testing |
Hi @PhanLe1010 Can we then remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also fix the incorrect comments that mention index0 could be BackingImage.
13ff938
to
bc499c8
Compare
…ser request exporting the volume without backingFile longhorn-9209 Signed-off-by: Phan Le <phan.le@suse.com>
Can you help with the testing @ChanYiLin ? |
@PhanLe1010 sure no problem! |
Thanks @ChanYiLin for building the image I did some manual test and it passed on sle-micro ARM64 I will rely on you for the rest of the work. Thank you |
Test
|
Test
|
@mergify backport v1.7.x |
✅ Backports have been created |
@mergify backport v1.6.x v1.5.x |
✅ Backports have been created
|
@ChanYiLin has awesome analysis that sometime we are still loading backing file layer on sle-micro ARM64 when doing backup link. This is not correct because we should skip loading backing file when doing backup
The current implementation relies on the assumption that file descriptor of backingFile is always 0 and uses it to skip loading the backingFile layer: link . However, this assumption is not always correct. For example, with RAW backing image,
fd
is not 0. See more details at link . For qcow backing image, that assumption is correct because qcow image has hard coded to have FD 0 here https://github.com/longhorn/longhorn-engine/blob/04c645097a4a93e46f0f0391222895ea06b25456/pkg/qcow/libqcow.go#L84-L87This PR propose a this fix which always skip loading backingFile and doesn't rely on the assumption that backing file has
fd
as0
longhorn/longhorn#9209