Whamcloud - gitweb
- fixed bug in seq_server_init(), there should be separate portal for data stack.
authoryury <yury>
Fri, 11 Aug 2006 11:39:54 +0000 (11:39 +0000)
committeryury <yury>
Fri, 11 Aug 2006 11:39:54 +0000 (11:39 +0000)
lustre/fid/fid_handler.c
lustre/fid/fid_request.c
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_fid.h
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c

index 8aabf4d..6d058da 100644 (file)
@@ -465,17 +465,16 @@ int seq_server_init(struct lu_server_seq *seq,
                     enum lu_mgr_type type,
                     const struct lu_context *ctx)
 {
-        int is_srv = type == LUSTRE_SEQ_SERVER;
+        int rc, is_srv = (type == LUSTRE_SEQ_SERVER);
         
-        int rc, req_portal = is_srv ?
-                SEQ_SERVER_PORTAL : SEQ_CONTROLLER_PORTAL;
-
         struct ptlrpc_service_conf seq_md_conf = {
                 .psc_nbufs = MDS_NBUFS,
                 .psc_bufsize = MDS_BUFSIZE,
                 .psc_max_req_size = SEQ_MAXREQSIZE,
                 .psc_max_reply_size = SEQ_MAXREPSIZE,
-                .psc_req_portal = req_portal,
+                .psc_req_portal = (is_srv ?
+                                   SEQ_METADATA_PORTAL :
+                                   SEQ_CONTROLLER_PORTAL),
                 .psc_rep_portal = MDC_REPLY_PORTAL,
                 .psc_watchdog_timeout = SEQ_SERVICE_WATCHDOG_TIMEOUT,
                 .psc_num_threads = SEQ_NUM_THREADS,
@@ -486,7 +485,7 @@ int seq_server_init(struct lu_server_seq *seq,
                 .psc_bufsize = MDS_BUFSIZE,
                 .psc_max_req_size = SEQ_MAXREQSIZE,
                 .psc_max_reply_size = SEQ_MAXREPSIZE,
-                .psc_req_portal = SEQ_SERVER_PORTAL,
+                .psc_req_portal = SEQ_DATA_PORTAL,
                 .psc_rep_portal = OSC_REPLY_PORTAL,
                 .psc_watchdog_timeout = SEQ_SERVICE_WATCHDOG_TIMEOUT,
                 .psc_num_threads = SEQ_NUM_THREADS,
index ed211cb..1283518 100644 (file)
@@ -76,8 +76,13 @@ static int seq_client_rpc(struct lu_client_seq *seq,
 
         req->rq_replen = lustre_msg_size(1, &repsize);
 
-        req->rq_request_portal = (opc == SEQ_ALLOC_SUPER) ?
-                SEQ_CONTROLLER_PORTAL : SEQ_SERVER_PORTAL;
+        if (seq->lcs_type == LUSTRE_SEQ_METADATA) {
+                req->rq_request_portal = (opc == SEQ_ALLOC_SUPER) ?
+                        SEQ_CONTROLLER_PORTAL : SEQ_METADATA_PORTAL;
+        } else {
+                req->rq_request_portal = (opc == SEQ_ALLOC_SUPER) ?
+                        SEQ_CONTROLLER_PORTAL : SEQ_DATA_PORTAL;
+        }
 
         rc = ptlrpc_queue_wait(req);
         if (rc)
@@ -300,13 +305,15 @@ static void seq_client_proc_fini(struct lu_client_seq *seq)
 
 int seq_client_init(struct lu_client_seq *seq,
                     const char *uuid,
-                    struct obd_export *exp)
+                    struct obd_export *exp,
+                    enum lu_cli_type type)
 {
         int rc = 0;
         ENTRY;
 
         LASSERT(exp != NULL);
 
+        seq->lcs_type = type;
         fid_zero(&seq->lcs_fid);
         range_zero(&seq->lcs_range);
         sema_init(&seq->lcs_sem, 1);
index 91d07f3..8b0b19d 100644 (file)
@@ -98,8 +98,9 @@
 #define MGS_REPLY_PORTAL               27
 #define OST_REQUEST_PORTAL             28
 #define FLD_REQUEST_PORTAL             29
-#define SEQ_SERVER_PORTAL              30
-#define SEQ_CONTROLLER_PORTAL          31
+#define SEQ_METADATA_PORTAL            30
+#define SEQ_DATA_PORTAL                31
+#define SEQ_CONTROLLER_PORTAL          32
 
 #define SVC_KILLED               1
 #define SVC_EVENT                2
index 829c0f3..527e2b4 100644 (file)
@@ -56,6 +56,11 @@ enum lu_mgr_type {
         LUSTRE_SEQ_CONTROLLER
 };
 
+enum lu_cli_type {
+        LUSTRE_SEQ_METADATA,
+        LUSTRE_SEQ_DATA
+};
+
 /* client sequence manager interface */
 struct lu_client_seq {
         /* sequence-controller export. */
@@ -73,6 +78,9 @@ struct lu_client_seq {
         /* this holds last allocated fid in last obtained seq */
         struct lu_fid           lcs_fid;
 
+        /* LUSTRE_SEQ_METADATA or LUSTRE_SEQ_DATA */
+        enum lu_cli_type        lcs_type;
+
         /* service uuid, passed from MDT + seq name to form unique seq name to
          * use it with procfs. */
         char                    lcs_name[80];
@@ -147,7 +155,8 @@ int seq_server_set_cli(struct lu_server_seq *seq,
 
 int seq_client_init(struct lu_client_seq *seq,
                     const char *uuid,
-                    struct obd_export *exp);
+                    struct obd_export *exp,
+                    enum lu_cli_type type);
 
 void seq_client_fini(struct lu_client_seq *seq);
 
index 1e9f981..74cf5a5 100644 (file)
@@ -1107,7 +1107,8 @@ static int mdc_fid_init(struct obd_export *exp)
 
         /* init client side sequence-manager */
         rc = seq_client_init(cli->cl_seq,
-                             exp->exp_obd->obd_name, exp);
+                             exp->exp_obd->obd_name,
+                             exp, LUSTRE_SEQ_METADATA);
         if (rc)
                 GOTO(out_free_seq, rc);
 
index a95859c..91a9883 100644 (file)
@@ -1886,7 +1886,8 @@ static int mdt_seq_init_cli(const struct lu_context *ctx,
                         if (ls->ls_client_seq != NULL) {
                                 rc = seq_client_init(ls->ls_client_seq,
                                                      mdc->obd_name,
-                                                     ls->ls_client_exp);
+                                                     ls->ls_client_exp,
+                                                     LUSTRE_SEQ_METADATA);
                         } else
                                 rc = -ENOMEM;