[CRIU] [PATCH] files-reg: Rework strip_deleted

Cyrill Gorcunov gorcunov at gmail.com
Tue Jul 28 03:39:12 PDT 2015


On Tue, Jul 28, 2015 at 01:36:40PM +0300, Pavel Emelyanov wrote:
> > +		{
> > +			.str	= " (deleted)",
> > +			.len	= 10,
> > +		}, {
> > +			.str	= "//deleted",
> 
> Huh? Never seen one, which FS adds such?

That's the regular dcache code.

char *dentry_path(struct dentry *dentry, char *buf, int buflen)
{
	char *p = NULL;
	char *retval;

	if (d_unlinked(dentry)) {
		p = buf + buflen;
		if (prepend(&p, &buflen, "//deleted", 10) != 0)
			goto Elong;
		buflen++;
	}
	retval = __dentry_path(dentry, buf, buflen);
	if (!IS_ERR(retval) && p)
		*p = '/';retval/* restore '/' overriden with '\0' */
	return retval;
Elong:
	return ERR_PTR(-ENAMETOOLONG);
}


More information about the CRIU mailing list