Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
wbuf.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <linux/crc32.h>
#include <linux/mtd/nand.h>
#include <linux/jiffies.h>
#include <linux/sched.h>
#include <linux/writeback.h>
#include "nodelist.h"

Go to the source code of this file.

Data Structures

struct  jffs2_inodirty
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define PAGE_DIV(x)   ( ((unsigned long)(x) / (unsigned long)(c->wbuf_pagesize)) * (unsigned long)(c->wbuf_pagesize) )
 
#define PAGE_MOD(x)   ( (unsigned long)(x) % (unsigned long)(c->wbuf_pagesize) )
 
#define MAX_ERASE_FAILURES   2
 
#define REFILE_NOTEMPTY   0
 
#define REFILE_ANYWAY   1
 
#define jffs2_verify_write(c, b, o)   (0)
 
#define NOPAD   0
 
#define PAD_NOACCOUNT   1
 
#define PAD_ACCOUNTING   2
 
#define NR_OOB_SCAN_PAGES   4
 
#define OOB_CM_SIZE   8
 

Functions

int jffs2_flush_wbuf_gc (struct jffs2_sb_info *c, uint32_t ino)
 
int jffs2_flush_wbuf_pad (struct jffs2_sb_info *c)
 
int jffs2_flash_writev (struct jffs2_sb_info *c, const struct kvec *invecs, unsigned long count, loff_t to, size_t *retlen, uint32_t ino)
 
int jffs2_flash_write (struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char *buf)
 
int jffs2_flash_read (struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, u_char *buf)
 
int jffs2_check_oob_empty (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, int mode)
 
int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
 
int jffs2_write_nand_cleanmarker (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
 
int jffs2_write_nand_badblock (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_offset)
 
void jffs2_dirty_trigger (struct jffs2_sb_info *c)
 
int jffs2_nand_flash_setup (struct jffs2_sb_info *c)
 
void jffs2_nand_flash_cleanup (struct jffs2_sb_info *c)
 
int jffs2_dataflash_setup (struct jffs2_sb_info *c)
 
void jffs2_dataflash_cleanup (struct jffs2_sb_info *c)
 
int jffs2_nor_wbuf_flash_setup (struct jffs2_sb_info *c)
 
void jffs2_nor_wbuf_flash_cleanup (struct jffs2_sb_info *c)
 
int jffs2_ubivol_setup (struct jffs2_sb_info *c)
 
void jffs2_ubivol_cleanup (struct jffs2_sb_info *c)
 

Macro Definition Documentation

#define jffs2_verify_write (   c,
  b,
 
)    (0)

Definition at line 269 of file wbuf.c.

#define MAX_ERASE_FAILURES   2

Definition at line 39 of file wbuf.c.

#define NOPAD   0

Definition at line 576 of file wbuf.c.

#define NR_OOB_SCAN_PAGES   4

Definition at line 1017 of file wbuf.c.

#define OOB_CM_SIZE   8

Definition at line 1020 of file wbuf.c.

#define PAD_ACCOUNTING   2

Definition at line 578 of file wbuf.c.

#define PAD_NOACCOUNT   1

Definition at line 577 of file wbuf.c.

#define PAGE_DIV (   x)    ( ((unsigned long)(x) / (unsigned long)(c->wbuf_pagesize)) * (unsigned long)(c->wbuf_pagesize) )

Definition at line 35 of file wbuf.c.

#define PAGE_MOD (   x)    ( (unsigned long)(x) % (unsigned long)(c->wbuf_pagesize) )

Definition at line 36 of file wbuf.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 14 of file wbuf.c.

#define REFILE_ANYWAY   1

Definition at line 139 of file wbuf.c.

#define REFILE_NOTEMPTY   0

Definition at line 138 of file wbuf.c.

Function Documentation

int jffs2_check_nand_cleanmarker ( struct jffs2_sb_info c,
struct jffs2_eraseblock jeb 
)

Definition at line 1076 of file wbuf.c.

int jffs2_check_oob_empty ( struct jffs2_sb_info c,
struct jffs2_eraseblock jeb,
int  mode 
)

Definition at line 1033 of file wbuf.c.

void jffs2_dataflash_cleanup ( struct jffs2_sb_info c)

Definition at line 1300 of file wbuf.c.

int jffs2_dataflash_setup ( struct jffs2_sb_info c)

Definition at line 1249 of file wbuf.c.

void jffs2_dirty_trigger ( struct jffs2_sb_info c)

Definition at line 1175 of file wbuf.c.

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

Definition at line 957 of file wbuf.c.

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

Definition at line 941 of file wbuf.c.

int jffs2_flash_writev ( struct jffs2_sb_info c,
const struct kvec invecs,
unsigned long  count,
loff_t  to,
size_t retlen,
uint32_t  ino 
)

Definition at line 794 of file wbuf.c.

int jffs2_flush_wbuf_gc ( struct jffs2_sb_info c,
uint32_t  ino 
)

Definition at line 702 of file wbuf.c.

int jffs2_flush_wbuf_pad ( struct jffs2_sb_info c)

Definition at line 764 of file wbuf.c.

void jffs2_nand_flash_cleanup ( struct jffs2_sb_info c)

Definition at line 1240 of file wbuf.c.

int jffs2_nand_flash_setup ( struct jffs2_sb_info c)

Definition at line 1193 of file wbuf.c.

void jffs2_nor_wbuf_flash_cleanup ( struct jffs2_sb_info c)

Definition at line 1334 of file wbuf.c.

int jffs2_nor_wbuf_flash_setup ( struct jffs2_sb_info c)

Definition at line 1307 of file wbuf.c.

void jffs2_ubivol_cleanup ( struct jffs2_sb_info c)

Definition at line 1364 of file wbuf.c.

int jffs2_ubivol_setup ( struct jffs2_sb_info c)

Definition at line 1341 of file wbuf.c.

int jffs2_write_nand_badblock ( struct jffs2_sb_info c,
struct jffs2_eraseblock jeb,
uint32_t  bad_offset 
)

Definition at line 1133 of file wbuf.c.

int jffs2_write_nand_cleanmarker ( struct jffs2_sb_info c,
struct jffs2_eraseblock jeb 
)

Definition at line 1100 of file wbuf.c.