#include <linux/ceph/ceph_debug.h>
#include <linux/file.h>
#include <linux/namei.h>
#include <linux/random.h>
#include "super.h"
#include "mds_client.h"
#include <linux/filelock.h>
#include <linux/ceph/pagelist.h>
static u64 lock_secret;
static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc,
struct ceph_mds_request *req);
static inline u64 secure_addr(void *addr)
{ … }
void __init ceph_flock_init(void)
{ … }
static void ceph_fl_copy_lock(struct file_lock *dst, struct file_lock *src)
{ … }
static void ceph_fl_release_lock(struct file_lock *fl)
{ … }
static const struct file_lock_operations ceph_fl_lock_ops = …;
static int ceph_lock_message(u8 lock_type, u16 operation, struct inode *inode,
int cmd, u8 wait, struct file_lock *fl)
{ … }
static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc,
struct ceph_mds_request *req)
{ … }
static int try_unlock_file(struct file *file, struct file_lock *fl)
{ … }
int ceph_lock(struct file *file, int cmd, struct file_lock *fl)
{ … }
int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
{ … }
void ceph_count_locks(struct inode *inode, int *fcntl_count, int *flock_count)
{ … }
static int lock_to_ceph_filelock(struct inode *inode,
struct file_lock *lock,
struct ceph_filelock *cephlock)
{ … }
int ceph_encode_locks_to_buffer(struct inode *inode,
struct ceph_filelock *flocks,
int num_fcntl_locks, int num_flock_locks)
{ … }
int ceph_locks_to_pagelist(struct ceph_filelock *flocks,
struct ceph_pagelist *pagelist,
int num_fcntl_locks, int num_flock_locks)
{ … }