From: Bill Kendall <wkendall@sgi.com>
To: xfs@oss.sgi.com
Cc: xfs-dev <xfs-dev@sgi.com>
Subject: [PATCH] xfsdump support for 64K page size
Date: Wed, 07 Jan 2009 09:10:39 -0600 [thread overview]
Message-ID: <4964C5EF.3060308@sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
Various fixes to allow xfsdump/xfsrestore to work with 64K
page size. This is essentially Chinner's patch from a while
back.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
[-- Attachment #2: 64k_pagesize --]
[-- Type: text/plain, Size: 2826 bytes --]
---
xfsdump/dump/content.c | 2 +-
xfsdump/restore/inomap.c | 6 ------
xfsprogs/libhandle/handle.c | 5 ++++-
xfsprogs/libhandle/jdm.c | 4 ++++
4 files changed, 9 insertions(+), 8 deletions(-)
Index: xfs-cmds/xfsdump/restore/inomap.c
===================================================================
--- xfs-cmds.orig/xfsdump/restore/inomap.c
+++ xfs-cmds/xfsdump/restore/inomap.c
@@ -197,8 +197,6 @@ 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( sizeof( pers_t ) <= PERSSZ );
/* get inomap info from media hdr
@@ -224,8 +222,6 @@ 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 ));
persp = ( pers_t * ) mmap_autogrow(
PERSSZ
+
@@ -355,8 +351,6 @@ inomap_sync_pers( char *hkdir )
/* sanity checks
*/
ASSERT( sizeof( hnk_t ) == HNKSZ );
- ASSERT( HNKSZ >= pgsz );
- ASSERT( ! ( HNKSZ % pgsz ));
/* only needed once per session
*/
Index: xfs-cmds/xfsdump/dump/content.c
===================================================================
--- xfs-cmds.orig/xfsdump/dump/content.c
+++ xfs-cmds/xfsdump/dump/content.c
@@ -210,7 +210,7 @@ typedef struct extent_group_context exte
/* minimum sizes for extended attributes buffers
*/
-#define EXTATTR_LISTBUF_SZ ( 4 * pgsz )
+#define EXTATTR_LISTBUF_SZ ( XATTR_LIST_MAX )
#define EXTATTR_RTRVARRAY_LEN ( 1 * pgsz )
#define EXTATTR_DUMPBUF_SZ ( 4 * pgsz )
Index: xfs-cmds/xfsprogs/libhandle/handle.c
===================================================================
--- xfs-cmds.orig/xfsprogs/libhandle/handle.c
+++ xfs-cmds/xfsprogs/libhandle/handle.c
@@ -360,8 +360,11 @@ attr_list_by_handle(
memcpy(&alhreq.pos, cursor, sizeof(alhreq.pos));
alhreq.flags = flags;
- alhreq.buflen = bufsize;
alhreq.buffer = buf;
+ alhreq.buflen = bufsize;
+ /* prevent needless EINVAL from the kernel */
+ if (alhreq.buflen > XATTR_LIST_MAX)
+ alhreq.buflen = XATTR_LIST_MAX;
error = xfsctl(path, fd, XFS_IOC_ATTRLIST_BY_HANDLE, &alhreq);
Index: xfs-cmds/xfsprogs/libhandle/jdm.c
===================================================================
--- xfs-cmds.orig/xfsprogs/libhandle/jdm.c
+++ xfs-cmds/xfsprogs/libhandle/jdm.c
@@ -166,6 +166,10 @@ jdm_attr_list( jdm_fshandle_t *fshp,
filehandle_t filehandle;
int rval;
+ /* prevent needless EINVAL from the kernel */
+ if (bufsz > XATTR_LIST_MAX)
+ bufsz = XATTR_LIST_MAX;
+
jdm_fill_filehandle( &filehandle, fshandlep, statp );
rval = attr_list_by_handle (( void * )&filehandle,
sizeof( filehandle ),
[-- Attachment #3: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2009-01-07 15:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 15:10 Bill Kendall [this message]
2009-01-08 2:19 ` [PATCH] xfsdump support for 64K page size Mark Goodwin
2009-01-08 15:37 ` Christoph Hellwig
2009-01-08 22:28 ` Dave Chinner
2009-01-08 23:02 ` Eric Sandeen
2009-01-09 19:36 ` Bill Kendall
2009-01-09 19:41 ` Christoph Hellwig
2009-01-14 22:48 ` Dave Chinner
2009-01-15 18:59 ` Bill Kendall
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=4964C5EF.3060308@sgi.com \
--to=wkendall@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