mountdata.c File Reference

Mount point realted operations. More...

#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/parser.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include "mountdata.h"
#include "storage.h"
#include "cache.h"
Include dependency graph for mountdata.c:

Go to the source code of this file.

Enumerations

enum  { OPT_MAX_BLOCK_SIZE, OPT_MAX_ENTRIES, OPT_ERROR }
 

Supported options.

More...

Functions

int mumufs_parse_opt (char *opt, struct mumu_mount_data *d)
 parses mount parameters and fills the mumu_mount_data structure
int mumufs_show_options (struct seq_file *m, struct vfsmount *mnt)
 shows the options which were used when the FS was mounted
int mumufs_init_mount_data (struct mumu_mount_data *d)
 initialises mount point data
int mumufs_umount_cleanup (struct super_block *sb)
 cleans up the mount point related data

Detailed Description

Mount point realted operations.

Author:
Sergey Satskiy Copyright (C) 2007 - 2009 Sergey Satskiy.

This file is released under the GPL.

Definition in file mountdata.c.


Enumeration Type Documentation

anonymous enum

Supported options.

Enumerator:
OPT_MAX_BLOCK_SIZE 

max block size limitation

OPT_MAX_ENTRIES 

max # of entries limitation

OPT_ERROR 

end of list marker

Definition at line 27 of file mountdata.c.


Function Documentation

int mumufs_init_mount_data ( struct mumu_mount_data d  ) 

initialises mount point data

Parameters:
d mount point data structure pointer
Returns:
0 - success, !0 otherwise

Definition at line 118 of file mountdata.c.

References mumu_mount_data::mount, and mumu_mount_data::number_of_entries.

int mumufs_parse_opt ( char *  opt,
struct mumu_mount_data d 
)

parses mount parameters and fills the mumu_mount_data structure

Parameters:
opt mount parameters
d pointer to a structure where mount parameters are stored
Returns:
0 - success, !0 otherwise

Definition at line 53 of file mountdata.c.

References DEFAULTMAXBLOCKSIZE, DEFAULTMAXENTRIES, mumu_mount_data::max_block_size, mumu_mount_data::max_entries, OPT_MAX_BLOCK_SIZE, and OPT_MAX_ENTRIES.

int mumufs_show_options ( struct seq_file *  m,
struct vfsmount *  mnt 
)

shows the options which were used when the FS was mounted

Parameters:
m area to print into
mnt mount point
Returns:
0 - success, !0 otherwise

Definition at line 99 of file mountdata.c.

References mumu_mount_data::max_block_size, and mumu_mount_data::max_entries.

int mumufs_umount_cleanup ( struct super_block *  sb  ) 

cleans up the mount point related data

Parameters:
sb superblock pointer
Returns:
0 - success, !0 otherwise

Definition at line 132 of file mountdata.c.

References mumu_mount_data::mount.