[nfs-ganesha RFC PATCH v2 03/13] main: initialize recovery backend earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jeff Layton <jlayton@xxxxxxxxxx>

In a later patch, we're going to need to stall the server for a bit
before we can allow FSAL_CEPH to do reclaim. Move the initialization of
the recovery backend before the load of the exports table.

Change-Id: I0c92230b1a020c011b2cd123b900d30243b9ceae
Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 src/MainNFSD/nfs_init.c | 5 -----
 src/MainNFSD/nfs_lib.c  | 7 +++++++
 src/MainNFSD/nfs_main.c | 6 ++++++
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/MainNFSD/nfs_init.c b/src/MainNFSD/nfs_init.c
index 90e49dde9205..d4190ddc5911 100644
--- a/src/MainNFSD/nfs_init.c
+++ b/src/MainNFSD/nfs_init.c
@@ -794,11 +794,6 @@ static void nfs_Init(const nfs_start_info_t *p_start_info)
 	/* Save Ganesha thread credentials with Frank's routine for later use */
 	fsal_save_ganesha_credentials();
 
-	/* Create stable storage directory, this needs to be done before
-	 * starting the recovery thread.
-	 */
-	nfs4_recovery_init();
-
 	/* Start grace period */
 	nfs_start_grace(NULL);
 
diff --git a/src/MainNFSD/nfs_lib.c b/src/MainNFSD/nfs_lib.c
index 46fec8ba2968..d0e8cfe25038 100644
--- a/src/MainNFSD/nfs_lib.c
+++ b/src/MainNFSD/nfs_lib.c
@@ -43,6 +43,7 @@
 #include "nfs_exports.h"
 #include "pnfs_utils.h"
 #include "conf_url.h"
+#include "sal_functions.h"
 
 /**
  * @brief LTTng trace enabling magic
@@ -232,6 +233,12 @@ int nfs_libmain(const char *ganesha_conf,
 		goto fatal_die;
 	}
 
+
+	/* Create stable storage directory, this needs to be done before
+	 * starting the recovery thread.
+	 */
+	nfs4_recovery_init();
+
 	/* Load export entries from parsed file
 	 * returns the number of export entries.
 	 */
diff --git a/src/MainNFSD/nfs_main.c b/src/MainNFSD/nfs_main.c
index deacdef8bc80..652fb0da1ec2 100644
--- a/src/MainNFSD/nfs_main.c
+++ b/src/MainNFSD/nfs_main.c
@@ -45,6 +45,7 @@
 #include "pnfs_utils.h"
 #include "config_parsing.h"
 #include "conf_url.h"
+#include "sal_functions.h"
 
 /**
  * @brief LTTng trace enabling magic
@@ -478,6 +479,11 @@ int main(int argc, char *argv[])
 		goto fatal_die;
 	}
 
+	/* Create stable storage directory, this needs to be done before
+	 * starting the recovery thread.
+	 */
+	nfs4_recovery_init();
+
 	/* Load export entries from parsed file
 	 * returns the number of export entries.
 	 */
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux