linux/fs/pstore/inode.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Persistent Storage - ramfs parts.
 *
 * Copyright (C) 2010 Intel Corporation <[email protected]>
 */

#include <linux/module.h>
#include <linux/fs.h>
#include <linux/fsnotify.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/time.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/string.h>
#include <linux/mount.h>
#include <linux/seq_file.h>
#include <linux/ramfs.h>
#include <linux/parser.h>
#include <linux/sched.h>
#include <linux/magic.h>
#include <linux/pstore.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/cleanup.h>

#include "internal.h"

#define PSTORE_NAMELEN

static DEFINE_MUTEX(records_list_lock);
static LIST_HEAD(records_list);

static DEFINE_MUTEX(pstore_sb_lock);
static struct super_block *pstore_sb;

DEFINE_FREE()

struct pstore_private {};

struct pstore_ftrace_seq_data {};

#define REC_SIZE

static void free_pstore_private(struct pstore_private *private)
{}
DEFINE_FREE(pstore_private, struct pstore_private *, free_pstore_private(_T));

static void *pstore_ftrace_seq_start(struct seq_file *s, loff_t *pos)
{}

static void pstore_ftrace_seq_stop(struct seq_file *s, void *v)
{}

static void *pstore_ftrace_seq_next(struct seq_file *s, void *v, loff_t *pos)
{}

static int pstore_ftrace_seq_show(struct seq_file *s, void *v)
{}

static const struct seq_operations pstore_ftrace_seq_ops =;

static ssize_t pstore_file_read(struct file *file, char __user *userbuf,
						size_t count, loff_t *ppos)
{}

static int pstore_file_open(struct inode *inode, struct file *file)
{}

static loff_t pstore_file_llseek(struct file *file, loff_t off, int whence)
{}

static const struct file_operations pstore_file_operations =;

/*
 * When a file is unlinked from our file system we call the
 * platform driver to erase the record from persistent store.
 */
static int pstore_unlink(struct inode *dir, struct dentry *dentry)
{}

static void pstore_evict_inode(struct inode *inode)
{}

static const struct inode_operations pstore_dir_inode_operations =;

static struct inode *pstore_get_inode(struct super_block *sb)
{}

enum {};

static const match_table_t tokens =;

static void parse_options(char *options)
{}

/*
 * Display the mount options in /proc/mounts.
 */
static int pstore_show_options(struct seq_file *m, struct dentry *root)
{}

static int pstore_remount(struct super_block *sb, int *flags, char *data)
{}

static const struct super_operations pstore_ops =;

static struct dentry *psinfo_lock_root(void)
{}

int pstore_put_backend_records(struct pstore_info *psi)
{}

/*
 * Make a regular file in the root directory of our file system.
 * Load it up with "size" bytes of data from "buf".
 * Set the mtime & ctime to the date that this record was originally stored.
 */
int pstore_mkfile(struct dentry *root, struct pstore_record *record)
{}

/*
 * Read all the records from the persistent store. Create
 * files in our filesystem.  Don't warn about -EEXIST errors
 * when we are re-scanning the backing store looking to add new
 * error records.
 */
void pstore_get_records(int quiet)
{}

static int pstore_fill_super(struct super_block *sb, void *data, int silent)
{}

static struct dentry *pstore_mount(struct file_system_type *fs_type,
	int flags, const char *dev_name, void *data)
{}

static void pstore_kill_sb(struct super_block *sb)
{}

static struct file_system_type pstore_fs_type =;

int __init pstore_init_fs(void)
{}

void __exit pstore_exit_fs(void)
{}