Mercurial > yaffs-ecoscentric-gpl
view yaffs_tagsvalidity.c @ 400:fb6ffedcfa89
Add one-shot feature for yaffs auto checkpointing.
This feature is enabling by ORing in 0x04 to the yaffs_auto_checkpoint
module parameter. This will do a one-shot checkpoint on the next sync and
the bit will then be reset.
This is a nice way to force a checkpoint on the next sync. eg.
echo 6 > /sys/modules/yaffs/parameters/yaffs_auto_checkpoint
sync
yaffs_auto_checkpoint will now be 2
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
| author | Charles Manning <cdhmanning@gmail.com> |
|---|---|
| date | Mon, 12 Apr 2010 16:55:22 +1200 |
| parents | c0dfae9e8073 |
| children | b5309c9b6d7f |
line wrap: on
line source
/* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * * Copyright (C) 2002-2007 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * * Created by Charles Manning <charles@aleph1.co.uk> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include "yaffs_tagsvalidity.h" void yaffs_InitialiseTags(yaffs_ExtendedTags *tags) { memset(tags, 0, sizeof(yaffs_ExtendedTags)); tags->validMarker0 = 0xAAAAAAAA; tags->validMarker1 = 0x55555555; } int yaffs_ValidateTags(yaffs_ExtendedTags *tags) { return (tags->validMarker0 == 0xAAAAAAAA && tags->validMarker1 == 0x55555555); }
