]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: ptlrpc: use unified handler for OST requests
authorMikhail Pershin <mike.pershin@intel.com>
Thu, 28 Apr 2016 01:37:12 +0000 (21:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 04:53:18 +0000 (21:53 -0700)
Switch OST/OFD request processing to the unified request
handle.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467
Reviewed-on: http://review.whamcloud.com/7130
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_req_layout.h
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/ptlrpc/layout.c

index b2e67fcf9ef165bee6e7a1acf940f5fbdceee2bd..b0bc751dd5870015e3d28f07e3febf58388486a0 100644 (file)
@@ -199,7 +199,7 @@ extern struct req_format RQF_OST_BRW_READ;
 extern struct req_format RQF_OST_BRW_WRITE;
 extern struct req_format RQF_OST_STATFS;
 extern struct req_format RQF_OST_SET_GRANT_INFO;
-extern struct req_format RQF_OST_GET_INFO_GENERIC;
+extern struct req_format RQF_OST_GET_INFO;
 extern struct req_format RQF_OST_GET_INFO_LAST_ID;
 extern struct req_format RQF_OST_GET_INFO_LAST_FID;
 extern struct req_format RQF_OST_SET_INFO_LAST_FID;
index c7267b7d409819d367e72ba158539b87d7d888dd..2aaa343e808ea607cb80cb164f170990895bce6e 100644 (file)
@@ -290,6 +290,7 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_OST_ENOINO          0x229
 #define OBD_FAIL_OST_DQACQ_NET    0x230
 #define OBD_FAIL_OST_STATFS_EINPROGRESS  0x231
+#define OBD_FAIL_OST_SET_INFO_NET              0x232
 
 #define OBD_FAIL_LDLM              0x300
 #define OBD_FAIL_LDLM_NAMESPACE_NEW      0x301
index 5b06901e5729f0173b53b09c143bf6be3565c771..ccc1f3e07ebcb2ca0c1f0ec935072d89808e82e5 100644 (file)
@@ -566,7 +566,7 @@ static const struct req_msg_field *ost_get_info_generic_server[] = {
 
 static const struct req_msg_field *ost_get_info_generic_client[] = {
        &RMF_PTLRPC_BODY,
-       &RMF_SETINFO_KEY
+       &RMF_GETINFO_KEY
 };
 
 static const struct req_msg_field *ost_get_last_id_server[] = {
@@ -574,6 +574,12 @@ static const struct req_msg_field *ost_get_last_id_server[] = {
        &RMF_OBD_ID
 };
 
+static const struct req_msg_field *ost_get_last_fid_client[] = {
+       &RMF_PTLRPC_BODY,
+       &RMF_GETINFO_KEY,
+       &RMF_FID,
+};
+
 static const struct req_msg_field *ost_get_last_fid_server[] = {
        &RMF_PTLRPC_BODY,
        &RMF_FID,
@@ -696,7 +702,7 @@ static struct req_format *req_formats[] = {
        &RQF_OST_BRW_WRITE,
        &RQF_OST_STATFS,
        &RQF_OST_SET_GRANT_INFO,
-       &RQF_OST_GET_INFO_GENERIC,
+       &RQF_OST_GET_INFO,
        &RQF_OST_GET_INFO_LAST_ID,
        &RQF_OST_GET_INFO_LAST_FID,
        &RQF_OST_SET_INFO_LAST_FID,
@@ -1519,10 +1525,10 @@ struct req_format RQF_OST_SET_GRANT_INFO =
                        ost_body_only);
 EXPORT_SYMBOL(RQF_OST_SET_GRANT_INFO);
 
-struct req_format RQF_OST_GET_INFO_GENERIC =
+struct req_format RQF_OST_GET_INFO =
        DEFINE_REQ_FMT0("OST_GET_INFO", ost_get_info_generic_client,
                        ost_get_info_generic_server);
-EXPORT_SYMBOL(RQF_OST_GET_INFO_GENERIC);
+EXPORT_SYMBOL(RQF_OST_GET_INFO);
 
 struct req_format RQF_OST_GET_INFO_LAST_ID =
        DEFINE_REQ_FMT0("OST_GET_INFO_LAST_ID", ost_get_info_generic_client,
@@ -1530,7 +1536,7 @@ struct req_format RQF_OST_GET_INFO_LAST_ID =
 EXPORT_SYMBOL(RQF_OST_GET_INFO_LAST_ID);
 
 struct req_format RQF_OST_GET_INFO_LAST_FID =
-       DEFINE_REQ_FMT0("OST_GET_INFO_LAST_FID", obd_set_info_client,
+       DEFINE_REQ_FMT0("OST_GET_INFO_LAST_FID", ost_get_last_fid_client,
                        ost_get_last_fid_server);
 EXPORT_SYMBOL(RQF_OST_GET_INFO_LAST_FID);