Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
xfs_super.c File Reference
#include "xfs.h"
#include "xfs_log.h"
#include "xfs_inum.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir2.h"
#include "xfs_alloc.h"
#include "xfs_quota.h"
#include "xfs_mount.h"
#include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h"
#include "xfs_dinode.h"
#include "xfs_inode.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_bmap.h"
#include "xfs_rtalloc.h"
#include "xfs_error.h"
#include "xfs_itable.h"
#include "xfs_fsops.h"
#include "xfs_attr.h"
#include "xfs_buf_item.h"
#include "xfs_utils.h"
#include "xfs_vnodeops.h"
#include "xfs_log_priv.h"
#include "xfs_trans_priv.h"
#include "xfs_filestream.h"
#include "xfs_da_btree.h"
#include "xfs_extfree_item.h"
#include "xfs_mru_cache.h"
#include "xfs_inode_item.h"
#include "xfs_sync.h"
#include "xfs_trace.h"
#include <linux/namei.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mount.h>
#include <linux/mempool.h>
#include <linux/writeback.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/parser.h>

Go to the source code of this file.

Data Structures

struct  proc_xfs_info
 

Macros

#define MNTOPT_LOGBUFS   "logbufs" /* number of XFS log buffers */
 
#define MNTOPT_LOGBSIZE   "logbsize" /* size of XFS log buffers */
 
#define MNTOPT_LOGDEV   "logdev" /* log device */
 
#define MNTOPT_RTDEV   "rtdev" /* realtime I/O device */
 
#define MNTOPT_BIOSIZE   "biosize" /* log2 of preferred buffered io size */
 
#define MNTOPT_WSYNC   "wsync" /* safe-mode nfs compatible mount */
 
#define MNTOPT_NOALIGN   "noalign" /* turn off stripe alignment */
 
#define MNTOPT_SWALLOC   "swalloc" /* turn on stripe width allocation */
 
#define MNTOPT_SUNIT   "sunit" /* data volume stripe unit */
 
#define MNTOPT_SWIDTH   "swidth" /* data volume stripe width */
 
#define MNTOPT_NOUUID   "nouuid" /* ignore filesystem UUID */
 
#define MNTOPT_MTPT   "mtpt" /* filesystem mount point */
 
#define MNTOPT_GRPID   "grpid" /* group-ID from parent directory */
 
#define MNTOPT_NOGRPID   "nogrpid" /* group-ID from current process */
 
#define MNTOPT_BSDGROUPS   "bsdgroups" /* group-ID from parent directory */
 
#define MNTOPT_SYSVGROUPS   "sysvgroups" /* group-ID from current process */
 
#define MNTOPT_ALLOCSIZE   "allocsize" /* preferred allocation size */
 
#define MNTOPT_NORECOVERY   "norecovery" /* don't run XFS recovery */
 
#define MNTOPT_BARRIER
 
#define MNTOPT_NOBARRIER   "nobarrier" /* .. disable */
 
#define MNTOPT_64BITINODE   "inode64" /* inodes can be allocated anywhere */
 
#define MNTOPT_32BITINODE
 
#define MNTOPT_IKEEP   "ikeep" /* do not free empty inode clusters */
 
#define MNTOPT_NOIKEEP   "noikeep" /* free empty inode clusters */
 
#define MNTOPT_LARGEIO   "largeio" /* report large I/O sizes in stat() */
 
#define MNTOPT_NOLARGEIO
 
#define MNTOPT_ATTR2   "attr2" /* do use attr2 attribute format */
 
#define MNTOPT_NOATTR2   "noattr2" /* do not use attr2 attribute format */
 
#define MNTOPT_FILESTREAM   "filestreams" /* use filestreams allocator */
 
#define MNTOPT_QUOTA   "quota" /* disk quotas (user) */
 
#define MNTOPT_NOQUOTA   "noquota" /* no quotas */
 
#define MNTOPT_USRQUOTA   "usrquota" /* user quota enabled */
 
#define MNTOPT_GRPQUOTA   "grpquota" /* group quota enabled */
 
#define MNTOPT_PRJQUOTA   "prjquota" /* project quota enabled */
 
