|--dir->i_op->create(dir, dentry, mode, nd) lookup(struct inode *dir,struct dentry *, struct nameidata *); 查找索引节点所在的目录,这个索引节点所对应的文件名就包含在dentry目录项中。在很多地方都会用到,比如:d_inode_lookup(),d_alloc_and_lookup() follow_link(struct dentry *, struct name...
const struct inode_operations ext4_dir_inode_operations = { .create = ext4_create, .lookup = ext4_lookup, .link = ext4_link, .unlink = ext4_unlink, .symlink = ext4_symlink, .mkdir = ext4_mkdir, .rmdir = ext4_rmdir, .mknod = ext4_mknod, .tmpfile = ext4_tmpfile, .rename = ext4_...
这个inode是VFS的inode,是最具体文件系统的inode的进一步封装,也是驱动开发中关心的inode,针对具体的文件系统,还有struct ext2_inode_info 等结构。 //include/linux/fs.h/** Keep mostly read-only and often accessed (especially for* the RCU path lookup and 'stat' data) fields at the beginning* of th...
commit log: iget: remove iget() and the read_inode() super op as being obsolete http://git...
598 * the RCU path lookup and 'stat' data) fields at the beginning 599 * of the 'struct inode' 600 */601structinode{602umode_ti_mode;604kuid_ti_uid;605kgid_ti_gid;606unsignedinti_flags;630union{631constunsignedinti_nlink;632unsignedint__i_nlink;633};634dev_ti_rdev;635loff_ti_siz...
GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "union.h" + +/* declarations added for "sparse" */ +extern struct dentry *unionfs_lookup(struct inode *, struct dentry *, + struct nameidata *); +extern int unionfs_readlink(st...
+ * lookup is the only special function which takes a dentry, yet we + * do NOT want to call __unionfs_d_revalidate_chain because by + * definition, we don't have a valid dentry here yet. + */ + /* save the dentry & vfsmnt from namei */ ...
//include/linux/fs.h 596 /* 597 * Keep mostly read-only and often accessed (especially for 598 * the RCU path lookup and 'stat' data) fields at the beginning 599 * of the 'struct inode' 600 */ 601 struct inode { 602 umode_t i_mode; 603 unsigned short i_opflags; 604 kuid_t...
查找索引节点所在的目录,这个索引节点所对应的文件名就包含在dentry目录项中。在很多地方都会用到,比如:d_inode_lookup(),d_alloc_and_lookup() follow_link(struct dentry *, struct nameidata *); 解释inode索引节点所指定的符号链;如果该符号链是相对路径名,从指定的dir目录开始进行查找。
598 * the RCU path lookup and 'stat' data) fields at the beginning 599 * of the 'struct inode' 600 */601structinode{602umode_ti_mode;603unsignedshorti_opflags;604kuid_ti_uid;605kgid_ti_gid;606unsignedinti_flags;607608#ifdefCONFIG_FS_POSIX_ACL609structposix_acl*i_acl;610structposix_...