Exemplo n.º 1
0
void au_dpri_dentry(struct dentry *dentry)
{
    struct au_dinfo *dinfo;
    aufs_bindex_t bindex;
    int err;
    struct au_hdentry *hdp;

    err = do_pri_dentry(-1, dentry);
    if (err || !au_test_aufs(dentry->d_sb))
        return;

    dinfo = au_di(dentry);
    if (!dinfo)
        return;
    dpri("d-1: bstart %d, bend %d, bwh %d, bdiropq %d, gen %d\n",
         dinfo->di_bstart, dinfo->di_bend,
         dinfo->di_bwh, dinfo->di_bdiropq, au_digen(dentry));
    if (dinfo->di_bstart < 0)
        return;
    hdp = dinfo->di_hdentry;
    for (bindex = dinfo->di_bstart; bindex <= dinfo->di_bend; bindex++)
        do_pri_dentry(bindex, hdp[0 + bindex].hd_dentry);
}
Exemplo n.º 2
0
static int do_pri_dentry(aufs_bindex_t bindex, struct dentry *dentry)
{
	struct dentry *wh = NULL;

	if (!dentry || IS_ERR(dentry)) {
		dpri("d%d: err %ld\n", bindex, PTR_ERR(dentry));
		return -1;
	}
	/* do not call dget_parent() here */
	/* note: access d_xxx without d_lock */
	dpri("d%d: %.*s?/%.*s, %s, cnt %d, flags 0x%x\n",
	     bindex,
	     AuDLNPair(dentry->d_parent), AuDLNPair(dentry),
	     dentry->d_sb ? au_sbtype(dentry->d_sb) : "??",
	     dentry->d_count, dentry->d_flags);
	if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) {
		struct au_iinfo *iinfo = au_ii(dentry->d_inode);
		if (iinfo)
			wh = iinfo->ii_hinode[0 + bindex].hi_whdentry;
	}
	do_pri_inode(bindex, dentry->d_inode, wh);
	return 0;
}
Exemplo n.º 3
0
void au_dpri_inode(struct inode *inode)
{
	struct au_iinfo *iinfo;
	aufs_bindex_t bindex;
	int err, hn;

	err = do_pri_inode(-1, inode, -1, NULL);
	if (err || !au_test_aufs(inode->i_sb))
		return;

	iinfo = au_ii(inode);
	if (!iinfo)
		return;
	dpri("i-1: bstart %d, bend %d, gen %d\n",
	     iinfo->ii_bstart, iinfo->ii_bend, au_iigen(inode, NULL));
	if (iinfo->ii_bstart < 0)
		return;
	hn = 0;
	for (bindex = iinfo->ii_bstart; bindex <= iinfo->ii_bend; bindex++) {
		hn = !!au_hn(iinfo->ii_hinode + bindex);
		do_pri_inode(bindex, iinfo->ii_hinode[0 + bindex].hi_inode, hn,
			     iinfo->ii_hinode[0 + bindex].hi_whdentry);
	}
}