#define MNTOPT_UQUOTA   "uquota" /* user quota (IRIX variant) */
 
#define MNTOPT_GQUOTA   "gquota" /* group quota (IRIX variant) */
 
#define MNTOPT_PQUOTA   "pquota" /* project quota (IRIX variant) */
 
#define MNTOPT_UQUOTANOENF   "uqnoenforce"/* user quota limit enforcement */
 
#define MNTOPT_GQUOTANOENF   "gqnoenforce"/* group quota limit enforcement */
 
#define MNTOPT_PQUOTANOENF   "pqnoenforce"/* project quota limit enforcement */
 
#define MNTOPT_QUOTANOENF   "qnoenforce" /* same as uqnoenforce */
 
#define MNTOPT_DELAYLOG   "delaylog" /* Delayed logging enabled */
 
#define MNTOPT_NODELAYLOG   "nodelaylog" /* Delayed logging disabled */
 
#define MNTOPT_DISCARD   "discard" /* Discard unused blocks */
 
#define MNTOPT_NODISCARD   "nodiscard" /* Do not discard unused blocks */
 

Enumerations

enum  {
  Opt_barrier, Opt_nobarrier, Opt_inode64, Opt_inode32,
  Opt_err
}
 

Functions

STATIC unsigned long suffix_strtoul (char *s, char **endp, unsigned int base)
 
STATIC int xfs_parseargs (struct xfs_mount *mp, char *options)
 
STATIC int xfs_showargs (struct xfs_mount *mp, struct seq_file *m)
 
__uint64_t xfs_max_file_offset (unsigned int blockshift)
 
xfs_agnumber_t xfs_set_inode32 (struct xfs_mount *mp)
 
xfs_agnumber_t xfs_set_inode64 (struct xfs_mount *mp)
 
STATIC int xfs_blkdev_get (xfs_mount_t *mp, const char *name, struct block_device **bdevp)
 
STATIC void xfs_blkdev_put (struct block_device *bdev)
 
void xfs_blkdev_issue_flush (xfs_buftarg_t *buftarg)
 
STATIC void xfs_close_devices (struct xfs_mount *mp)
 
STATIC int xfs_open_devices (struct xfs_mount *mp)
 
STATIC int xfs_setup_devices (struct xfs_mount *mp)
 
STATIC int xfs_init_mount_workqueues (struct xfs_mount *mp)
 
STATIC void xfs_destroy_mount_workqueues (struct xfs_mount *mp)
 
STATIC struct inodexfs_fs_alloc_inode (struct super_block *sb)
 
STATIC void xfs_fs_destroy_inode (struct inode *inode)
 
STATIC void xfs_fs_inode_init_once (void *inode)
 
STATIC void xfs_fs_evict_inode (struct inode *inode)
 
STATIC int xfs_fs_drop_inode (struct inode *inode)
 
STATIC void xfs_free_fsname (struct xfs_mount *mp)
 
STATIC void xfs_fs_put_super (struct super_block *sb)
 
STATIC int xfs_fs_sync_fs (struct super_block *sb, int wait)
 
STATIC int xfs_fs_statfs (struct dentry *dentry, struct kstatfs *statp)
 
STATIC void xfs_save_resvblks (struct xfs_mount *mp)
 
STATIC void xfs_restore_resvblks (struct xfs_mount *mp)
 
STATIC int xfs_fs_remount (struct super_block *sb, int *flags, char *options)
 
STATIC int xfs_fs_freeze (struct super_block *sb)
 
STATIC int xfs_fs_unfreeze (struct super_block *sb)
 
STATIC int xfs_fs_show_options (struct seq_file *m, struct dentry *root)
 
STATIC int xfs_finish_flags (struct xfs_mount *mp)
 
STATIC int xfs_fs_fill_super (struct super_block *sb, void *data, int silent)
 
