Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
hfs_fs.h File Reference
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/buffer_head.h>
#include <linux/fs.h>
#include <linux/workqueue.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include "hfs.h"

Go to the source code of this file.

Data Structures

struct  hfs_inode_info
 
struct  hfs_sb_info
 

Macros

#define DBG_BNODE_REFS   0x00000001
 
#define DBG_BNODE_MOD   0x00000002
 
#define DBG_CAT_MOD   0x00000004
 
#define DBG_INODE   0x00000008
 
#define DBG_SUPER   0x00000010
 
#define DBG_EXTENT   0x00000020
 
#define DBG_BITMAP   0x00000040
 
#define DBG_MASK   (0)
 
#define dprint(flg, fmt, args...)   if (flg & DBG_MASK) printk(fmt , ## args)
 
#define HFS_FLG_RSRC   0x0001
 
#define HFS_FLG_EXT_DIRTY   0x0002
 
#define HFS_FLG_EXT_NEW   0x0004
 
#define HFS_IS_RSRC(inode)   (HFS_I(inode)->flags & HFS_FLG_RSRC)
 
#define HFS_FLG_BITMAP_DIRTY   0
 
#define HFS_FLG_MDB_DIRTY   1
 
#define HFS_FLG_ALT_MDB_DIRTY   2
 
#define __hfs_u_to_mtime(sec)   cpu_to_be32(sec + 2082844800U - sys_tz.tz_minuteswest * 60)
 
#define __hfs_m_to_utime(sec)   (be32_to_cpu(sec) - 2082844800U + sys_tz.tz_minuteswest * 60)
 
#define HFS_I(inode)   (list_entry(inode, struct hfs_inode_info, vfs_inode))
 
#define HFS_SB(sb)   ((struct hfs_sb_info *)(sb)->s_fs_info)
 
#define hfs_m_to_utime(time)   (struct timespec){ .tv_sec = __hfs_m_to_utime(time) }
 
#define hfs_u_to_mtime(time)   __hfs_u_to_mtime((time).tv_sec)
 
#define hfs_mtime()   __hfs_u_to_mtime(get_seconds())
 
#define sb_bread512(sb, sec, data)
 

Functions

u32 hfs_vbm_search_free (struct super_block *, u32, u32 *)
 
int hfs_clear_vbm_bits (struct super_block *, u16, u16)
 
int hfs_cat_keycmp (const btree_key *, const btree_key *)
 
int hfs_cat_find_brec (struct super_block *, u32, struct hfs_find_data *)
 
int hfs_cat_create (u32, struct inode *, struct qstr *, struct inode *)
 
int hfs_cat_delete (u32, struct inode *, struct qstr *)
 
int hfs_cat_move (u32, struct inode *, struct qstr *, struct inode *, struct qstr *)
 
void hfs_cat_build_key (struct super_block *, btree_key *, u32, struct qstr *)
 
int hfs_ext_keycmp (const btree_key *, const btree_key *)
 
int hfs_free_fork (struct super_block *, struct hfs_cat_file *, int)
 
void hfs_ext_write_extent (struct inode *)
 
int hfs_extend_file (struct inode *)
 
void hfs_file_truncate (struct inode *)
 
int hfs_get_block (struct inode *, sector_t, struct buffer_head *, int)
 
struct inodehfs_new_inode (struct inode *, struct qstr *, umode_t)
 
void hfs_inode_write_fork (struct inode *, struct hfs_extent *, __be32 *, __be32 *)
 
int hfs_write_inode (struct inode *, struct writeback_control *)
 
int hfs_inode_setattr (struct dentry *, struct iattr *)
 
void hfs_inode_read_fork (struct inode *inode, struct hfs_extent *ext, __be32 log_size, __be32 phys_size, u32 clump_size)
 
struct inodehfs_iget (struct super_block *, struct hfs_cat_key *, hfs_cat_rec *)
 
void hfs_evict_inode (struct inode *)
 
void hfs_delete_inode (struct inode *)
 
int hfs_setxattr (struct dentry *dentry, const char *name, const void *value, size_t size, int flags)
 
ssize_t hfs_getxattr (struct dentry *dentry, const char *name, void *value, size_t size)
 
ssize_t hfs_listxattr (struct dentry *dentry, char *buffer, size_t size)
 
int hfs_mdb_get (struct super_block *)
 
void hfs_mdb_commit (struct super_block *)
 
void hfs_mdb_close (struct super_block *)
 
void hfs_mdb_put (struct super_block *)
 
int hfs_part_find (struct super_block *, sector_t *, sector_t *)
 
int hfs_hash_dentry (const struct dentry *, const struct inode *, struct qstr *)
 
int hfs_strcmp (const unsigned char *, unsigned int, const unsigned char *, unsigned int)
 
