| 1 | /* |
| 2 | * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. |
| 3 | * |
| 4 | * Copyright (C) 2002-2010 Aleph One Ltd. |
| 5 | * for Toby Churchill Ltd and Brightstar Engineering |
| 6 | * |
| 7 | * Created by Charles Manning <charles@aleph1.co.uk> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. |
| 12 | */ |
| 13 | |
| 14 | #ifndef __YAFFS_YAFFS2_H__ |
| 15 | #define __YAFFS_YAFFS2_H__ |
| 16 | |
| 17 | #include "yaffs_guts.h" |
| 18 | |
| 19 | void yaffs_calc_oldest_dirty_seq(yaffs_dev_t *dev); |
| 20 | void yaffs2_find_oldest_dirty_seq(yaffs_dev_t *dev); |
| 21 | void yaffs2_clear_oldest_dirty_seq(yaffs_dev_t *dev, yaffs_block_info_t *bi); |
| 22 | void yaffs2_update_oldest_dirty_seq(yaffs_dev_t *dev, unsigned block_no, yaffs_block_info_t *bi); |
| 23 | int yaffs_block_ok_for_gc(yaffs_dev_t *dev, yaffs_block_info_t *bi); |
| 24 | __u32 yaffs2_find_refresh_block(yaffs_dev_t *dev); |
| 25 | int yaffs2_checkpt_required(yaffs_dev_t *dev); |
| 26 | int yaffs_calc_checkpt_blocks_required(yaffs_dev_t *dev); |
| 27 | |
| 28 | |
| 29 | void yaffs2_checkpt_invalidate(yaffs_dev_t *dev); |
| 30 | int yaffs2_checkpt_save(yaffs_dev_t *dev); |
| 31 | int yaffs2_checkpt_restore(yaffs_dev_t *dev); |
| 32 | |
| 33 | int yaffs2_handle_hole(yaffs_obj_t *obj, loff_t new_size); |
| 34 | int yaffs2_scan_backwards(yaffs_dev_t *dev); |
| 35 | |
| 36 | #endif |
| 37 | |