Anatomy of stat system call
sys_stat(path, buf) {
dentry = namei(path);
if ( dentry == NULL ) return -ENOENT;
inode = dentry->d_inode;
rc =inode->i_op->i_permission(inode);
if ( rc ) return -EPERM;
rc = inode->i_op->i_getattr(inode, buf);
dput(dentry);
return rc;
}
Establish VFS data
Call into inode layer of filesystem
Call into inode layer of filesystem
Previous slide
Next slide
Back to first slide
View graphic version