From: Lucas C. V. R. <lu...@go...> - 2010-10-13 12:36:37
|
On Wed, Oct 13, 2010 at 6:38 AM, Goswin von Brederlow <gos...@we...> wrote: > Hraban Luyat <hr...@0b...> writes: > >> Hello all, >> >> While working on a FUSE application in C I decided to add an >> assert(path[0] == '/') to every operation handler from fusexmp.c to >> check the invariant. Apparently, releasedir() is sometimes passed path >> '-'. Only when threading is enabled: the -s flag solves this issue. >> This can be seen simply when doing rm -rf on a big directory with lots >> of small files (I use a git repository to test it with; 9/10 >> reproducible, different spot in the tree every time). Interestingly, >> this does not happen when populating the target with a cp -r, which, >> presumably, also uses a lot of releasedir. Only rm -rf, so far. > > I believe this happens when a directory is released that is already been > deleted. That's also what I've observed on my side. To ensure the provided path is valid we keep a "deleted" member in the dentry structure that we attach to the fuse_file_info structure. If a dentry has the "deleted" bit set then we don't trust the "path" that's provided to the function. Thanks, -- Lucas "If you're looking for a reason I've a reason to give: pleasure, little treasure" |