#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <linux/crc32.h>
#include <linux/mtd/rawnand.h>
#include <linux/jiffies.h>
#include <linux/sched.h>
#include <linux/writeback.h>
#include "nodelist.h"
#undef BREAKME
#undef BREAKMEHEADER
#ifdef BREAKME
static unsigned char *brokenbuf;
#endif
#define PAGE_DIV(x) …
#define PAGE_MOD(x) …
#define MAX_ERASE_FAILURES …
struct jffs2_inodirty { … };
static struct jffs2_inodirty inodirty_nomem;
static int jffs2_wbuf_pending_for_ino(struct jffs2_sb_info *c, uint32_t ino)
{ … }
static void jffs2_clear_wbuf_ino_list(struct jffs2_sb_info *c)
{ … }
static void jffs2_wbuf_dirties_inode(struct jffs2_sb_info *c, uint32_t ino)
{ … }
static inline void jffs2_refile_wbuf_blocks(struct jffs2_sb_info *c)
{ … }
#define REFILE_NOTEMPTY …
#define REFILE_ANYWAY …
static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, int allow_empty)
{ … }
static struct jffs2_raw_node_ref **jffs2_incore_replace_raw(struct jffs2_sb_info *c,
struct jffs2_inode_info *f,
struct jffs2_raw_node_ref *raw,
union jffs2_node_union *node)
{ … }
#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
static int jffs2_verify_write(struct jffs2_sb_info *c, unsigned char *buf,
uint32_t ofs)
{ … }
#else
#define jffs2_verify_write …
#endif
static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
{ … }
#define NOPAD …
#define PAD_NOACCOUNT …
#define PAD_ACCOUNTING …
static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad)
{ … }
int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino)
{ … }
int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c)
{ … }
static size_t jffs2_fill_wbuf(struct jffs2_sb_info *c, const uint8_t *buf,
size_t len)
{ … }
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)
{ … }
#define NR_OOB_SCAN_PAGES …
#define OOB_CM_SIZE …
static const struct jffs2_unknown_node oob_cleanmarker = …;
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)
{ … }
static struct jffs2_sb_info *work_to_sb(struct work_struct *work)
{ … }
static void delayed_wbuf_sync(struct work_struct *work)
{ … }
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) { … }