Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
os-linux.h File Reference

Go to the source code of this file.

Macros

#define os_to_jffs2_mode(x)   (x)
 
#define jffs2_to_os_mode(x)   (x)
 
#define JFFS2_INODE_INFO(i)   (list_entry(i, struct jffs2_inode_info, vfs_inode))
 
#define OFNI_EDONI_2SFFJ(f)   (&(f)->vfs_inode)
 
#define JFFS2_SB_INFO(sb)   (sb->s_fs_info)
 
#define OFNI_BS_2SFFJ(c)   ((struct super_block *)c->os_priv)
 
#define JFFS2_F_I_SIZE(f)   (OFNI_EDONI_2SFFJ(f)->i_size)
 
#define JFFS2_F_I_MODE(f)   (OFNI_EDONI_2SFFJ(f)->i_mode)
 
#define JFFS2_F_I_UID(f)   (i_uid_read(OFNI_EDONI_2SFFJ(f)))
 
#define JFFS2_F_I_GID(f)   (i_gid_read(OFNI_EDONI_2SFFJ(f)))
 
#define JFFS2_F_I_RDEV(f)   (OFNI_EDONI_2SFFJ(f)->i_rdev)
 
#define ITIME(sec)   ((struct timespec){sec, 0})
 
#define I_SEC(tv)   ((tv).tv_sec)
 
#define JFFS2_F_I_CTIME(f)   (OFNI_EDONI_2SFFJ(f)->i_ctime.tv_sec)
 
#define JFFS2_F_I_MTIME(f)   (OFNI_EDONI_2SFFJ(f)->i_mtime.tv_sec)
 
#define JFFS2_F_I_ATIME(f)   (OFNI_EDONI_2SFFJ(f)->i_atime.tv_sec)
 
#define sleep_on_spinunlock(wq, s)
 
#define jffs2_is_readonly(c)   (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY)
 
#define SECTOR_ADDR(x)   ( (((unsigned long)(x) / c->sector_size) * c->sector_size) )
 
#define jffs2_can_mark_obsolete(c)   (1)
 
#define jffs2_is_writebuffered(c)   (0)
 
#define jffs2_cleanmarker_oob(c)   (0)
 
#define jffs2_write_nand_cleanmarker(c, jeb)   (-EIO)
 
#define jffs2_flash_write(c, ofs, len, retlen, buf)   jffs2_flash_direct_write(c, ofs, len, retlen, buf)
 
#define jffs2_flash_read(c, ofs, len, retlen, buf)   (mtd_read((c)->mtd, ofs, len, retlen, buf))
 
#define jffs2_flush_wbuf_pad(c)   ({ do{} while(0); (void)(c), 0; })
 
#define jffs2_flush_wbuf_gc(c, i)   ({ do{} while(0); (void)(c), (void) i, 0; })
 
#define jffs2_write_nand_badblock(c, jeb, bad_offset)   (1)
 
#define jffs2_nand_flash_setup(c)   (0)
 
#define jffs2_nand_flash_cleanup(c)   do {} while(0)
 
#define jffs2_wbuf_dirty(c)   (0)
 
#define jffs2_flash_writev(a, b, c, d, e, f)   jffs2_flash_direct_writev(a,b,c,d,e)
 
#define jffs2_wbuf_timeout   NULL
 
#define jffs2_wbuf_process   NULL
 
#define jffs2_dataflash(c)   (0)
 
#define jffs2_dataflash_setup(c)   (0)
 
#define jffs2_dataflash_cleanup(c)   do {} while (0)
 
#define jffs2_nor_wbuf_flash(c)   (0)
 
#define jffs2_nor_wbuf_flash_setup(c)   (0)
 
#define jffs2_nor_wbuf_flash_cleanup(c)   do {} while (0)
 
#define jffs2_ubivol(c)   (0)
 
#define jffs2_ubivol_setup(c)   (0)
 
#define jffs2_ubivol_cleanup(c)   do {} while (0)
 
#define jffs2_dirty_trigger(c)   do {} while (0)
 

Functions

