Chinaunix首页 | 论坛 | 博客
  • 博客访问: 840386
  • 博文数量: 581
  • 博客积分: 7803
  • 博客等级: 少将
  • 技术积分: 3653
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-27 08:21
文章分类

全部博文(581)

文章存档

2013年(7)

2012年(414)

2011年(159)

2009年(1)

分类: LINUX

2012-03-06 16:37:41

http://blog.csdn.net/chenjin_zhong/article/details/6931046

b_state 表示缓冲区的状态,合法的标志存放在 bh_state_bits中,该枚举在中定义。

enum bh_state_bits {
    BH_Uptodate,    /* Contains valid data *该缓冲区包含可用数据/
    BH_Dirty,    /* Is dirty 该缓冲区是脏的,缓冲区的内容比磁盘中的块内容要新,所以缓冲区的内容必须被写回磁盘*/
    BH_Lock,    /* Is locked 该缓冲区正在被I/O操作访问,被锁定以防止并发访问*/
    BH_Req,        /* Has been submitted for I/O *该缓冲区有I/O请求操作/
    BH_Uptodate_Lock,/* Used by the first bh in a page, to serialise
              * IO completion of other buffers in the page
              */

    BH_Mapped,    /* Has a disk mapping 该缓冲区是映射磁盘块的可用缓冲区*/
    BH_New,        /* Disk mapping was newly created by get_block *缓冲区是通过get_block()刚刚映射的,尚且不能访问/
    BH_Async_Read,    /* Is under end_buffer_async_read I/O 该缓冲区正通过end_buffer_async_read()被异步I/O读操作使用*/
    BH_Async_Write,    /* Is under end_buffer_async_write I/O *该缓冲区正通过end_buffer_async_write()被异步写操作使用/
    BH_Delay,    /* Buffer is not yet allocated on disk *该缓冲区尚未与磁盘块关联/
    BH_Boundary,    /* Block is followed by a discontiguity *该缓冲区片于连续块区的边界,下一个块不再连续/
    BH_Write_EIO,    /* I/O error on write */
    BH_Ordered,    /* ordered write */
    BH_Eopnotsupp,    /* operation not supported (barrier) */

    BH_PrivateStart,/* not a state bit, but the first bit available
             * for private allocation by other entities
             */
};
阅读(825) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~