linux/fs/cachefiles/ondemand.c

// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/anon_inodes.h>
#include <linux/uio.h>
#include "internal.h"

struct ondemand_anon_file {};

static inline void cachefiles_req_put(struct cachefiles_req *req)
{}

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

static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
						 struct iov_iter *iter)
{}

static loff_t cachefiles_ondemand_fd_llseek(struct file *filp, loff_t pos,
					    int whence)
{}

static long cachefiles_ondemand_fd_ioctl(struct file *filp, unsigned int ioctl,
					 unsigned long id)
{}

static const struct file_operations cachefiles_ondemand_fd_fops =;

/*
 * OPEN request Completion (copen)
 * - command: "copen <id>,<cache_size>"
 *   <cache_size> indicates the object size if >=0, error code if negative
 */
int cachefiles_ondemand_copen(struct cachefiles_cache *cache, char *args)
{}

int cachefiles_ondemand_restore(struct cachefiles_cache *cache, char *args)
{}

static int cachefiles_ondemand_get_fd(struct cachefiles_req *req,
				      struct ondemand_anon_file *anon_file)
{}

static void ondemand_object_worker(struct work_struct *work)
{}

/*
 * If there are any inflight or subsequent READ requests on the
 * closed object, reopen it.
 * Skip read requests whose related object is reopening.
 */
static struct cachefiles_req *cachefiles_ondemand_select_req(struct xa_state *xas,
							      unsigned long xa_max)
{}

static inline bool cachefiles_ondemand_finish_req(struct cachefiles_req *req,
						  struct xa_state *xas, int err)
{}

ssize_t cachefiles_ondemand_daemon_read(struct cachefiles_cache *cache,
					char __user *_buffer, size_t buflen)
{}

init_req_fn;

static int cachefiles_ondemand_send_req(struct cachefiles_object *object,
					enum cachefiles_opcode opcode,
					size_t data_len,
					init_req_fn init_req,
					void *private)
{}

static int cachefiles_ondemand_init_open_req(struct cachefiles_req *req,
					     void *private)
{}

static int cachefiles_ondemand_init_close_req(struct cachefiles_req *req,
					      void *private)
{}

struct cachefiles_read_ctx {};

static int cachefiles_ondemand_init_read_req(struct cachefiles_req *req,
					     void *private)
{}

int cachefiles_ondemand_init_object(struct cachefiles_object *object)
{}

void cachefiles_ondemand_clean_object(struct cachefiles_object *object)
{}

int cachefiles_ondemand_init_obj_info(struct cachefiles_object *object,
				struct cachefiles_volume *volume)
{}

void cachefiles_ondemand_deinit_obj_info(struct cachefiles_object *object)
{}

int cachefiles_ondemand_read(struct cachefiles_object *object,
			     loff_t pos, size_t len)
{}