Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
fat.h File Reference
#include <linux/buffer_head.h>
#include <linux/string.h>
#include <linux/nls.h>
#include <linux/fs.h>
#include <linux/hash.h>
#include <linux/mutex.h>
#include <linux/ratelimit.h>
#include <linux/msdos_fs.h>

Go to the source code of this file.

Data Structures

struct  fat_mount_options
 
struct  msdos_sb_info
 
struct  msdos_inode_info
 
struct  fat_slot_info
 
struct  fat_entry
 

Macros

#define VFAT_SFN_DISPLAY_LOWER   0x0001 /* convert to lowercase for display */
 
#define VFAT_SFN_DISPLAY_WIN95   0x0002 /* emulate win95 rule for display */
 
#define VFAT_SFN_DISPLAY_WINNT   0x0004 /* emulate winnt rule for display */
 
#define VFAT_SFN_CREATE_WIN95   0x0100 /* emulate win95 rule for create */
 
#define VFAT_SFN_CREATE_WINNT   0x0200 /* emulate winnt rule for create */
 
#define FAT_ERRORS_CONT   1 /* ignore error and continue */
 
#define FAT_ERRORS_PANIC   2 /* panic on error */
 
#define FAT_ERRORS_RO   3 /* remount r/o on error */
 
#define FAT_HASH_BITS   8
 
#define FAT_HASH_SIZE   (1UL << FAT_HASH_BITS)
 
#define FAT_CACHE_VALID   0 /* special case for valid cache */
 
#define fat_fs_error(sb, fmt, args...)   __fat_fs_error(sb, 1, fmt , ## args)
 
#define fat_fs_error_ratelimit(sb, fmt, args...)   __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)
 
#define fat_msg_ratelimit(sb, level, fmt, args...)
 

Typedefs

typedef unsigned long long llu
 

Functions

void fat_cache_inval_inode (struct inode *inode)
 
int fat_get_cluster (struct inode *inode, int cluster, int *fclus, int *dclus)
 
int fat_bmap (struct inode *inode, sector_t sector, sector_t *phys, unsigned long *mapped_blocks, int create)
 
int fat_search_long (struct inode *inode, const unsigned char *name, int name_len, struct fat_slot_info *sinfo)
 
int fat_dir_empty (struct inode *dir)
 
int fat_subdirs (struct inode *dir)
 
int fat_scan (struct inode *dir, const unsigned char *name, struct fat_slot_info *sinfo)
 
int fat_get_dotdot_entry (struct inode *dir, struct buffer_head **bh, struct msdos_dir_entry **de)
 
int fat_alloc_new_dir (struct inode *dir, struct timespec *ts)
 
int fat_add_entries (struct inode *dir, void *slots, int nr_slots, struct fat_slot_info *sinfo)
 
int fat_remove_entries (struct inode *dir, struct fat_slot_info *sinfo)
 
void fat_ent_access_init (struct super_block *sb)
 
int fat_ent_read (struct inode *inode, struct fat_entry *fatent, int entry)
 
int fat_ent_write (struct inode *inode, struct fat_entry *fatent, int new, int wait)
 
int fat_alloc_clusters (struct inode *inode, int *cluster, int nr_cluster)
 
int fat_free_clusters (struct inode *inode, int cluster)
 
int fat_count_free_clusters (struct super_block *sb)
 
long fat_generic_ioctl (struct file *filp, unsigned int cmd, unsigned long arg)
 
int fat_setattr (struct dentry *dentry, struct iattr *attr)
 
void fat_truncate_blocks (struct inode *inode, loff_t offset)
 
