[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FTS not ready for a remount during traversal

From: Kamil Dudka
Subject: FTS not ready for a remount during traversal
Date: Wed, 21 Oct 2009 19:22:50 +0200
User-agent: KMail/1.12.1 (Linux/; KDE/4.3.1; x86_64; ; )


the FTS module does not seem to be ready for a remount during traversal.
As a minimal example we can take the following situation:


Descending a directory triggers a shrinkable mount which implies a change
of the device number. However FTS data structures keep the old value of
device number, not reflecting this change. And later, when returning back
to the same directory through "..", fts_safe_changedir() fails for no good
reason (caused by std_dev mismatch).

The attached patch seems to solve the problem by calling fstatat() again
after opening a directory (and updating the device number). The patch is
not supposed to be applied as-is. It's more likely an idea how the problem 
could be solved. Maybe something like that might be available via an option
to keep the original behavior unchanged (and eventually gain better 
performance in some cases).

Another approach is a workaround proposed by Ondra:


Any idea how to solve the problem? Thanks in advance!


Attachment: fts.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]