xfs
[Top] [All Lists]

Re: [PATCH V3] xfsrestore: fix fs uuid order check for incremental resto

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH V3] xfsrestore: fix fs uuid order check for incremental restores
From: Rich Johnston <rjohnston@xxxxxxx>
Date: Fri, 11 Sep 2015 12:01:34 -0500
Cc: <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20150908124726.GA5305@xxxxxxxxxxxxxxx>
References: <20150826213133.GB3902@dastard> <55D5FB95.1280108@xxxxxxx> <20150902132112.GB23587@xxxxxxxxxxxxxxx> <20150903234346.2473A600006AF@xxxxxxxxxxxxxxxxxxxxxxx> <20150908124726.GA5305@xxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
On 09/08/2015 07:47 AM, Brian Foster wrote:
On Thu, Sep 03, 2015 at 06:43:46PM -0500, Rich Johnston wrote:
Restoring an incremental level 1 dump will fail with the following error
if the fs uuid of the most recent level 0 dump in the inventory does not
match level 1 dump we are restoring.

...

Index: b/inventory/inv_api.c
===================================================================
--- a/inventory/inv_api.c
+++ b/inventory/inv_api.c
@@ -596,69 +596,78 @@ inv_free_session(

...


-       return invmgr_query_all_sessions((void *) &level, /* in */
-                                        (void **) ses,   /* out */
-                              (search_callback_t) lastsess_level_lessthan);
+       return invmgr_query_all_sessions(fsidp           /* fs uuid */

This doesn't compile because of a missing comma after fsidp above.

My mistake, happened while cleaning up whitespace.
...

Index: b/inventory/inv_mgr.c
===================================================================
--- a/inventory/inv_mgr.c
+++ b/inventory/inv_mgr.c

...

@@ -178,26 +180,27 @@ invmgr_query_all_sessions (
                             "INV: Open failed on %s\n"),
                             fname
                             );
-                       return BOOL_FALSE;
+                       continue;
                }
-               result = search_invt( invfd, inarg, &objectfound, func );
+               result = search_invt(fsidp, invfd, inarg, &objectfound, func);
                close(invfd);           

                /* if error return BOOL_FALSE */
                if (result < 0) {
-                       return BOOL_FALSE;
+                       return ret;

Should this always return false? It's now possible to return true if an
error occurs after we've found one object.

*nod* Thanks I missed that one.

I'll have a V4 out shortly.

--Rich

The rest seems Ok to me.

Brian


<Prev in Thread] Current Thread [Next in Thread>