annotate yaffs_linux.h @ 372:952d0cdd1cbc

Add background processing of updated directories
author charles <charles>
date Tue, 09 Mar 2010 04:12:00 +0000
parents defe00903f31
children a688086ddd0c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
357
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
1 /*
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
2 * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
3 *
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
4 * Copyright (C) 2002-2007 Aleph One Ltd.
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
5 * for Toby Churchill Ltd and Brightstar Engineering
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
6 *
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
7 * Created by Charles Manning <charles@aleph1.co.uk>
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
8 *
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
10 * it under the terms of the GNU Lesser General Public License version 2.1 as
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
11 * published by the Free Software Foundation.
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
12 *
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
13 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
14 */
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
15
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
16 #ifndef __YAFFS_LINUX_H__
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
17 #define __YAFFS_LINUX_H__
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
18
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
19 #include "devextras.h"
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
20 #include "yportenv.h"
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
21
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
22 struct yaffs_LinuxContext {
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
23 struct ylist_head contextList; /* List of these we have mounted */
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
24 struct yaffs_DeviceStruct *dev;
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
25 struct super_block * superBlock;
372
952d0cdd1cbc Add background processing of updated directories
charles <charles>
parents: 357
diff changeset
26 struct task_struct *bgThread; /* Background thread for this device */
952d0cdd1cbc Add background processing of updated directories
charles <charles>
parents: 357
diff changeset
27 int bgRunning;
357
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
28 struct semaphore grossLock; /* Gross locking semaphore */
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
29 __u8 *spareBuffer; /* For mtdif2 use. Don't know the size of the buffer
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
30 * at compile time so we have to allocate it.
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
31 */
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
32 struct mtd_info *mtd;
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
33 struct ylist_head searchContexts;
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
34 void (*putSuperFunc)(struct super_block *sb);
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
35 };
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
36
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
37 #define yaffs_DeviceToContext(dev) ((struct yaffs_LinuxContext *)((dev)->context))
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
38
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
39 #endif
defe00903f31 Rationalise context and parameter handling
charles <charles>
parents:
diff changeset
40