From b5b0708f8b68173fbebc489f014b9d4e8b4aa3cf41124d4e889e756717a90d59 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 4 Nov 2011 06:38:10 +0000 Subject: [PATCH] Accepting request 90070 from home:k0da:ppc - The ppc64 kernel uses a page size of 64kB but mksquashfs only pads to a 4kB boundary. When we loopback mount a squashfs file that isn't 64kB aligned and access the last sector of the associated loopback device we see a stream of errors. Disk partitioning tools seem to like accessing the last 512 bytes of partitions. This should fix warnings seen during starting installation on ppc64 and IA64 OBS-URL: https://build.opensuse.org/request/show/90070 OBS-URL: https://build.opensuse.org/package/show/filesystems/squashfs?expand=0&rev=11 --- squashfs-64k.patch | 24 ++++++++++++++++++++++++ squashfs.changes | 12 ++++++++++++ squashfs.spec | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 squashfs-64k.patch diff --git a/squashfs-64k.patch b/squashfs-64k.patch new file mode 100644 index 0000000..b64d717 --- /dev/null +++ b/squashfs-64k.patch @@ -0,0 +1,24 @@ +--- squashfs-tools/mksquashfs.c.orig 2011-11-03 19:57:06.000000000 +0100 ++++ squashfs-tools/mksquashfs.c 2011-11-03 19:58:50.000000000 +0100 +@@ -4871,7 +4871,7 @@ + ERROR("-force-uid uid\t\tset all file uids to uid\n"); + ERROR("-force-gid gid\t\tset all file gids to gid\n"); + ERROR("-nopad\t\t\tdo not pad filesystem to a multiple " +- "of 4K\n"); ++ "of 64K\n"); + ERROR("-keep-as-directory\tif one source directory is " + "specified, create a root\n"); + ERROR("\t\t\tdirectory containing that directory, " +@@ -5339,9 +5339,9 @@ + SQUASHFS_INSWAP_SUPER_BLOCK(&sBlk); + write_destination(fd, SQUASHFS_START, sizeof(sBlk), &sBlk); + +- if(!nopad && (i = bytes & (4096 - 1))) { +- char temp[4096] = {0}; +- write_destination(fd, bytes, 4096 - i, temp); ++ if(!nopad && (i = bytes & (65536 - 1))) { ++ char temp[65536] = {0}; ++ write_destination(fd, bytes, 65536 - i, temp); + } + + close(fd); diff --git a/squashfs.changes b/squashfs.changes index 88f69a6..e786d08 100644 --- a/squashfs.changes +++ b/squashfs.changes @@ -1,4 +1,16 @@ +------------------------------------------------------------------- +Thu Nov 3 19:00:03 UTC 2011 - dvaleev@suse.com +- The ppc64 kernel uses a page size of 64kB but mksquashfs only + pads to a 4kB boundary. When we loopback mount a squashfs file + that isn't 64kB aligned and access the last sector of the + associated loopback device we see a stream of errors. + Disk partitioning tools seem to like accessing the last 512 + bytes of partitions. + + This should fix warnings seen during starting installation on + ppc64 and IA64 + ------------------------------------------------------------------- Tue May 24 16:41:14 CEST 2011 - dimstar@opensuse.org diff --git a/squashfs.spec b/squashfs.spec index 3551fea..b790212 100644 --- a/squashfs.spec +++ b/squashfs.spec @@ -26,6 +26,7 @@ Supplements: filesystem(squashfs) Version: 4.2 Release: 1 Source0: %{name}%{version}.tar.gz +Patch0: squashfs-64k.patch Url: http://squashfs.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: A Read-Only File System with Efficient Compression @@ -36,6 +37,7 @@ squashfs images. %prep %setup -n squashfs%{version} +%patch0 %build sed -i -e "s,-O2,%{optflags}," squashfs-tools/Makefile