New issue
Advanced search Search tips

Issue 755194 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

4k align the files inside an squashfs image

Project Member Reported by ahass...@chromium.org, Aug 14 2017

Issue description

Currently files inside a squashfs image are not 4k-aligned. This is necessary in order to allow update engine to create efficient payloads for the android container.
 
Blocking: 717785
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/cf882575d1f0e2cf341f8a4eeb6c7f9a401145c6

commit cf882575d1f0e2cf341f8a4eeb6c7f9a401145c6
Author: Amin Hassani <ahassani@google.com>
Date: Fri Aug 18 01:42:27 2017

squashfs-tools: Allow mksquashfs 4K aligns the files in the image

Currently the update engine requires files to be 4k-aligned in order to
create an efficient delta payload. However files inside a squashfs image
are not necessarily 4k (4096) aligned. This patch starts each file in a
4k aligned address and pads zero to the end of the file until it reaches
the next 4k aligned address. This will not change the size of the
compressed blocks (especially the last one) and hence it will not change
how the files are being loaded in kernel or unsquashfs. However on
average this increases the size of the squashfs image which can be
calculated by the following formula:

increased_size = (number_of_unfragmented_files_in_image + number of fragments) * 2048

The 4k alignment can be enabled by flag -4k-align

BUG=chromium:755194
TEST=Mounted a 4k-aligned squashfs image and compared the files with the
original image.

Change-Id: If25eae7af7a8d3207d0d4a1fabf81eec0f69ae03
Reviewed-on: https://chromium-review.googlesource.com/619308
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/cf882575d1f0e2cf341f8a4eeb6c7f9a401145c6/sys-fs/squashfs-tools/files/squashfs-tools-4.3-4k-align.patch
[modify] https://crrev.com/cf882575d1f0e2cf341f8a4eeb6c7f9a401145c6/sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild
[rename] https://crrev.com/cf882575d1f0e2cf341f8a4eeb6c7f9a401145c6/sys-fs/squashfs-tools/squashfs-tools-4.3-r4.ebuild

Blocking: -717785

Sign in to add a comment