You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.7 KiB
67 lines
1.7 KiB
From 9e43c34535bb72edc4a3a30e14b7d22b54c468cb Mon Sep 17 00:00:00 2001 |
|
From: "Darrick J. Wong" <darrick.wong@oracle.com> |
|
Date: Fri, 26 Apr 2019 15:40:19 -0500 |
|
Subject: [PATCH] xfs_db: refactor metadump handling of multi-fsb objects |
|
|
|
Separate the multi-fsb object dispatch from actual dir block processing |
|
so that we can implement symlink handling correctly as a multi-fsb file. |
|
|
|
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> |
|
Reviewed-by: Eric Sandeen <sandeen@redhat.com> |
|
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> |
|
--- |
|
db/metadump.c | 27 ++++++++++++++++++--------- |
|
1 file changed, 18 insertions(+), 9 deletions(-) |
|
|
|
Index: xfsprogs-4.5.0/db/metadump.c |
|
=================================================================== |
|
--- xfsprogs-4.5.0.orig/db/metadump.c |
|
+++ xfsprogs-4.5.0/db/metadump.c |
|
@@ -1695,7 +1695,7 @@ static struct bbmap mfsb_map; |
|
static int mfsb_length; |
|
|
|
static int |
|
-process_multi_fsb_objects( |
|
+process_multi_fsb_dir( |
|
xfs_fileoff_t o, |
|
xfs_fsblock_t s, |
|
xfs_filblks_t c, |
|
@@ -1704,14 +1704,6 @@ process_multi_fsb_objects( |
|
{ |
|
int ret = 0; |
|
|
|
- switch (btype) { |
|
- case TYP_DIR2: |
|
- break; |
|
- default: |
|
- print_warning("bad type for multi-fsb object %d", btype); |
|
- return -EINVAL; |
|
- } |
|
- |
|
while (c > 0) { |
|
unsigned int bm_len; |
|
|
|
@@ -1765,6 +1757,23 @@ out_pop: |
|
return ret; |
|
} |
|
|
|
+static int |
|
+process_multi_fsb_objects( |
|
+ xfs_fileoff_t o, |
|
+ xfs_fsblock_t s, |
|
+ xfs_filblks_t c, |
|
+ typnm_t btype, |
|
+ xfs_fileoff_t last) |
|
+{ |
|
+ switch (btype) { |
|
+ case TYP_DIR2: |
|
+ return process_multi_fsb_dir(o, s, c, btype, last); |
|
+ default: |
|
+ print_warning("bad type for multi-fsb object %d", btype); |
|
+ return -EINVAL; |
|
+ } |
|
+} |
|
+ |
|
/* inode copy routines */ |
|
static int |
|
process_bmbt_reclist(
|
|
|