int fat_getattr (struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
 
int fat_file_fsync (struct file *file, loff_t start, loff_t end, int datasync)
 
void fat_attach (struct inode *inode, loff_t i_pos)
 
void fat_detach (struct inode *inode)
 
struct inodefat_iget (struct super_block *sb, loff_t i_pos)
 
struct inodefat_build_inode (struct super_block *sb, struct msdos_dir_entry *de, loff_t i_pos)
 
int fat_sync_inode (struct inode *inode)
 
int fat_fill_super (struct super_block *sb, void *data, int silent, int isvfat, void(*setup)(struct super_block *))
 
int fat_flush_inodes (struct super_block *sb, struct inode *i1, struct inode *i2)
 
 __printf (3, 4) __cold void __fat_fs_error(struct super_block *sb
 
int fat_clusters_flush (struct super_block *sb)
 
int fat_chain_add (struct inode *inode, int new_dclus, int nr_cluster)
 
void fat_time_fat2unix (struct msdos_sb_info *sbi, struct timespec *ts, __le16 __time, __le16 __date, u8 time_cs)
 
void fat_time_unix2fat (struct msdos_sb_info *sbi, struct timespec *ts, __le16 *time, __le16 *date, u8 *time_cs)
 
int fat_sync_bhs (struct buffer_head **bhs, int nr_bhs)
 
int fat_cache_init (void)
 
void fat_cache_destroy (void)
 
struct dentryfat_fh_to_dentry (struct super_block *sb, struct fid *fid, int fh_len, int fh_type)
 
struct dentryfat_fh_to_parent (struct super_block *sb, struct fid *fid, int fh_len, int fh_type)
 
struct dentryfat_get_parent (struct dentry *child_dir)
 

Variables

struct file_operations fat_dir_operations
 
struct file_operations fat_file_operations
 
struct inode_operations fat_file_inode_operations
 
int report
 
int const charfmt
 
const charlevel
 

Macro Definition Documentation

#define FAT_CACHE_VALID   0 /* special case for valid cache */

Definition at line 99 of file fat.h.

#define FAT_ERRORS_CONT   1 /* ignore error and continue */

Definition at line 22 of file fat.h.

#define FAT_ERRORS_PANIC   2 /* panic on error */

Definition at line 23 of file fat.h.

#define FAT_ERRORS_RO   3 /* remount r/o on error */

Definition at line 24 of file fat.h.

#define fat_fs_error (   sb,
  fmt,
  args... 
)    __fat_fs_error(sb, 1, fmt , ## args)

Definition at line 359 of file fat.h.

#define fat_fs_error_ratelimit (   sb,
  fmt,
  args... 
)    __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args)

Definition at line 361 of file fat.h.

#define FAT_HASH_BITS   8

Definition at line 54 of file fat.h.

#define FAT_HASH_SIZE   (1UL << FAT_HASH_BITS)

Definition at line 55 of file fat.h.

