当前位置:   article > 正文

Linux buffer_head_buffer head linux

buffer head linux
enum bh_state_bits {
    BH_Uptodate,    /* Contains valid data */
    BH_Dirty,        /* Is dirty */
    BH_Lock,        /* Is locked */
    BH_Req,            /* Has been submitted for 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 */
    BH_Async_Read,        /* Is under end_buffer_async_read I/O */
    BH_Async_Write,        /* Is under end_buffer_async_write I/O */
    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_Unwritten,        /* Buffer is allocated on disk but not written */
    BH_Quiet,            /* Buffer Error Prinks to be quiet */
    BH_Meta,            /* Buffer contains metadata */
    BH_Prio,            /* Buffer should be submitted with REQ_PRIO */
    BH_Defer_Completion, /* Defer AIO completion to workqueue */

    BH_PrivateStart,        /* not a state bit, but the first bit available
                             * for private allocation by other entities
                             */
};


struct buffer_head {
    unsigned long b_state;                /* buffer state bitmap (see above) */
    struct buffer_head *b_this_page;    /* circular list of page's buffers */
    struct page *b_page;                /* the page this bh is mapped to */

    sector_t b_blocknr;                    /* start block number */
    size_t b_size;                        /* size of mapping */
    char *b_data;                        /* pointer to data within the page */

    struct block_device *b_bdev;
    bh_end_io_t *b_end_io;                /* I/O completion */
     void *b_private;                    /* reserved for b_end_io */
    struct list_head b_assoc_buffers;     /* associated with another mapping */
    struct address_space *b_assoc_map;    /* mapping this buffer is associated with */
    atomic_t b_count;                    /* users using this buffer_head */
};




声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/601637
推荐阅读
相关标签
  

闽ICP备14008679号