From: Christoph Egger Subject: Re: [PATCH][TOOLS] libfsimage: make pygrub work on ufs Date: Tue, 10 Jun 2008 14:14:27 +0200 Message-ID: <200806101414.28241.Christoph.Egger@amd.com> References: <200806091559.45511.Christoph.Egger@amd.com> <200806101024.57045.Christoph.Egger@amd.com> <20080610114057.GA19936@totally.trollied.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20080610114057.GA19936@totally.trollied.org.uk> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: John Levon List-Id: xen-devel@lists.xenproject.org On Tuesday 10 June 2008 13:40:57 John Levon wrote: > On Tue, Jun 10, 2008 at 10:24:56AM +0200, Christoph Egger wrote: > > > > @@ -32,8 +32,9 @@ > > > > #define SUPERBLOCK ((struct fs *)(FSYS_BUF + 0x2000)) > > > > #define INODE ((struct icommon *)(FSYS_BUF + 0x1000)) > > > > #define DIRENT (FSYS_BUF + 0x4000) > > > > +#define MAXBSIZE ((FSYS_BUFLEN - 0x4000) / 2) > > > > #define INDIRBLK1 ((grub_daddr32_t *)(FSYS_BUF + 0x4000)) /* 2+ > > > > indirblk > > > > */ > > > > > > -#define INDIRBLK0 ((grub_daddr32_t *)(FSYS_BUF+ 0x6000)) /* 1st > > > > indirect blk */ > > > > > > +#define INDIRBLK0 ((grub_daddr32_t *)(FSYS_BUF+ 0x4000 + MAXBSIZE)= )=20 > > > > /* > > > > 1st indirect blk */ > > > > > This is a no-op, right? > > > > No, FSYS_BUFLEN is used now which wasn't before. > > Ooops, I mis-read the value of FSYS_BUFLEN. So you need this because > indirect blocks don't fit in the original space available? Yes. Also to reach alternative/other superblocks. Just imagine, the guest=20 crashed and the filesystem wasn't cleanly unmounted. Christoph =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy