types used to store the block size of linux `struct super_block`

  Kiến thức lập trình
struct super_block {
    struct list_head    s_list;        /* Keep this first */
    dev_t            s_dev;        /* search index; _not_ kdev_t */
    unsigned char        s_blocksize_bits;
    unsigned long        s_blocksize;
    ...

from what I read, s_blocksize and s_blocksize_bits contain the size of the block in bytes and bits respectively.
the number of bits are bigger than the number of bytes, so wouldn’t it make more sense if their types were the opposite way around? Like this:

    unsigned char        s_blocksize_bits;
    unsigned long        s_blocksize;

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT