Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
inode.c File Reference
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
#include <linux/namei.h>
#include <linux/mm.h>
#include <linux/xattr.h>
#include <linux/posix_acl.h>
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
#include <linux/fiemap.h>
#include <linux/security.h>
#include <asm/uaccess.h>
#include "gfs2.h"
#include "incore.h"
#include "acl.h"
#include "bmap.h"
#include "dir.h"
#include "xattr.h"
#include "glock.h"
#include "inode.h"
#include "meta_io.h"
#include "quota.h"
#include "rgrp.h"
#include "trans.h"
#include "util.h"
#include "super.h"
#include "glops.h"

Go to the source code of this file.

Data Structures

struct  gfs2_skip_data
 

Functions

struct inodegfs2_ilookup (struct super_block *sb, u64 no_addr, int non_block)
 
struct inodegfs2_inode_lookup (struct super_block *sb, unsigned int type, u64 no_addr, u64 no_formal_ino, int non_block)
 
struct inodegfs2_lookup_by_inum (struct gfs2_sbd *sdp, u64 no_addr, u64 *no_formal_ino, unsigned int blktype)
 
struct inodegfs2_lookup_simple (struct inode *dip, const char *name)
 
: The name of the inode to look for

gfs2_lookupi - Look up a filename in a directory and return its inode : An initialized holder for the directory glock

: If 1, ignore the caller's permissions : An uninitialized holder for the new inode glock

This can be called via the VFS filldir function when NFS is doing a readdirplus and the inode which its intending to stat isn't already in cache. In this case we must not take the directory glock again, since the readdir call will have already taken that lock.

Returns: errno

struct inodegfs2_lookupi (struct inode *dir, const struct qstr *name, int is_root)
 
: Name of new dinode

create_ok - OK to create a new on-disk inode here? : Directory in which dinode is to be created

:

Returns: errno

: The name of the entry in the parent directory

gfs2_unlink_inode - Removes an inode from its parent dir and unlinks it : The parent directory

: The inode buffer for the inode to be removed : The inode to be removed

Called with all the locks and in a transaction. This will only be called for a directory after it has been checked to ensure it is empty.

Returns: 0 on success, or an error

struct inode_operations gfs2_file_iops
 
struct inode_operations gfs2_dir_iops
 
struct inode_operations gfs2_symlink_iops
 
int gfs2_permission (struct inode *inode, int mask)
 
int gfs2_setattr_simple (struct inode *inode, struct iattr *attr)
 

Function Documentation

struct inode* gfs2_ilookup ( struct super_block sb,
u64  no_addr,
int  non_block 
)
read

Definition at line 74 of file inode.c.

struct inode* gfs2_inode_lookup ( struct super_block sb,
unsigned int  type,
u64  no_addr,
u64  no_formal_ino,
int  non_block 
)
read

gfs2_inode_lookup - Lookup an inode : The super block : The inode number : The type of the inode non_block: Can we block on inodes that are being freed?

Returns: A VFS inode, or an error

Definition at line 140 of file inode.c.

struct inode* gfs2_lookup_by_inum ( struct gfs2_sbd sdp,
u64  no_addr,
u64 no_formal_ino,
unsigned int  blktype 
)
read

Definition at line 205 of file inode.c.

struct inode* gfs2_lookup_simple ( struct inode dip,
const char name 
)
read

Definition at line 249 of file inode.c.

struct inode* gfs2_lookupi ( struct inode dir,
const struct qstr name,
int  is_root 
)
read

Definition at line 282 of file inode.c.

int gfs2_permission ( struct inode inode,
int  mask 
)

gfs2_permission - : The inode : The mask to be tested : Indicates whether this is an RCU path walk or not

This may be called from the VFS directly, or from within GFS2 with the inode locked, so we look to see if the glock is already locked and only lock the glock if its not already been done.

Returns: errno

Definition at line 1511 of file inode.c.

int gfs2_setattr_simple ( struct inode inode,
struct iattr attr 
)

gfs2_setattr_simple - : :

Returns: errno

Definition at line 1554 of file inode.c.

Variable Documentation

struct inode_operations gfs2_dir_iops
Initial value:
= {
.create = gfs2_create,
.lookup = gfs2_lookup,
.link = gfs2_link,
.unlink = gfs2_unlink,
.symlink = gfs2_symlink,
.mkdir = gfs2_mkdir,
.rmdir = gfs2_unlink,
.mknod = gfs2_mknod,
.rename = gfs2_rename,
.permission = gfs2_permission,
.setattr = gfs2_setattr,
.getattr = gfs2_getattr,
.setxattr = gfs2_setxattr,
.getxattr = gfs2_getxattr,
.listxattr = gfs2_listxattr,
.removexattr = gfs2_removexattr,
.fiemap = gfs2_fiemap,
.get_acl = gfs2_get_acl,
}

Definition at line 1817 of file inode.c.

struct inode_operations gfs2_file_iops
Initial value:
= {
.permission = gfs2_permission,
.setattr = gfs2_setattr,
.getattr = gfs2_getattr,
.setxattr = gfs2_setxattr,
.getxattr = gfs2_getxattr,
.listxattr = gfs2_listxattr,
.removexattr = gfs2_removexattr,
.fiemap = gfs2_fiemap,
.get_acl = gfs2_get_acl,
}

Definition at line 1805 of file inode.c.

struct inode_operations gfs2_symlink_iops
Initial value:
= {
.readlink = generic_readlink,
.follow_link = gfs2_follow_link,
.put_link = gfs2_put_link,
.permission = gfs2_permission,
.setattr = gfs2_setattr,
.getattr = gfs2_getattr,
.setxattr = gfs2_setxattr,
.getxattr = gfs2_getxattr,
.listxattr = gfs2_listxattr,
.removexattr = gfs2_removexattr,
.fiemap = gfs2_fiemap,
.get_acl = gfs2_get_acl,
}

Definition at line 1838 of file inode.c.