Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
hostfs_kern.c File Reference
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/statfs.h>
#include <linux/slab.h>
#include <linux/seq_file.h>
#include <linux/mount.h>
#include <linux/namei.h>
#include "hostfs.h"
#include <init.h>
#include <kern.h>

Go to the source code of this file.

Data Structures

struct  hostfs_inode_info
 

Macros

#define FILE_HOSTFS_I(file)   HOSTFS_I((file)->f_path.dentry->d_inode)
 
#define HOSTFS_SUPER_MAGIC   0x00c0ffee
 

Functions

 __uml_setup ("hostfs=", hostfs_args,"hostfs=<root dir>,<flags>,...\n"" This is used to set hostfs parameters. The root directory argument\n"" is used to confine all hostfs mounts to within the specified directory\n"" tree on the host. If this isn't specified, then a user inside UML can\n"" mount anything on the host that's accessible to the user that's running\n"" it.\n"" The only flag currently supported is 'append', which specifies that all\n"" files opened by hostfs will be opened in append mode.\n\n")
 
int hostfs_statfs (struct dentry *dentry, struct kstatfs *sf)
 
int hostfs_readdir (struct file *file, void *ent, filldir_t filldir)
 
int hostfs_file_open (struct inode *ino, struct file *file)
 
int hostfs_fsync (struct file *file, loff_t start, loff_t end, int datasync)
 
int hostfs_writepage (struct page *page, struct writeback_control *wbc)
 
int hostfs_readpage (struct file *file, struct page *page)
 
int hostfs_write_begin (struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata)
 
int hostfs_write_end (struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata)
 
int hostfs_create (struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
 
struct dentryhostfs_lookup (struct inode *ino, struct dentry *dentry, unsigned int flags)
 
int hostfs_link (struct dentry *to, struct inode *ino, struct dentry *from)
 
int hostfs_unlink (struct inode *ino, struct dentry *dentry)
 
int hostfs_symlink (struct inode *ino, struct dentry *dentry, const char *to)
 
int hostfs_mkdir (struct inode *ino, struct dentry *dentry, umode_t mode)
 
int hostfs_rmdir (struct inode *ino, struct dentry *dentry)
 
int hostfs_rename (struct inode *from_ino, struct dentry *from, struct inode *to_ino, struct dentry *to)
 
int hostfs_permission (struct inode *ino, int desired)
 
int hostfs_setattr (struct dentry *dentry, struct iattr *attr)
 

Macro Definition Documentation

#define FILE_HOSTFS_I (   file)    HOSTFS_I((file)->f_path.dentry->d_inode)

Definition at line 33 of file hostfs_kern.c.

#define HOSTFS_SUPER_MAGIC   0x00c0ffee

Definition at line 48 of file hostfs_kern.c.

Function Documentation

__uml_setup ( hostfs = ", hostfs_args,"hostfs=<root dir>,
< flags ,
...\n""This is used to set hostfs parameters.The root directory argument\n""is used to confine all hostfs mounts to within the specified directory\n""tree on the host.If this isn't  specified,
then a user inside UML can\n""mount anything on the host that's accessible to the user that's running\n""it.\n""The only flag currently supported is 'append'  ,
which specifies that all\n""files opened by hostfs will be opened in append mode.\n\n  
)
int hostfs_create ( struct inode dir,
struct dentry dentry,
umode_t  mode,
bool  excl 
)

Definition at line 555 of file hostfs_kern.c.

int hostfs_file_open ( struct inode ino,
struct file file 
)

Definition at line 306 of file hostfs_kern.c.

int hostfs_fsync ( struct file file,
loff_t  start,
loff_t  end,
int  datasync 
)

Definition at line 365 of file hostfs_kern.c.

int hostfs_link ( struct dentry to,
struct inode ino,
struct dentry from 
)

Definition at line 634 of file hostfs_kern.c.

struct dentry* hostfs_lookup ( struct inode ino,
struct dentry dentry,
unsigned int  flags 
)
read

Definition at line 597 of file hostfs_kern.c.

int hostfs_mkdir ( struct inode ino,
struct dentry dentry,
umode_t  mode 
)

Definition at line 680 of file hostfs_kern.c.

int hostfs_permission ( struct inode ino,
int  desired 
)

Definition at line 762 of file hostfs_kern.c.

int hostfs_readdir ( struct file file,
void ent,
filldir_t  filldir 
)

Definition at line 280 of file hostfs_kern.c.

int hostfs_readpage ( struct file file,
struct page page 
)

Definition at line 436 of file hostfs_kern.c.

int hostfs_rename ( struct inode from_ino,
struct dentry from,
struct inode to_ino,
struct dentry to 
)

Definition at line 744 of file hostfs_kern.c.

int hostfs_rmdir ( struct inode ino,
struct dentry dentry 
)

Definition at line 692 of file hostfs_kern.c.

int hostfs_setattr ( struct dentry dentry,
struct iattr attr 
)

Definition at line 788 of file hostfs_kern.c.

int hostfs_statfs ( struct dentry dentry,
struct kstatfs sf 
)

Definition at line 199 of file hostfs_kern.c.

int hostfs_symlink ( struct inode ino,
struct dentry dentry,
const char to 
)

Definition at line 668 of file hostfs_kern.c.

int hostfs_unlink ( struct inode ino,
struct dentry dentry 
)

Definition at line 652 of file hostfs_kern.c.

int hostfs_write_begin ( struct file file,
struct address_space mapping,
loff_t  pos,
unsigned  len,
unsigned  flags,
struct page **  pagep,
void **  fsdata 
)

Definition at line 461 of file hostfs_kern.c.

int hostfs_write_end ( struct file file,
struct address_space mapping,
loff_t  pos,
unsigned  len,
unsigned  copied,
struct page page,
void fsdata 
)

Definition at line 473 of file hostfs_kern.c.

int hostfs_writepage ( struct page page,
struct writeback_control wbc 
)

Definition at line 400 of file hostfs_kern.c.