[JFFS2] Core changes required to support JFFS2-on-Dataflash devices.
authorAndrew Victor <andrew@sanpeople.com>
Wed, 9 Feb 2005 09:09:05 +0000 (09:09 +0000)
committerThomas Gleixner <tglx@mtd.linutronix.de>
Mon, 23 May 2005 10:27:09 +0000 (12:27 +0200)
commit3be36675d41a30ed3b192f92684f1417aa0f8bfe
treeda8395bb14ffef19e551c509c47d16b52fb536d9
parent045e9a5d51ced27bfcbdb78071534ce6fd36b33d
[JFFS2] Core changes required to support JFFS2-on-Dataflash devices.

DataFlash page-sizes are not a power of two (they're multiples of 528
bytes).  There are a few places in JFFS2 code where sector_size is used
as a bitmask.  A new macro (SECTOR_ADDR) was defined to calculate these
sector addresses. For non-DataFlash devices, the original (faster)
bitmask operation is still used.

In scan.c, the EMPTY_SCAN_SIZE was a constant of 1024.
Since this could be larger than the sector size of the DataFlash, this
is now basically set to MIN(sector_size, 1024).

Addition of a jffs2_is_writebuffered() macro.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
fs/jffs2/erase.c
fs/jffs2/gc.c
fs/jffs2/os-linux.h
fs/jffs2/scan.c
fs/jffs2/wbuf.c