int jffs2_start_garbage_collect_thread (struct jffs2_sb_info *c)
 
void jffs2_stop_garbage_collect_thread (struct jffs2_sb_info *c)
 
void jffs2_garbage_collect_trigger (struct jffs2_sb_info *c)
 
int jffs2_fsync (struct file *, loff_t, loff_t, int)
 
int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg)
 
long jffs2_ioctl (struct file *, unsigned int, unsigned long)
 
int jffs2_setattr (struct dentry *, struct iattr *)
 
int jffs2_do_setattr (struct inode *, struct iattr *)
 
struct inodejffs2_iget (struct super_block *, unsigned long)
 
void jffs2_evict_inode (struct inode *)
 
void jffs2_dirty_inode (struct inode *inode, int flags)
 
struct inodejffs2_new_inode (struct inode *dir_i, umode_t mode, struct jffs2_raw_inode *ri)
 
int jffs2_statfs (struct dentry *, struct kstatfs *)
 
int jffs2_do_remount_fs (struct super_block *, int *, char *)
 
int jffs2_do_fill_super (struct super_block *sb, void *data, int silent)
 
void jffs2_gc_release_inode (struct jffs2_sb_info *c, struct jffs2_inode_info *f)
 
struct jffs2_inode_infojffs2_gc_fetch_inode (struct jffs2_sb_info *c, int inum, int unlinked)
 
unsigned charjffs2_gc_fetch_page (struct jffs2_sb_info *c, struct jffs2_inode_info *f, unsigned long offset, unsigned long *priv)
 
void jffs2_gc_release_page (struct jffs2_sb_info *c, unsigned char *pg, unsigned long *priv)
 
void jffs2_flash_cleanup (struct jffs2_sb_info *c)
 
int jffs2_flash_direct_writev (struct jffs2_sb_info *c, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen)
 
int jffs2_flash_direct_write (struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char *buf)
 

Variables

struct file_operations jffs2_dir_operations
 
struct inode_operations jffs2_dir_inode_operations
 
struct file_operations jffs2_file_operations
 
struct inode_operations jffs2_file_inode_operations
 
struct address_space_operations jffs2_file_address_operations
 
struct inode_operations jffs2_symlink_inode_operations
 

Macro Definition Documentation

#define I_SEC (   tv)    ((tv).tv_sec)

Definition at line 35 of file os-linux.h.

#define ITIME (   sec)    ((struct timespec){sec, 0})

Definition at line 34 of file os-linux.h.

#define jffs2_can_mark_obsolete (   c)    (1)

Definition at line 71 of file os-linux.h.

#define jffs2_cleanmarker_oob (   c)    (0)

Definition at line 75 of file os-linux.h.

#define jffs2_dataflash (   c)    (0)

Definition at line 89 of file os-linux.h.

#define jffs2_dataflash_cleanup (   c)    do {} while (0)

Definition at line 91 of file os-linux.h.

#define jffs2_dataflash_setup (   c)    (0)

Definition at line 90 of file os-linux.h.

#define jffs2_dirty_trigger (   c)    do {} while (0)

Definition at line 98 of file os-linux.h.

#define JFFS2_F_I_ATIME (   f)    (OFNI_EDONI_2SFFJ(f)->i_atime.tv_sec)

Definition at line 38 of file os-linux.h.

#define JFFS2_F_I_CTIME (   f)    (OFNI_EDONI_2SFFJ(f)->i_ctime.tv_sec)

Definition at line 36 of file os-linux.h.

#define JFFS2_F_I_GID (   f)    (i_gid_read(OFNI_EDONI_2SFFJ(f)))

Definition at line 31 of file os-linux.h.

#define JFFS2_F_I_MODE (   f)    (OFNI_EDONI_2SFFJ(f)->i_mode)

Definition at line 29 of file os-linux.h.

#define JFFS2_F_I_MTIME (   f)    (OFNI_EDONI_2SFFJ(f)->i_mtime.tv_sec)

Definition at line 37 of file os-linux.h.

#define JFFS2_F_I_RDEV (   f)    (OFNI_EDONI_2SFFJ(f)->i_rdev)