STATIC struct dentryxfs_fs_mount (struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
 
STATIC int __init xfs_init_zones (void)
 
STATIC void xfs_destroy_zones (void)
 
STATIC int __init xfs_init_workqueues (void)
 
STATIC void xfs_destroy_workqueues (void)
 
STATIC int __init init_xfs_fs (void)
 
STATIC void __exit exit_xfs_fs (void)
 
 module_init (init_xfs_fs)
 
 module_exit (exit_xfs_fs)
 
 MODULE_AUTHOR ("Silicon Graphics, Inc.")
 
 MODULE_DESCRIPTION (XFS_VERSION_STRING" with "XFS_BUILD_OPTIONS" enabled")
 
 MODULE_LICENSE ("GPL")
 

Variables

mempool_txfs_ioend_pool
 

Macro Definition Documentation

#define MNTOPT_32BITINODE
Value:
"inode32" /* inode allocation limited to
* XFS_MAXINUMBER_32 */

Definition at line 90 of file xfs_super.c.

#define MNTOPT_64BITINODE   "inode64" /* inodes can be allocated anywhere */

Definition at line 89 of file xfs_super.c.

#define MNTOPT_ALLOCSIZE   "allocsize" /* preferred allocation size */

Definition at line 85 of file xfs_super.c.

#define MNTOPT_ATTR2   "attr2" /* do use attr2 attribute format */

Definition at line 95 of file xfs_super.c.

#define MNTOPT_BARRIER
Value:
"barrier" /* use writer barriers for log write and
* unwritten extent conversion */

Definition at line 87 of file xfs_super.c.

#define MNTOPT_BIOSIZE   "biosize" /* log2 of preferred buffered io size */

Definition at line 73 of file xfs_super.c.

#define MNTOPT_BSDGROUPS   "bsdgroups" /* group-ID from parent directory */

Definition at line 83 of file xfs_super.c.

#define MNTOPT_DELAYLOG   "delaylog" /* Delayed logging enabled */

Definition at line 110 of file xfs_super.c.

#define MNTOPT_DISCARD   "discard" /* Discard unused blocks */

Definition at line 112 of file xfs_super.c.

#define MNTOPT_FILESTREAM   "filestreams" /* use filestreams allocator */

Definition at line 97 of file xfs_super.c.

#define MNTOPT_GQUOTA   "gquota" /* group quota (IRIX variant) */

Definition at line 104 of file xfs_super.c.

#define MNTOPT_GQUOTANOENF   "gqnoenforce"/* group quota limit enforcement */

Definition at line 107 of file xfs_super.c.

#define MNTOPT_GRPID   "grpid" /* group-ID from parent directory */

Definition at line 81 of file xfs_super.c.

#define MNTOPT_GRPQUOTA   "grpquota" /* group quota enabled */

Definition at line 101 of file xfs_super.c.

#define MNTOPT_IKEEP   "ikeep" /* do not free empty inode clusters */

Definition at line 91 of file xfs_super.c.

#define MNTOPT_LARGEIO   "largeio" /* report large I/O sizes in stat() */

Definition at line 93 of file xfs_super.c.

#define MNTOPT_LOGBSIZE   "logbsize" /* size of XFS log buffers */

Definition at line 70 of file xfs_super.c.

#define MNTOPT_LOGBUFS   "logbufs" /* number of XFS log buffers */

Definition at line 69 of file xfs_super.c.

#define MNTOPT_LOGDEV   "logdev" /* log device */

Definition at line 71 of file xfs_super.c.

#define MNTOPT_MTPT   "mtpt" /* filesystem mount point */

Definition at line 80 of file xfs_super.c.

#define MNTOPT_NOALIGN   "noalign" /* turn off stripe alignment */

Definition at line 75 of file xfs_super.c.

#define MNTOPT_NOATTR2   "noattr2" /* do not use attr2 attribute format */

Definition at line 96 of file xfs_super.c.

#define MNTOPT_NOBARRIER   "nobarrier" /* .. disable */

Definition at line 88 of file xfs_super.c.

#define MNTOPT_NODELAYLOG   "nodelaylog" /* Delayed logging disabled */

Definition at line 111 of file xfs_super.c.

#define MNTOPT_NODISCARD   "nodiscard" /* Do not discard unused blocks */

Definition at line 113 of file xfs_super.c.

#define MNTOPT_NOGRPID   "nogrpid" /* group-ID from current process */

Definition at line 82 of file xfs_super.c.

#define MNTOPT_NOIKEEP   "noikeep" /* free empty inode clusters */

Definition at line 92 of file xfs_super.c.

#define MNTOPT_NOLARGEIO
Value:
"nolargeio" /* do not report large I/O sizes
* in stat(). */

Definition at line 94 of file xfs_super.c.

#define MNTOPT_NOQUOTA   "noquota" /* no quotas */

Definition at line 99 of file xfs_super.c.

#define MNTOPT_NORECOVERY   "norecovery" /* don't run XFS recovery */

Definition at line 86 of file xfs_super.c.

#define MNTOPT_NOUUID   "nouuid" /* ignore filesystem UUID */

Definition at line 79 of file xfs_super.c.

#define MNTOPT_PQUOTA   "pquota" /* project quota (IRIX variant) */

Definition at line 105 of file xfs_super.c.

#define MNTOPT_PQUOTANOENF   "pqnoenforce"/* project quota limit enforcement */

Definition at line 108 of file xfs_super.c.

#define MNTOPT_PRJQUOTA   "prjquota" /* project quota enabled */

Definition at line 102 of file xfs_super.c.

#define MNTOPT_QUOTA   "quota" /* disk quotas (user) */

Definition at line 98 of file xfs_super.c.

#define MNTOPT_QUOTANOENF   "qnoenforce" /* same as uqnoenforce */

Definition at line 109 of file xfs_super.c.

#define MNTOPT_RTDEV   "rtdev" /* realtime I/O device */

Definition at line 72 of file xfs_super.c.

#define MNTOPT_SUNIT   "sunit" /* data volume stripe unit */

Definition at line 77 of file xfs_super.c.

#define MNTOPT_SWALLOC   "swalloc" /* turn on stripe width allocation */

Definition at line 76 of file xfs_super.c.

#define MNTOPT_SWIDTH   "swidth" /* data volume stripe width */

Definition at line 78 of file xfs_super.c.

#define MNTOPT_SYSVGROUPS   "sysvgroups" /* group-ID from current process */

Definition at line 84 of file xfs_super.c.

#define MNTOPT_UQUOTA   "uquota" /* user quota (IRIX variant) */

Definition at line 103 of file xfs_super.c.

#define MNTOPT_UQUOTANOENF   "uqnoenforce"/* user quota limit enforcement */

Definition at line 106 of file xfs_super.c.

#define MNTOPT_USRQUOTA   "usrquota" /* user quota enabled */

Definition at line 100 of file xfs_super.c.

#define MNTOPT_WSYNC   "wsync" /* safe-mode nfs compatible mount */

Definition at line 74 of file xfs_super.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
Opt_barrier 
Opt_nobarrier 
Opt_inode64 
Opt_inode32 
Opt_err 

Definition at line 121 of file xfs_super.c.

Function Documentation

STATIC void __exit exit_xfs_fs ( void  )

Definition at line 1726 of file xfs_super.c.

STATIC int __init init_xfs_fs ( void  )

Definition at line 1659 of file xfs_super.c.

MODULE_AUTHOR ( "Silicon  Graphics,
Inc."   
)
MODULE_DESCRIPTION ( XFS_VERSION_STRING" with "XFS_BUILD_OPTIONS" enabled"  )
module_exit ( exit_xfs_fs  )
module_init ( init_xfs_fs  )
MODULE_LICENSE ( "GPL"  )
STATIC unsigned long suffix_strtoul ( char s,
char **  endp,
unsigned int  base 
)

Definition at line 139 of file xfs_super.c.

STATIC int xfs_blkdev_get ( xfs_mount_t *  mp,
const char name,
struct block_device **  bdevp 
)

Definition at line 679 of file xfs_super.c.

void xfs_blkdev_issue_flush ( xfs_buftarg_t buftarg)

Definition at line 705 of file xfs_super.c.

STATIC void xfs_blkdev_put ( struct block_device bdev)

Definition at line 697 of file xfs_super.c.

STATIC void xfs_close_devices ( struct xfs_mount *  mp)

Definition at line 712 of file xfs_super.c.

STATIC void xfs_destroy_mount_workqueues ( struct xfs_mount *  mp)

Definition at line 874 of file xfs_super.c.

STATIC void xfs_destroy_workqueues ( void  )

Definition at line 1652 of file xfs_super.c.

STATIC void xfs_destroy_zones ( void  )

Definition at line 1597 of file xfs_super.c.

STATIC int xfs_finish_flags ( struct xfs_mount *  mp)

Definition at line 1259 of file xfs_super.c.

STATIC void xfs_free_fsname ( struct xfs_mount *  mp)

Definition at line 991 of file xfs_super.c.

STATIC struct inode* xfs_fs_alloc_inode ( struct super_block sb)
read

Definition at line 884 of file xfs_super.c.

STATIC void xfs_fs_destroy_inode ( struct inode inode)

Definition at line 896 of file xfs_super.c.

STATIC int xfs_fs_drop_inode ( struct inode inode)

Definition at line 982 of file xfs_super.c.

STATIC void xfs_fs_evict_inode ( struct inode inode)

Definition at line 956 of file xfs_super.c.

STATIC int xfs_fs_fill_super ( struct super_block sb,
void data,
int  silent 
)

Definition at line 1305 of file xfs_super.c.

STATIC int xfs_fs_freeze ( struct super_block sb)

Definition at line 1226 of file xfs_super.c.

STATIC void xfs_fs_inode_init_once ( void inode)

Definition at line 937 of file xfs_super.c.

STATIC struct dentry* xfs_fs_mount ( struct file_system_type fs_type,
int  flags,
const char dev_name,
void data 
)
read

Definition at line 1434 of file xfs_super.c.

STATIC void xfs_fs_put_super ( struct super_block sb)

Definition at line 1000 of file xfs_super.c.

STATIC int xfs_fs_remount ( struct super_block sb,
int flags,
char options 
)

Definition at line 1119 of file xfs_super.c.

STATIC int xfs_fs_show_options ( struct seq_file m,
struct dentry root 
)

Definition at line 1247 of file xfs_super.c.

STATIC int xfs_fs_statfs ( struct dentry dentry,
struct kstatfs statp 
)

Definition at line 1048 of file xfs_super.c.

STATIC int xfs_fs_sync_fs ( struct super_block sb,
int  wait 
)

Definition at line 1018 of file xfs_super.c.

STATIC int xfs_fs_unfreeze ( struct super_block sb)

Definition at line 1237 of file xfs_super.c.

STATIC int xfs_init_mount_workqueues ( struct xfs_mount *  mp)

Definition at line 846 of file xfs_super.c.

STATIC int __init xfs_init_workqueues ( void  )

Definition at line 1622 of file xfs_super.c.

STATIC int __init xfs_init_zones ( void  )

Definition at line 1483 of file xfs_super.c.

__uint64_t xfs_max_file_offset ( unsigned int  blockshift)

Definition at line 571 of file xfs_super.c.

STATIC int xfs_open_devices ( struct xfs_mount *  mp)

Definition at line 739 of file xfs_super.c.

STATIC int xfs_parseargs ( struct xfs_mount *  mp,
char options 
)

Definition at line 169 of file xfs_super.c.

STATIC void xfs_restore_resvblks ( struct xfs_mount *  mp)

Definition at line 1105 of file xfs_super.c.

STATIC void xfs_save_resvblks ( struct xfs_mount *  mp)

Definition at line 1096 of file xfs_super.c.

xfs_agnumber_t xfs_set_inode32 ( struct xfs_mount *  mp)

Definition at line 605 of file xfs_super.c.

xfs_agnumber_t xfs_set_inode64 ( struct xfs_mount *  mp)

Definition at line 655 of file xfs_super.c.

STATIC int xfs_setup_devices ( struct xfs_mount *  mp)

Definition at line 813 of file xfs_super.c.

STATIC int xfs_showargs ( struct xfs_mount *  mp,
struct seq_file m 
)

Definition at line 488 of file xfs_super.c.

Variable Documentation

mempool_t* xfs_ioend_pool

Definition at line 67 of file xfs_super.c.