int hfs_compare_dentry (const struct dentry *parent, const struct inode *pinode, const struct dentry *dentry, const struct inode *inode, unsigned int len, const char *str, const struct qstr *name)
 
void hfs_asc2mac (struct super_block *, struct hfs_name *, struct qstr *)
 
int hfs_mac2asc (struct super_block *, char *, const struct hfs_name *)
 
void hfs_mark_mdb_dirty (struct super_block *sb)
 

Variables

struct file_operations hfs_dir_operations
 
struct inode_operations hfs_dir_inode_operations
 
struct address_space_operations hfs_aops
 
struct address_space_operations hfs_btree_aops
 
struct dentry_operations hfs_dentry_operations
 
struct timezone sys_tz
 

Macro Definition Documentation

#define __hfs_m_to_utime (   sec)    (be32_to_cpu(sec) - 2082844800U + sys_tz.tz_minuteswest * 60)

Definition at line 242 of file hfs_fs.h.

#define __hfs_u_to_mtime (   sec)    cpu_to_be32(sec + 2082844800U - sys_tz.tz_minuteswest * 60)

Definition at line 241 of file hfs_fs.h.

#define DBG_BITMAP   0x00000040

Definition at line 30 of file hfs_fs.h.

#define DBG_BNODE_MOD   0x00000002

Definition at line 25 of file hfs_fs.h.

#define DBG_BNODE_REFS   0x00000001

Definition at line 24 of file hfs_fs.h.

#define DBG_CAT_MOD   0x00000004

Definition at line 26 of file hfs_fs.h.

#define DBG_EXTENT   0x00000020

Definition at line 29 of file hfs_fs.h.

#define DBG_INODE   0x00000008

Definition at line 27 of file hfs_fs.h.

#define DBG_MASK   (0)

Definition at line 35 of file hfs_fs.h.

#define DBG_SUPER   0x00000010

Definition at line 28 of file hfs_fs.h.

#define dprint (   flg,
  fmt,
  args... 
)    if (flg & DBG_MASK) printk(fmt , ## args)

Definition at line 37 of file hfs_fs.h.

#define HFS_FLG_ALT_MDB_DIRTY   2

Definition at line 154 of file hfs_fs.h.

#define HFS_FLG_BITMAP_DIRTY   0

Definition at line 152 of file hfs_fs.h.

#define HFS_FLG_EXT_DIRTY   0x0002

Definition at line 73 of file hfs_fs.h.

#define HFS_FLG_EXT_NEW   0x0004

Definition at line 74 of file hfs_fs.h.

#define HFS_FLG_MDB_DIRTY   1

Definition at line 153 of file hfs_fs.h.

#define HFS_FLG_RSRC   0x0001

Definition at line 72 of file hfs_fs.h.

#define HFS_I (   inode)    (list_entry(inode, struct hfs_inode_info, vfs_inode))

Definition at line 244 of file hfs_fs.h.

#define HFS_IS_RSRC (   inode)    (HFS_I(inode)->flags & HFS_FLG_RSRC)

Definition at line 76 of file hfs_fs.h.

#define hfs_m_to_utime (   time)    (struct timespec){ .tv_sec = __hfs_m_to_utime(time) }

Definition at line 247 of file hfs_fs.h.

#define hfs_mtime ( )    __hfs_u_to_mtime(get_seconds())

Definition at line 249 of file hfs_fs.h.

#define HFS_SB (   sb)    ((struct hfs_sb_info *)(sb)->s_fs_info)

Definition at line 245 of file hfs_fs.h.

#define hfs_u_to_mtime (   time)    __hfs_u_to_mtime((time).tv_sec)

Definition at line 248 of file hfs_fs.h.

#define sb_bread512 (   sb,
  sec,
  data 
)
Value:
({ \
struct buffer_head *__bh; \
sector_t __block; \
loff_t __start; \
int __offset; \
\
__start = (loff_t)(sec) << HFS_SECTOR_SIZE_BITS;\
__block = __start >> (sb)->s_blocksize_bits; \
__offset = __start & ((sb)->s_blocksize - 1); \
__bh = sb_bread((sb), __block); \
if (likely(__bh != NULL)) \
data = (void *)(__bh->b_data + __offset);\
else \
data = NULL; \
__bh; \
})

Definition at line 262 of file hfs_fs.h.

Function Documentation

void hfs_asc2mac ( struct super_block ,
struct hfs_name ,
struct qstr  
)

Definition at line 97 of file trans.c.

void hfs_cat_build_key ( struct super_block ,
btree_key ,
u32  ,
struct qstr  
)

Definition at line 23 of file catalog.c.

int hfs_cat_create ( u32  ,
struct inode ,
struct qstr ,
struct inode  
)