Definition at line 32 of file os-linux.h.

#define JFFS2_F_I_SIZE (   f)    (OFNI_EDONI_2SFFJ(f)->i_size)

Definition at line 28 of file os-linux.h.

#define JFFS2_F_I_UID (   f)    (i_uid_read(OFNI_EDONI_2SFFJ(f)))

Definition at line 30 of file os-linux.h.

#define jffs2_flash_read (   c,
  ofs,
  len,
  retlen,
  buf 
)    (mtd_read((c)->mtd, ofs, len, retlen, buf))

Definition at line 79 of file os-linux.h.

#define jffs2_flash_write (   c,
  ofs,
  len,
  retlen,
  buf 
)    jffs2_flash_direct_write(c, ofs, len, retlen, buf)

Definition at line 78 of file os-linux.h.

#define jffs2_flash_writev (   a,
  b,
  c,
  d,
  e,
  f 
)    jffs2_flash_direct_writev(a,b,c,d,e)

Definition at line 86 of file os-linux.h.

#define jffs2_flush_wbuf_gc (   c,
  i 
)    ({ do{} while(0); (void)(c), (void) i, 0; })

Definition at line 81 of file os-linux.h.

#define jffs2_flush_wbuf_pad (   c)    ({ do{} while(0); (void)(c), 0; })

Definition at line 80 of file os-linux.h.

#define JFFS2_INODE_INFO (   i)    (list_entry(i, struct jffs2_inode_info, vfs_inode))

Definition at line 22 of file os-linux.h.

#define jffs2_is_readonly (   c)    (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY)

Definition at line 62 of file os-linux.h.

#define jffs2_is_writebuffered (   c)    (0)

Definition at line 74 of file os-linux.h.

#define jffs2_nand_flash_cleanup (   c)    do {} while(0)

Definition at line 84 of file os-linux.h.

#define jffs2_nand_flash_setup (   c)    (0)

Definition at line 83 of file os-linux.h.

#define jffs2_nor_wbuf_flash (   c)    (0)

Definition at line 92 of file os-linux.h.

#define jffs2_nor_wbuf_flash_cleanup (   c)    do {} while (0)

Definition at line 94 of file os-linux.h.

#define jffs2_nor_wbuf_flash_setup (   c)    (0)

Definition at line 93 of file os-linux.h.

#define JFFS2_SB_INFO (   sb)    (sb->s_fs_info)

Definition at line 24 of file os-linux.h.

#define jffs2_to_os_mode (   x)    (x)

Definition at line 17 of file os-linux.h.

#define jffs2_ubivol (   c)    (0)

Definition at line 95 of file os-linux.h.

#define jffs2_ubivol_cleanup (   c)    do {} while (0)

Definition at line 97 of file os-linux.h.

#define jffs2_ubivol_setup (   c)    (0)

Definition at line 96 of file os-linux.h.

#define jffs2_wbuf_dirty (   c)    (0)

Definition at line 85 of file os-linux.h.

#define jffs2_wbuf_process   NULL

Definition at line 88 of file os-linux.h.

#define jffs2_wbuf_timeout   NULL

Definition at line 87 of file os-linux.h.

#define jffs2_write_nand_badblock (   c,
  jeb,
  bad_offset 
)    (1)

Definition at line 82 of file os-linux.h.

#define jffs2_write_nand_cleanmarker (   c,
  jeb 
)    (-EIO)

Definition at line 76 of file os-linux.h.

#define OFNI_BS_2SFFJ (   c)    ((struct super_block *)c->os_priv)

Definition at line 25 of file os-linux.h.

#define OFNI_EDONI_2SFFJ (   f)    (&(f)->vfs_inode)

Definition at line 23 of file os-linux.h.

#define os_to_jffs2_mode (   x)    (x)

Definition at line 16 of file os-linux.h.

#define SECTOR_ADDR (   x)    ( (((unsigned long)(x) / c->sector_size) * c->sector_size) )

Definition at line 64 of file os-linux.h.

