Whamcloud - gitweb
LU-3285 mds: add IO locking to the MDC and MDT
[fs/lustre-release.git] / lustre / osc / osc_internal.h
index 7a86744..4fdfb13 100644 (file)
@@ -45,12 +45,14 @@ void osc_wake_cache_waiters(struct client_obd *cli);
 int osc_shrink_grant_to_target(struct client_obd *cli, __u64 target_bytes);
 void osc_update_next_shrink(struct client_obd *cli);
 int lru_queue_work(const struct lu_env *env, void *data);
+int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext,
+                     int sent, int rc);
+int osc_extent_release(const struct lu_env *env, struct osc_extent *ext);
+int osc_lock_discard_pages(const struct lu_env *env, struct osc_object *osc,
+                          pgoff_t start, pgoff_t end, bool discard);
 
 extern struct ptlrpc_request_set *PTLRPCD_SET;
 
-typedef int (*osc_enqueue_upcall_f)(void *cookie, struct lustre_handle *lockh,
-                                   int rc);
-
 int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
                     __u64 *flags, union ldlm_policy_data *policy,
                     struct ost_lvb *lvb, int kms_valid,
@@ -151,24 +153,12 @@ int osc_quotactl(struct obd_device *unused, struct obd_export *exp,
 void osc_inc_unstable_pages(struct ptlrpc_request *req);
 void osc_dec_unstable_pages(struct ptlrpc_request *req);
 bool osc_over_unstable_soft_limit(struct client_obd *cli);
-/**
- * Bit flags for osc_dlm_lock_at_pageoff().
- */
-enum osc_dap_flags {
-       /**
-        * Just check if the desired lock exists, it won't hold reference
-        * count on lock.
-        */
-       OSC_DAP_FL_TEST_LOCK = 1 << 0,
-       /**
-        * Return the lock even if it is being canceled.
-        */
-       OSC_DAP_FL_CANCELING = 1 << 1
-};
-struct ldlm_lock *osc_dlmlock_at_pgoff(const struct lu_env *env,
-                                      struct osc_object *obj, pgoff_t index,
-                                      enum osc_dap_flags flags);
-void osc_pack_req_body(struct ptlrpc_request *req, struct obdo *oa);
+
+struct ldlm_lock *osc_obj_dlmlock_at_pgoff(const struct lu_env *env,
+                                          struct osc_object *obj,
+                                          pgoff_t index,
+                                          enum osc_dap_flags flags);
+
 int osc_object_invalidate(const struct lu_env *env, struct osc_object *osc);
 
 /** osc shrink list to link all osc client obd */