Whamcloud - gitweb
LU-1445 osp: Use FID to track precreate cache.
[fs/lustre-release.git] / lustre / ptlrpc / layout.c
index f696827..14891eb 100644 (file)
@@ -570,6 +570,11 @@ static const struct req_msg_field *ost_get_last_id_server[] = {
         &RMF_OBD_ID
 };
 
+static const struct req_msg_field *ost_get_last_fid_server[] = {
+       &RMF_PTLRPC_BODY,
+       &RMF_FID
+};
+
 static const struct req_msg_field *ost_get_fiemap_client[] = {
         &RMF_PTLRPC_BODY,
         &RMF_FIEMAP_KEY,
@@ -637,6 +642,8 @@ static struct req_format *req_formats[] = {
         &RQF_OST_SET_GRANT_INFO,
         &RQF_OST_GET_INFO_GENERIC,
         &RQF_OST_GET_INFO_LAST_ID,
+       &RQF_OST_GET_INFO_LAST_FID,
+       &RQF_OST_SET_INFO_LAST_FID,
         &RQF_OST_GET_INFO_FIEMAP,
         &RQF_LDLM_ENQUEUE,
         &RQF_LDLM_ENQUEUE_LVB,
@@ -978,6 +985,11 @@ struct req_msg_field RMF_OBD_ID =
                     sizeof(obd_id), lustre_swab_ost_last_id, NULL);
 EXPORT_SYMBOL(RMF_OBD_ID);
 
+struct req_msg_field RMF_FID =
+       DEFINE_MSGF("fid", 0,
+                   sizeof(struct lu_fid), lustre_swab_lu_fid, NULL);
+EXPORT_SYMBOL(RMF_FID);
+
 struct req_msg_field RMF_FIEMAP_KEY =
         DEFINE_MSGF("fiemap", 0, sizeof(struct ll_fiemap_info_key),
                     lustre_swab_fiemap, NULL);
@@ -1391,6 +1403,16 @@ struct req_format RQF_OST_GET_INFO_LAST_ID =
                                                 ost_get_last_id_server);
 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,
+                                                ost_get_last_fid_server);
+EXPORT_SYMBOL(RQF_OST_GET_INFO_LAST_FID);
+
+struct req_format RQF_OST_SET_INFO_LAST_FID =
+       DEFINE_REQ_FMT0("OST_SET_INFO_LAST_FID", obd_set_info_client,
+                                                empty);
+EXPORT_SYMBOL(RQF_OST_SET_INFO_LAST_FID);
+
 struct req_format RQF_OST_GET_INFO_FIEMAP =
         DEFINE_REQ_FMT0("OST_GET_INFO_FIEMAP", ost_get_fiemap_client,
                                                ost_get_fiemap_server);