/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2010 Whamcloud, Inc
+ *
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Limit size of nolock requests, in bytes.
*/
unsigned ns_max_nolock_size;
+
+ /**
+ * Limit of parallel AST RPC count.
+ */
+ unsigned ns_max_parallel_ast;
+
/* callback to cancel locks before replaying it during recovery */
ldlm_cancel_for_recovery ns_cancel_for_recovery;
/**
* in the same RPC */
} ldlm_cancel_flags_t;
+struct ldlm_flock {
+ __u64 start;
+ __u64 end;
+ __u64 owner;
+ __u64 blocking_owner;
+ void *blocking_export;
+ __u32 pid;
+};
+
+typedef union {
+ struct ldlm_extent l_extent;
+ struct ldlm_flock l_flock;
+ struct ldlm_inodebits l_inodebits;
+} ldlm_policy_data_t;
+
+void ldlm_convert_policy_to_wire(ldlm_type_t type,
+ const ldlm_policy_data_t *lpolicy,
+ ldlm_wire_policy_data_t *wpolicy);
+void ldlm_convert_policy_to_local(ldlm_type_t type,
+ const ldlm_wire_policy_data_t *wpolicy,
+ ldlm_policy_data_t *lpolicy);
+
struct ldlm_lock {
/**
* Must be first in the structure.
struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *, int flags);
void ldlm_cancel_callback(struct ldlm_lock *);
int ldlm_lock_remove_from_lru(struct ldlm_lock *);
+int ldlm_lock_set_data(struct lustre_handle *, void *);
static inline struct ldlm_lock *ldlm_handle2lock(const struct lustre_handle *h)
{