]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
dump: don't fail if multi-file dumps don't all contain quota info
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 1 Nov 2018 23:19:27 +0000 (16:19 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 4 Nov 2018 16:42:49 +0000 (00:42 +0800)
When xfsdump is making multi-file dumps, the quota information are
written into the last dump file.  However, the multi-file restore script
(as written) expects to see quota information restored by every dump
file and fails.  This is silly, so fix it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/dump

index b6b7fb46b236c364f0488175b755caae36dcb1aa..c45b8a5a6b34e251d67e08395f56acb4cb9c316a 100644 (file)
@@ -1432,16 +1432,19 @@ _check_quota()
                            print "Found extra:", $0
                        }
                        next
+       }
+       $0 ~ "Restore Status: INCOMPLETE" {
+                       incomplete = 1
        }
                        { print }
        END {
-               if (uquota && !found_uquota) {
+               if (uquota && !found_uquota && !incomplete) {
                    print "Missing user quota msg:", usermsg
                }
-               if (gquota && !found_gquota) {
+               if (gquota && !found_gquota && !incomplete) {
                    print "Missing group quota msg:", groupmsg
                }
-               if (pquota && !found_pquota) {
+               if (pquota && !found_pquota && !incomplete) {
                    print "Missing project quota msg:", projectmsg
                }
        }