aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/os-linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/os-linux.h')
-rw-r--r--fs/jffs2/os-linux.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index c3c1619fb137..e026888cf1cb 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: os-linux.h,v 1.60 2005/08/06 04:51:30 nico Exp $ 10 * $Id: os-linux.h,v 1.61 2005/09/07 08:34:54 havasi Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -67,12 +67,18 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
67 67
68#ifndef CONFIG_JFFS2_FS_WRITEBUFFER 68#ifndef CONFIG_JFFS2_FS_WRITEBUFFER
69#define SECTOR_ADDR(x) ( ((unsigned long)(x) & ~(c->sector_size-1)) ) 69#define SECTOR_ADDR(x) ( ((unsigned long)(x) & ~(c->sector_size-1)) )
70
71#ifdef CONFIG_JFFS2_SUMMARY
72#define jffs2_can_mark_obsolete(c) (0)
73#else
70#define jffs2_can_mark_obsolete(c) (1) 74#define jffs2_can_mark_obsolete(c) (1)
75#endif
76
71#define jffs2_is_writebuffered(c) (0) 77#define jffs2_is_writebuffered(c) (0)
72#define jffs2_cleanmarker_oob(c) (0) 78#define jffs2_cleanmarker_oob(c) (0)
73#define jffs2_write_nand_cleanmarker(c,jeb) (-EIO) 79#define jffs2_write_nand_cleanmarker(c,jeb) (-EIO)
74 80
75#define jffs2_flash_write(c, ofs, len, retlen, buf) ((c)->mtd->write((c)->mtd, ofs, len, retlen, buf)) 81#define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, buf)
76#define jffs2_flash_read(c, ofs, len, retlen, buf) ((c)->mtd->read((c)->mtd, ofs, len, retlen, buf)) 82#define jffs2_flash_read(c, ofs, len, retlen, buf) ((c)->mtd->read((c)->mtd, ofs, len, retlen, buf))
77#define jffs2_flush_wbuf_pad(c) ({ (void)(c), 0; }) 83#define jffs2_flush_wbuf_pad(c) ({ (void)(c), 0; })
78#define jffs2_flush_wbuf_gc(c, i) ({ (void)(c), (void) i, 0; }) 84#define jffs2_flush_wbuf_gc(c, i) ({ (void)(c), (void) i, 0; })
@@ -97,9 +103,15 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
97 103
98#define jffs2_is_writebuffered(c) (c->wbuf != NULL) 104#define jffs2_is_writebuffered(c) (c->wbuf != NULL)
99#define SECTOR_ADDR(x) ( ((unsigned long)(x) / (unsigned long)(c->sector_size)) * c->sector_size ) 105#define SECTOR_ADDR(x) ( ((unsigned long)(x) / (unsigned long)(c->sector_size)) * c->sector_size )
106
107#ifdef CONFIG_JFFS2_SUMMARY
108#define jffs2_can_mark_obsolete(c) (0)
109#else
100#define jffs2_can_mark_obsolete(c) \ 110#define jffs2_can_mark_obsolete(c) \
101 ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_ECC|MTD_PROGRAM_REGIONS))) || \ 111 ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_ECC|MTD_PROGRAM_REGIONS))) || \
102 c->mtd->type == MTD_RAM) 112 c->mtd->type == MTD_RAM)
113#endif
114
103#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) 115#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
104 116
105#define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf)) 117#define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
@@ -192,7 +204,8 @@ void jffs2_flash_cleanup(struct jffs2_sb_info *c);
192/* writev.c */ 204/* writev.c */
193int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs, 205int jffs2_flash_direct_writev(struct jffs2_sb_info *c, const struct kvec *vecs,
194 unsigned long count, loff_t to, size_t *retlen); 206 unsigned long count, loff_t to, size_t *retlen);
195 207int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len,
208 size_t *retlen, const u_char *buf);
196 209
197#endif /* __JFFS2_OS_LINUX_H__ */ 210#endif /* __JFFS2_OS_LINUX_H__ */
198 211