The Dedup() function in the overlay driver does not correctly handle layers when an imagestore is configured. It always uses the main graphRoot path instead of the imagestore path, preventing deduplication from working on image layers stored in a separate imagestore.
In storage/drivers/overlay/overlay.go line 2810, the Dedup() function calls:
dir, _, inAdditionalStore := d.dir2(layer, false)
When imagestore is configured (e.g., /var/lib/containers/imagestore), image layers are stored at /var/lib/containers/imagestore/overlay/<layer-id>/diff. The Dedup() function should operate on these imagestore paths.
cc: @haircommander @asahay19
The Dedup() function in the overlay driver does not correctly handle layers when an imagestore is configured. It always uses the main graphRoot path instead of the imagestore path, preventing deduplication from working on image layers stored in a separate imagestore.
In storage/drivers/overlay/overlay.go line 2810, the Dedup() function calls:
dir, _, inAdditionalStore := d.dir2(layer, false)
When imagestore is configured (e.g., /var/lib/containers/imagestore), image layers are stored at
/var/lib/containers/imagestore/overlay/<layer-id>/diff. TheDedup()function should operate on these imagestore paths.cc: @haircommander @asahay19