linux/fs/ocfs2/dlmfs/userdlm.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * userdlm.c
 *
 * Code which implements the kernel side of a minimal userspace
 * interface to our DLM.
 *
 * Many of the functions here are pared down versions of dlmglue.c
 * functions.
 *
 * Copyright (C) 2003, 2004 Oracle.  All rights reserved.
 */

#include <linux/signal.h>
#include <linux/sched/signal.h>

#include <linux/module.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/crc32.h>

#include "../ocfs2_lockingver.h"
#include "../stackglue.h"
#include "userdlm.h"

#define MLOG_MASK_PREFIX
#include "../cluster/masklog.h"


static inline struct user_lock_res *user_lksb_to_lock_res(struct ocfs2_dlm_lksb *lksb)
{}

static inline int user_check_wait_flag(struct user_lock_res *lockres,
				       int flag)
{}

static inline void user_wait_on_busy_lock(struct user_lock_res *lockres)

{}

static inline void user_wait_on_blocked_lock(struct user_lock_res *lockres)

{}

/* I heart container_of... */
static inline struct ocfs2_cluster_connection *
cluster_connection_from_user_lockres(struct user_lock_res *lockres)
{}

static struct inode *
user_dlm_inode_from_user_lockres(struct user_lock_res *lockres)
{}

static inline void user_recover_from_dlm_error(struct user_lock_res *lockres)
{}

#define user_log_dlm_error(_func, _stat, _lockres)

/* WARNING: This function lives in a world where the only three lock
 * levels are EX, PR, and NL. It *will* have to be adjusted when more
 * lock types are added. */
static inline int user_highest_compat_lock_level(int level)
{}

static void user_ast(struct ocfs2_dlm_lksb *lksb)
{}

static inline void user_dlm_grab_inode_ref(struct user_lock_res *lockres)
{}

static void user_dlm_unblock_lock(struct work_struct *work);

static void __user_dlm_queue_lockres(struct user_lock_res *lockres)
{}

static void __user_dlm_cond_queue_lockres(struct user_lock_res *lockres)
{}

static void user_bast(struct ocfs2_dlm_lksb *lksb, int level)
{}

static void user_unlock_ast(struct ocfs2_dlm_lksb *lksb, int status)
{}

/*
 * This is the userdlmfs locking protocol version.
 *
 * See fs/ocfs2/dlmglue.c for more details on locking versions.
 */
static struct ocfs2_locking_protocol user_dlm_lproto =;

static inline void user_dlm_drop_inode_ref(struct user_lock_res *lockres)
{}

static void user_dlm_unblock_lock(struct work_struct *work)
{}

static inline void user_dlm_inc_holders(struct user_lock_res *lockres,
					int level)
{}

/* predict what lock level we'll be dropping down to on behalf
 * of another node, and return true if the currently wanted
 * level will be compatible with it. */
static inline int
user_may_continue_on_blocked_lock(struct user_lock_res *lockres,
				  int wanted)
{}

int user_dlm_cluster_lock(struct user_lock_res *lockres,
			  int level,
			  int lkm_flags)
{}

static inline void user_dlm_dec_holders(struct user_lock_res *lockres,
					int level)
{}

void user_dlm_cluster_unlock(struct user_lock_res *lockres,
			     int level)
{}

void user_dlm_write_lvb(struct inode *inode,
			const char *val,
			unsigned int len)
{}

bool user_dlm_read_lvb(struct inode *inode, char *val)
{}

void user_dlm_lock_res_init(struct user_lock_res *lockres,
			    struct dentry *dentry)
{}

int user_dlm_destroy_lock(struct user_lock_res *lockres)
{}

static void user_dlm_recovery_handler_noop(int node_num,
					   void *recovery_data)
{}

void user_dlm_set_locking_protocol(void)
{}

struct ocfs2_cluster_connection *user_dlm_register(const struct qstr *name)
{}

void user_dlm_unregister(struct ocfs2_cluster_connection *conn)
{}