cloned from https://gitorious.org/qdrive