Earlier, mkdir failures because of parents not being present returned ENOENT. DHT-selfheal considers a brick which returned ENOENT on lookup as part of layout assuming that the lookup might be racing with mkdir. Hence, the newly added brick would be considered for layout assignments. However, the directory creation itself might've been failed because of parents not being present on new brick and subsequently when a file that is about to be created hashes to the new brick, it would fail with ENOENT, which is propagated back to application.
The fix involves treating parent being absent on a sub-volume (in this case because the directory hierarchy is yet to be constructed on the newly added brick) as ESTALE error (as opposed to ENOENT). As a result, the newly added brick is not considered for layout assignment, thereby fixing 'No such file or directory' failures on the mount point on subsequent directory entry creations.