yaffs_linux.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 <[email protected]>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU Lesser General Public License version 2.1 as
  11. * published by the Free Software Foundation.
  12. *
  13. * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  14. */
  15. #ifndef __YAFFS_LINUX_H__
  16. #define __YAFFS_LINUX_H__
  17. #include "devextras.h"
  18. #include "yportenv.h"
  19. struct yaffs_LinuxContext {
  20. struct ylist_head contextList; /* List of these we have mounted */
  21. struct yaffs_dev_s *dev;
  22. struct super_block * superBlock;
  23. struct task_struct *bgThread; /* Background thread for this device */
  24. int bgRunning;
  25. struct semaphore grossLock; /* Gross locking semaphore */
  26. __u8 *spareBuffer; /* For mtdif2 use. Don't know the size of the buffer
  27. * at compile time so we have to allocate it.
  28. */
  29. struct ylist_head searchContexts;
  30. void (*putSuperFunc)(struct super_block *sb);
  31. struct task_struct *readdirProcess;
  32. unsigned mount_id;
  33. };
  34. #define yaffs_dev_to_lc(dev) ((struct yaffs_LinuxContext *)((dev)->os_context))
  35. #define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driver_context))
  36. #endif