journal-head.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * include/linux/journal-head.h
  3.  *
  4.  * buffer_head fields for JBD
  5.  *
  6.  * 27 May 2001 ANdrew Morton <andrewm@uow.edu.au>
  7.  * Created - pulled out of fs.h
  8.  */
  9. #ifndef JOURNAL_HEAD_H_INCLUDED
  10. #define JOURNAL_HEAD_H_INCLUDED
  11. typedef unsigned int tid_t; /* Unique transaction ID */
  12. typedef struct transaction_s transaction_t; /* Compound transaction type */
  13. struct buffer_head;
  14. struct journal_head {
  15. #ifndef CONFIG_JBD_UNIFIED_BUFFERS
  16. /* Points back to our buffer_head. */
  17. struct buffer_head *b_bh;
  18. #endif
  19. /* Reference count - see description in journal.c */
  20. int b_jcount;
  21. /* Journaling list for this buffer */
  22. unsigned b_jlist;
  23. /* Copy of the buffer data frozen for writing to the log. */
  24. char * b_frozen_data;
  25. /* Pointer to a saved copy of the buffer containing no
  26.            uncommitted deallocation references, so that allocations can
  27.            avoid overwriting uncommitted deletes. */
  28. char * b_committed_data;
  29. /* Pointer to the compound transaction which owns this buffer's
  30.            metadata: either the running transaction or the committing
  31.            transaction (if there is one).  Only applies to buffers on a
  32.            transaction's data or metadata journaling list. */
  33. /* Protected by journal_datalist_lock */
  34. transaction_t * b_transaction;
  35. /* Pointer to the running compound transaction which is
  36.            currently modifying the buffer's metadata, if there was
  37.            already a transaction committing it when the new transaction
  38.            touched it. */
  39. transaction_t * b_next_transaction;
  40. /* Doubly-linked list of buffers on a transaction's data,
  41.            metadata or forget queue. */
  42. /* Protected by journal_datalist_lock */
  43. struct journal_head *b_tnext, *b_tprev;
  44. /*
  45.  * Pointer to the compound transaction against which this buffer
  46.  * is checkpointed.  Only dirty buffers can be checkpointed.
  47.  */
  48. /* Protected by journal_datalist_lock */
  49. transaction_t * b_cp_transaction;
  50. /*
  51.  * Doubly-linked list of buffers still remaining to be flushed
  52.  * before an old transaction can be checkpointed.
  53.  */
  54. /* Protected by journal_datalist_lock */
  55. struct journal_head *b_cpnext, *b_cpprev;
  56. };
  57. #endif /* JOURNAL_HEAD_H_INCLUDED */