#define fat_msg_ratelimit (   sb,
  level,
  fmt,
  args... 
)
Value:
do { \
if (__ratelimit(&MSDOS_SB(sb)->ratelimit)) \
fat_msg(sb, level, fmt, ## args); \
} while (0)

Definition at line 365 of file fat.h.

#define VFAT_SFN_CREATE_WIN95   0x0100 /* emulate win95 rule for create */

Definition at line 19 of file fat.h.

#define VFAT_SFN_CREATE_WINNT   0x0200 /* emulate winnt rule for create */

Definition at line 20 of file fat.h.

#define VFAT_SFN_DISPLAY_LOWER   0x0001 /* convert to lowercase for display */

Definition at line 16 of file fat.h.

#define VFAT_SFN_DISPLAY_WIN95   0x0002 /* emulate win95 rule for display */

Definition at line 17 of file fat.h.

#define VFAT_SFN_DISPLAY_WINNT   0x0004 /* emulate winnt rule for display */

Definition at line 18 of file fat.h.

Typedef Documentation

typedef unsigned long long llu

Definition at line 390 of file fat.h.

Function Documentation

__printf ( ,
 
)
int fat_add_entries ( struct inode dir,
void slots,
int  nr_slots,
struct fat_slot_info sinfo 
)

Definition at line 1246 of file dir.c.

int fat_alloc_clusters ( struct inode inode,
int cluster,
int  nr_cluster 
)

Definition at line 465 of file fatent.c.

int fat_alloc_new_dir ( struct inode dir,
struct timespec ts 
)

Definition at line 1104 of file dir.c.

void fat_attach ( struct inode inode,
loff_t  i_pos 
)

Definition at line 294 of file inode.c.

int fat_bmap ( struct inode inode,
sector_t  sector,
sector_t phys,
unsigned long mapped_blocks,
int  create 
)

Definition at line 306 of file cache.c.

struct inode* fat_build_inode ( struct super_block sb,
struct msdos_dir_entry de,
loff_t  i_pos 
)
read

Definition at line 447 of file inode.c.

void fat_cache_destroy ( void  )

Definition at line 58 of file cache.c.

int fat_cache_init ( void  )

Definition at line 47 of file cache.c.

void fat_cache_inval_inode ( struct inode inode)

Definition at line 205 of file cache.c.

int fat_chain_add ( struct inode inode,
int  new_dclus,
int  nr_cluster 
)

Definition at line 104 of file misc.c.

int fat_clusters_flush ( struct super_block sb)

Definition at line 65 of file misc.c.

int fat_count_free_clusters ( struct super_block sb)

Definition at line 652 of file fatent.c.

void fat_detach ( struct inode inode)

Definition at line 323 of file inode.c.

int fat_dir_empty ( struct inode dir)

Definition at line 902 of file dir.c.

void fat_ent_access_init ( struct super_block sb)

Definition at line 289 of file fatent.c.

int fat_ent_read ( struct inode inode,
struct fat_entry fatent,
int  entry 
)

Definition at line 351 of file fatent.c.

int fat_ent_write ( struct inode inode,
struct fat_entry fatent,
int  new,
int  wait 
)

Definition at line 409 of file fatent.c.

struct dentry* fat_fh_to_dentry ( struct super_block sb,
struct fid fid,
int  fh_len,
int  fh_type 
)
read

Map a NFS file handle to a corresponding dentry. The dentry may or may not be connected to the filesystem root.

Definition at line 63 of file nfs.c.

struct dentry* fat_fh_to_parent ( struct super_block sb,
struct fid fid,
int  fh_len,
int  fh_type 
)
read

Definition at line 74 of file nfs.c.

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

Definition at line 151 of file file.c.

int fat_fill_super ( struct super_block sb,
void data,
int  silent,
int  isvfat,
void(*)(struct super_block *)  setup 
)

Definition at line 1154 of file inode.c.

int fat_flush_inodes ( struct super_block sb,
struct inode i1,
struct inode i2 
)

Definition at line 1486 of file inode.c.

int fat_free_clusters ( struct inode inode,
int  cluster 
)

Definition at line 553 of file fatent.c.

long fat_generic_ioctl ( struct file filp,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 117 of file file.c.

int fat_get_cluster ( struct inode inode,
int  cluster,
int fclus,
int dclus 
)

Definition at line 226 of file cache.c.

int fat_get_dotdot_entry ( struct inode dir,
struct buffer_head **  bh,
struct msdos_dir_entry **  de 
)

Definition at line 887 of file dir.c.

struct dentry* fat_get_parent ( struct dentry child_dir)
read

Definition at line 87 of file nfs.c.

int fat_getattr ( struct vfsmount mnt,
struct dentry dentry,
struct kstat stat 
)

Definition at line 304 of file file.c.

struct inode* fat_iget ( struct super_block sb,
loff_t  i_pos 
)
read

Definition at line 339 of file inode.c.

int fat_remove_entries ( struct inode dir,
struct fat_slot_info sinfo 
)

Definition at line 1003 of file dir.c.

int fat_scan ( struct inode dir,
const unsigned char name,
struct fat_slot_info sinfo 
)

Definition at line 948 of file dir.c.

int fat_search_long ( struct inode inode,
const unsigned char name,
int  name_len,
struct fat_slot_info sinfo 
)

Definition at line 467 of file dir.c.

int fat_setattr ( struct dentry dentry,
struct iattr attr 
)

Definition at line 370 of file file.c.

int fat_subdirs ( struct inode dir)

Definition at line 927 of file dir.c.

int fat_sync_bhs ( struct buffer_head **  bhs,
int  nr_bhs 
)

Definition at line 265 of file misc.c.

int fat_sync_inode ( struct inode inode)

Definition at line 685 of file inode.c.

void fat_time_fat2unix ( struct msdos_sb_info sbi,
struct timespec ts,
__le16  __time,
__le16  __date,
u8  time_cs 
)

Definition at line 192 of file misc.c.

void fat_time_unix2fat ( struct msdos_sb_info sbi,
struct timespec ts,
__le16 time,
__le16 date,
u8 time_cs 
)

Definition at line 228 of file misc.c.

void fat_truncate_blocks ( struct inode inode,
loff_t  offset 
)

Definition at line 285 of file file.c.

Variable Documentation

struct file_operations fat_dir_operations

Definition at line 855 of file dir.c.

struct inode_operations fat_file_inode_operations

Definition at line 446 of file file.c.

struct file_operations fat_file_operations

Definition at line 163 of file file.c.

Definition at line 358 of file fat.h.

const char* level

Definition at line 364 of file fat.h.

int report

Definition at line 358 of file fat.h.