struct inode中i_blksize成员的替换是什么?

时间:2014-12-17 08:58:18

标签: linux linux-kernel filesystems kernel inode

我正在编译一个可堆叠的文件系统wrapfs,我在struct inode数据结构中遇到了一个错误的遗漏成员i_blksize?我查了一下,发现在内核版本2.6之后它已被大大修改并且i_blksize已被删除。该成员的替代品是什么?

kunal@Baweja:~/Documents/wrapfs$ make
make -C /lib/modules/3.13.0-40-generic/build SUBDIRS=/home/kunal/Documents/wrapfs modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-40-generic'
  CC [M]  /home/kunal/Documents/wrapfs/fist_wrapfs.o
In file included from /home/kunal/Documents/wrapfs/fist_wrapfs.c:15:0:
/home/kunal/Documents/wrapfs/wrapfs.h: In function ‘fist_copy_attr_all’:
/home/kunal/Documents/wrapfs/wrapfs.h:203:6: error: ‘inode_t’ has no member named ‘i_blksize’
  dest->i_blksize = src->i_blksize;
      ^
/home/kunal/Documents/wrapfs/wrapfs.h:203:23: error: ‘inode_t’ has no member named ‘i_blksize’
  dest->i_blksize = src->i_blksize;
                       ^
make[2]: *** [/home/kunal/Documents/wrapfs/fist_wrapfs.o] Error 1
make[1]: *** [_module_/home/kunal/Documents/wrapfs] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-40-generic'
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:0)

看起来这是一个不必要的重复

inode->i_blksize == (1 << inode->i_blkbits)

查看此邮件thread