OS X Yosemite Hard Disk Errors even after Repairing them
error 22 is the EINVAL in libc error codes. Maybe your glibc is corrupted? I think you can reinstall it from Xcode based on this question https://stackoverflow.com/questions/9353444/how-to-use-install-gcc-on-mac-os-x-10-8-xcode-4-4