#define sleep_on_spinunlock (   wq,
  s 
)
Value:
do { \
DECLARE_WAITQUEUE(__wait, current); \
add_wait_queue((wq), &__wait); \
set_current_state(TASK_UNINTERRUPTIBLE); \
spin_unlock(s); \
schedule(); \
remove_wait_queue((wq), &__wait); \
} while(0)

Definition at line 40 of file os-linux.h.

Function Documentation

void jffs2_dirty_inode ( struct inode inode,
int  flags 
)

Definition at line 370 of file fs.c.

int jffs2_do_fill_super ( struct super_block sb,
void data,
int  silent 
)

Definition at line 509 of file fs.c.

int jffs2_do_readpage_unlock ( struct inode inode,
struct page pg 
)

Definition at line 115 of file file.c.

int jffs2_do_remount_fs ( struct super_block ,
int ,
char  
)

Definition at line 394 of file fs.c.

int jffs2_do_setattr ( struct inode ,
struct iattr  
)

Definition at line 30 of file fs.c.

void jffs2_evict_inode ( struct inode )

Definition at line 234 of file fs.c.

void jffs2_flash_cleanup ( struct jffs2_sb_info c)

Definition at line 738 of file fs.c.

int jffs2_flash_direct_write ( struct jffs2_sb_info c,
loff_t  ofs,
size_t  len,
size_t retlen,
const u_char buf 
)

Definition at line 32 of file writev.c.

int jffs2_flash_direct_writev ( struct jffs2_sb_info c,
const struct kvec vecs,
unsigned long  count,
loff_t  to,
size_t retlen 
)

Definition at line 16 of file writev.c.

int jffs2_fsync ( struct file ,
loff_t  ,
loff_t  ,
int   
)

Definition at line 32 of file file.c.

void jffs2_garbage_collect_trigger ( struct jffs2_sb_info c)

Definition at line 27 of file background.c.

struct jffs2_inode_info* jffs2_gc_fetch_inode ( struct jffs2_sb_info c,
int  inum,
int  unlinked 
)
read

Definition at line 612 of file fs.c.

unsigned char* jffs2_gc_fetch_page ( struct jffs2_sb_info c,
struct jffs2_inode_info f,
unsigned long  offset,
unsigned long priv 
)

Definition at line 677 of file fs.c.

void jffs2_gc_release_inode ( struct jffs2_sb_info c,
struct jffs2_inode_info f 
)

Definition at line 606 of file fs.c.

void jffs2_gc_release_page ( struct jffs2_sb_info c,
unsigned char pg,
unsigned long priv 
)

Definition at line 694 of file fs.c.

struct inode* jffs2_iget ( struct super_block ,
unsigned  long 
)
read

Definition at line 249 of file fs.c.

long jffs2_ioctl ( struct file ,
unsigned  int,
unsigned  long 
)

Definition at line 16 of file ioctl.c.

struct inode* jffs2_new_inode ( struct inode dir_i,
umode_t  mode,
struct jffs2_raw_inode ri 
)
read

Definition at line 421 of file fs.c.

int jffs2_setattr ( struct dentry ,
struct iattr  
)

Definition at line 191 of file fs.c.

int jffs2_start_garbage_collect_thread ( struct jffs2_sb_info c)

Definition at line 35 of file background.c.

int jffs2_statfs ( struct dentry ,
struct kstatfs  
)

Definition at line 206 of file fs.c.

void jffs2_stop_garbage_collect_thread ( struct jffs2_sb_info c)

Definition at line 61 of file background.c.

Variable Documentation

struct inode_operations jffs2_dir_inode_operations

Definition at line 50 of file dir.c.

struct file_operations jffs2_dir_operations

Definition at line 40 of file dir.c.

struct address_space_operations jffs2_file_address_operations

Definition at line 76 of file file.c.

struct inode_operations jffs2_file_inode_operations

Definition at line 66 of file file.c.

struct file_operations jffs2_file_operations

Definition at line 50 of file file.c.

struct inode_operations jffs2_symlink_inode_operations

Definition at line 21 of file symlink.c.