I attempted to write a file to an ext4 voulume on an external USB hard disk drive:
$ dd if=/dev/zero of=file bs=1M count=10 iflag=fullblock oflag=direct
dd: failed to open 'file': Invalid argument
Then I tried it without oflag=direct and it worked.
Then I tried to write a file using the original command to an ext4 volume on an internal solid state drive and it worked.
Why couldn't dd write to the HDD?
oflag=directis valid when theof=argument specifies a device, but not when it specifies a file. Files need to go through the filesystem layers because to userland processes files are entities that are accessed via filesystems rather then directly via the storage device.