示例#1
0
/* ARGSUSED */
static int
zpl_root_getattr(struct vfsmount *mnt, struct dentry *dentry,
    struct kstat *stat)
{
	int error;

	error = simple_getattr(mnt, dentry, stat);
	stat->atime = CURRENT_TIME;

	return (error);
}
示例#2
0
文件: zpl_ctldir.c 项目: awein/zfs
/* ARGSUSED */
static int
zpl_snapdir_getattr(struct vfsmount *mnt, struct dentry *dentry,
    struct kstat *stat)
{
	zfs_sb_t *zsb = ITOZSB(dentry->d_inode);
	int error;

	ZFS_ENTER(zsb);
	error = simple_getattr(mnt, dentry, stat);
	stat->nlink = stat->size = 2;
	stat->ctime = stat->mtime = dmu_objset_snap_cmtime(zsb->z_os);
	stat->atime = CURRENT_TIME;
	ZFS_EXIT(zsb);

	return (error);
}