summaryrefslogtreecommitdiff
path: root/fs/jffs2/erase.c
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2005-02-09 12:09:05 +0300
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-05-23 14:27:09 +0400
commit3be36675d41a30ed3b192f92684f1417aa0f8bfe (patch)
treeda8395bb14ffef19e551c509c47d16b52fb536d9 /fs/jffs2/erase.c
parent045e9a5d51ced27bfcbdb78071534ce6fd36b33d (diff)
downloadlinux-3be36675d41a30ed3b192f92684f1417aa0f8bfe.tar.xz
[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>
Diffstat (limited to 'fs/jffs2/erase.c')
-rw-r--r--fs/jffs2/erase.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index 41451e8bf361..ae858f878875 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: erase.c,v 1.66 2004/11/16 20:36:11 dwmw2 Exp $
+ * $Id: erase.c,v 1.70 2005/02/09 09:09:01 pavlov Exp $
*
*/
@@ -233,7 +233,7 @@ static inline void jffs2_remove_node_refs_from_ino_list(struct jffs2_sb_info *c,
continue;
}
- if (((*prev)->flash_offset & ~(c->sector_size -1)) == jeb->offset) {
+ if (SECTOR_ADDR((*prev)->flash_offset) == jeb->offset) {
/* It's in the block we're erasing */
struct jffs2_raw_node_ref *this;