Definition at line 82 of file catalog.c.

int hfs_cat_delete ( u32  ,
struct inode ,
struct qstr  
)

Definition at line 208 of file catalog.c.

int hfs_cat_find_brec ( struct super_block ,
u32  ,
struct hfs_find_data  
)

Definition at line 174 of file catalog.c.

int hfs_cat_keycmp ( const btree_key ,
const btree_key  
)

Definition at line 160 of file catalog.c.

int hfs_cat_move ( u32  ,
struct inode ,
struct qstr ,
struct inode ,
struct qstr  
)

Definition at line 272 of file catalog.c.

int hfs_clear_vbm_bits ( struct super_block ,
u16  ,
u16   
)

Definition at line 193 of file bitmap.c.

int hfs_compare_dentry ( const struct dentry parent,
const struct inode pinode,
const struct dentry dentry,
const struct inode inode,
unsigned int  len,
const char str,
const struct qstr name 
)

Definition at line 96 of file string.c.

void hfs_delete_inode ( struct inode )

Definition at line 228 of file inode.c.

void hfs_evict_inode ( struct inode )

Definition at line 532 of file inode.c.

int hfs_ext_keycmp ( const btree_key ,
const btree_key  
)

Definition at line 50 of file extent.c.

void hfs_ext_write_extent ( struct inode )

Definition at line 130 of file extent.c.

int hfs_extend_file ( struct inode )

Definition at line 372 of file extent.c.

void hfs_file_truncate ( struct inode )

Definition at line 455 of file extent.c.

int hfs_free_fork ( struct super_block ,
struct hfs_cat_file ,
int   
)

Definition at line 272 of file extent.c.

int hfs_get_block ( struct inode ,
sector_t  ,
struct buffer_head *  ,
int   
)

Definition at line 319 of file extent.c.

ssize_t hfs_getxattr ( struct dentry dentry,
const char name,
void value,
size_t  size 
)

Definition at line 59 of file attr.c.

int hfs_hash_dentry ( const struct dentry ,
const struct inode ,
struct qstr  
)

Definition at line 54 of file string.c.

struct inode* hfs_iget ( struct super_block ,
struct hfs_cat_key ,
hfs_cat_rec  
)
read

Definition at line 372 of file inode.c.

void hfs_inode_read_fork ( struct inode inode,
struct hfs_extent ext,
__be32  log_size,
__be32  phys_size,
u32  clump_size 
)

Definition at line 254 of file inode.c.

int hfs_inode_setattr ( struct dentry ,
struct iattr  
)

Definition at line 585 of file inode.c.

void hfs_inode_write_fork ( struct inode ,
struct hfs_extent ,
__be32 ,
__be32  
)

Definition at line 394 of file inode.c.

ssize_t hfs_listxattr ( struct dentry dentry,
char buffer,
size_t  size 
)

Definition at line 106 of file attr.c.

int hfs_mac2asc ( struct super_block ,
char ,
const struct hfs_name  
)

Definition at line 33 of file trans.c.

void hfs_mark_mdb_dirty ( struct super_block sb)

Definition at line 68 of file super.c.

void hfs_mdb_close ( struct super_block )

Definition at line 335 of file mdb.c.

void hfs_mdb_commit ( struct super_block )

Definition at line 259 of file mdb.c.

int hfs_mdb_get ( struct super_block )

Definition at line 67 of file mdb.c.

void hfs_mdb_put ( struct super_block )

Definition at line 349 of file mdb.c.

struct inode* hfs_new_inode ( struct inode ,
struct qstr ,
umode_t   
)
read

Definition at line 172 of file inode.c.

int hfs_part_find ( struct super_block ,
sector_t ,
sector_t  
)

Definition at line 58 of file part_tbl.c.

int hfs_setxattr ( struct dentry dentry,
const char name,
const void value,
size_t  size,
int  flags 
)

Definition at line 16 of file attr.c.

int hfs_strcmp ( const unsigned char ,
unsigned  int,
const unsigned char ,
unsigned  int 
)

Definition at line 77 of file string.c.

u32 hfs_vbm_search_free ( struct super_block ,
u32  ,
u32  
)

Definition at line 139 of file bitmap.c.

int hfs_write_inode ( struct inode ,
struct writeback_control  
)

Definition at line 406 of file inode.c.

Variable Documentation

Definition at line 159 of file inode.c.

Definition at line 150 of file inode.c.

struct dentry_operations hfs_dentry_operations

Definition at line 39 of file sysdep.c.

struct inode_operations hfs_dir_inode_operations

Definition at line 308 of file dir.c.

struct file_operations hfs_dir_operations

Definition at line 301 of file dir.c.

struct timezone sys_tz

Definition at line 50 of file time.c.