For me, the source of this "invalid argument 22" problem turned out to be entirely different. I was copying between two ext4 filesystems, so that wasn't the problem. There was no problem in the filenames, either. Trial and error revealed the issue:
Evidently there's a conflict between the --inplace argument and attempting to copy files with extended attributes (well, anyway, the problem only occurs in files whose permissions indicators end in '+', as in 'rw-r-----+'). I observe that I can have one or the other but not always both. Rsync hangs forever in such a case. That's a bug, I think, so I have filed a report at Github RsyncProject/rsync.