diff mbox

[31/39] mds: unfreeze subtree if import aborts in PREPPED state

Message ID 1363531902-24909-32-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng March 17, 2013, 2:51 p.m. UTC
From: "Yan, Zheng" <zheng.z.yan@intel.com>

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 src/mds/Migrator.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Gregory Farnum March 21, 2013, 3:27 a.m. UTC | #1
Reviewed-by: Greg Farnum <greg@inktank.com>

On Sun, Mar 17, 2013 at 7:51 AM, Yan, Zheng <zheng.z.yan@intel.com> wrote:
> From: "Yan, Zheng" <zheng.z.yan@intel.com>
>
> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
> ---
>  src/mds/Migrator.cc | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc
> index 143d71e..963706c 100644
> --- a/src/mds/Migrator.cc
> +++ b/src/mds/Migrator.cc
> @@ -1658,11 +1658,14 @@ void Migrator::handle_export_cancel(MExportDirCancel *m)
>      CInode *in = cache->get_inode(df.ino);
>      assert(in);
>      import_reverse_discovered(df, in);
> -  } else if (import_state[df] == IMPORT_PREPPING ||
> -            import_state[df] == IMPORT_PREPPED) {
> +  } else if (import_state[df] == IMPORT_PREPPING) {
>      CDir *dir = mds->mdcache->get_dirfrag(df);
>      assert(dir);
>      import_reverse_prepping(dir);
> +  } else if (import_state[df] == IMPORT_PREPPED) {
> +    CDir *dir = mds->mdcache->get_dirfrag(df);
> +    assert(dir);
> +    import_reverse_unfreeze(dir);
>    } else {
>      assert(0 == "got export_cancel in weird state");
>    }
> --
> 1.7.11.7
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc
index 143d71e..963706c 100644
--- a/src/mds/Migrator.cc
+++ b/src/mds/Migrator.cc
@@ -1658,11 +1658,14 @@  void Migrator::handle_export_cancel(MExportDirCancel *m)
     CInode *in = cache->get_inode(df.ino);
     assert(in);
     import_reverse_discovered(df, in);
-  } else if (import_state[df] == IMPORT_PREPPING ||
-	     import_state[df] == IMPORT_PREPPED) {
+  } else if (import_state[df] == IMPORT_PREPPING) {
     CDir *dir = mds->mdcache->get_dirfrag(df);
     assert(dir);
     import_reverse_prepping(dir);
+  } else if (import_state[df] == IMPORT_PREPPED) {
+    CDir *dir = mds->mdcache->get_dirfrag(df);
+    assert(dir);
+    import_reverse_unfreeze(dir);
   } else {
     assert(0 == "got export_cancel in weird state");
   }