similarity index 100%
rename from fs/lustre/llite/range_lock.h
rename to fs/lustre/include/range_lock.h
@@ -3,7 +3,7 @@ ccflags-y += -I$(srctree)/$(src)/../include
obj-$(CONFIG_LUSTRE_FS) += lustre.o
lustre-y := dcache.o dir.o file.o llite_lib.o llite_nfs.o \
- rw.o rw26.o namei.o symlink.o llite_mmap.o range_lock.o \
+ rw.o rw26.o namei.o symlink.o llite_mmap.o \
xattr.o xattr_cache.o xattr_security.o \
super25.o statahead.o glimpse.o lcommon_cl.o lcommon_misc.o \
vvp_dev.o vvp_page.o vvp_io.o vvp_object.o \
@@ -45,12 +45,12 @@
#include <lustre_intent.h>
#include <linux/compat.h>
#include <lustre_crypto.h>
+#include <range_lock.h>
#include <linux/namei.h>
#include <linux/xattr.h>
#include <linux/posix_acl_xattr.h>
#include "vvp_internal.h"
-#include "range_lock.h"
#include "pcc.h"
/** Only used on client-side for indicating the tail of dir hash/offset. */
@@ -8,4 +8,5 @@ obdclass-y := llog.o llog_cat.o llog_obd.o llog_swab.o class_obd.o \
lustre_handles.o lustre_peer.o statfs_pack.o linkea.o \
obdo.o obd_config.o obd_mount.o lu_object.o lu_ref.o \
cl_object.o cl_page.o cl_lock.o cl_io.o kernelcomm.o \
- jobid.o integrity.o obd_cksum.o lu_tgt_descs.o
+ jobid.o integrity.o obd_cksum.o lu_tgt_descs.o \
+ range_lock.o
similarity index 96%
rename from fs/lustre/llite/range_lock.c
rename to fs/lustre/obdclass/range_lock.c
@@ -35,8 +35,8 @@
* Author: Bobi Jam <bobijam.xu@intel.com>
*/
#include <linux/sched/signal.h>
-#include "range_lock.h"
#include <uapi/linux/lustre/lustre_idl.h>
+#include <range_lock.h>
#include <linux/libcfs/libcfs.h>
#include <linux/interval_tree_generic.h>
@@ -59,6 +59,7 @@ void range_lock_tree_init(struct range_lock_tree *tree)
tree->rlt_sequence = 0;
spin_lock_init(&tree->rlt_lock);
}
+EXPORT_SYMBOL(range_lock_tree_init);
/**
* Initialize a range lock node
@@ -86,6 +87,7 @@ int range_lock_init(struct range_lock *lock, u64 start, u64 end)
lock->rl_sequence = 0;
return 0;
}
+EXPORT_SYMBOL(range_lock_init);
/**
* Unlock a range lock, wake up locks blocked by this lock.
@@ -117,6 +119,7 @@ void range_unlock(struct range_lock_tree *tree, struct range_lock *lock)
spin_unlock(&tree->rlt_lock);
}
+EXPORT_SYMBOL(range_unlock);
/**
* Lock a region
@@ -167,3 +170,4 @@ int range_lock(struct range_lock_tree *tree, struct range_lock *lock)
out:
return rc;
}
+EXPORT_SYMBOL(range_lock);