From: David Chinner <dgc@sgi.com>
To: xfs-dev <xfs-dev@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [hack] allow xfsrestore to run on 64k page size machines
Date: Thu, 22 May 2008 16:15:19 +1000 [thread overview]
Message-ID: <20080522061519.GT173056135@sgi.com> (raw)
xfsrestore has assumptions about page size built into the inode hunk
size in the dump format. Seems to be a stupid thing to do - this
patch simply comments out the asserts to allow it to work on
64k page size machine, but probably subtly breaks the code.
Nasty hack, really, but allows xfsqa tests to pass.
Not-Signed-off-by: Dave Chinner <dgc@sgi.com>
---
xfsdump/restore/inomap.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: xfs-cmds/xfsdump/restore/inomap.c
===================================================================
--- xfs-cmds.orig/xfsdump/restore/inomap.c 2006-11-14 19:57:32.000000000 +1100
+++ xfs-cmds/xfsdump/restore/inomap.c 2008-05-13 10:34:05.963909158 +1000
@@ -197,8 +197,8 @@ inomap_restore_pers( drive_t *drivep,
*/
ASSERT( INOPERSEG == ( sizeof( (( seg_t * )0 )->lobits ) * NBBY ));
ASSERT( sizeof( hnk_t ) == HNKSZ );
- ASSERT( HNKSZ >= pgsz );
- ASSERT( ! ( HNKSZ % pgsz ));
+ //ASSERT( HNKSZ >= pgsz );
+ //ASSERT( ! ( HNKSZ % pgsz ));
ASSERT( sizeof( pers_t ) <= PERSSZ );
/* get inomap info from media hdr
@@ -224,8 +224,8 @@ inomap_restore_pers( drive_t *drivep,
/* mmap the persistent hdr and space for the map
*/
- ASSERT( sizeof( hnk_t ) * ( size_t )hnkcnt >= pgsz );
- ASSERT( ! ( sizeof( hnk_t ) * ( size_t )hnkcnt % pgsz ));
+ //ASSERT( sizeof( hnk_t ) * ( size_t )hnkcnt >= pgsz );
+ //ASSERT( ! ( sizeof( hnk_t ) * ( size_t )hnkcnt % pgsz ));
persp = ( pers_t * ) mmap_autogrow(
PERSSZ
+
@@ -355,8 +355,8 @@ inomap_sync_pers( char *hkdir )
/* sanity checks
*/
ASSERT( sizeof( hnk_t ) == HNKSZ );
- ASSERT( HNKSZ >= pgsz );
- ASSERT( ! ( HNKSZ % pgsz ));
+ //ASSERT( HNKSZ >= pgsz );
+ //ASSERT( ! ( HNKSZ % pgsz ));
/* only needed once per session
*/
reply other threads:[~2008-05-22 6:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080522061519.GT173056135@sgi.com \
--to=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox