Bug 1082630

Summary: Remove limitations on maximum number of snapshots in an image chain, due to backing file and filename character lengths
Product: Red Hat Enterprise Linux 7 Reporter: Gordon Watson <gwatson>
Component: qemu-kvm-rhevAssignee: Jeff Cody <jcody>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: ahino, alitke, amureini, gveitmic, huding, jcody, juzhang, michen, rbalakri, shu, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-30 17:23:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 1 Jeff Cody 2014-04-01 03:20:30 UTC
Additional information:  internally, the backing file chain is may be put together by the concatenation of many pathname strings, if the filename paths are relative paths.  If this exceeds PATH_MAX (4096 under RHEL), then we will fail to either open or create snapshot images.

Note that this is not necessarily the same as the filename character limit found in the image header (e.g., the header in a qcow2 file).  While if that is too long we may have similar issues, the backing file character length issue is different because the block layer builds up the backing file pathname string dynamically on image open.

See BZ 1067576 for more information, as well as for steps on how to replicate the issue (attachment #867573 [details]).

The final long-term solution is likely to be dynamically allocating backing file and filename strings internally, and perhaps also flattening redundant relative pathname strings.

Comment 2 Jeff Cody 2014-11-05 19:42:32 UTC
Moving to 7.2 - this is for the long-term solution, whereas BZ 1117170 is for the more immediate term solution for 7.1  This is also a RHEV bug, instead of a RHEL bug.

Comment 5 Jeff Cody 2016-03-23 19:26:51 UTC
*** Bug 1186989 has been marked as a duplicate of this bug. ***

Comment 6 Germano Veit Michel 2016-06-16 03:00:00 UTC
Does BZ 1333627 also fixes this?

That is, replacing "../<img>/<vol>" with "<vol>" in backing file field of qcow2 header.

https://gerrit.ovirt.org/#/c/57284/

Comment 7 Adam Litke 2016-06-27 14:35:38 UTC
(In reply to Germano Veit Michel from comment #6)
> Does BZ 1333627 also fixes this?
> 
> That is, replacing "../<img>/<vol>" with "<vol>" in backing file field of
> qcow2 header.
> 
> https://gerrit.ovirt.org/#/c/57284/

It mitigates the need to make any changes in qemu so yes we can probably close this.

Comment 8 Jeff Cody 2016-06-30 17:23:13 UTC
Closing this (WONTFIX), per Comment #6 and Comment #7.  Fixing it in the upper layers so the condition doesn't occur is the proper solution, as well.