Since 3.11 kernel release (commit 60545d0d and bb458c64), kernel introduced __O_TMPFILE that unfortunately conflicts with O_LOV_DELAY_CREATE and causes lfs setstripe api to always fail.
#define __O_TMPFILE 020000000
#define O_LOV_DELAY_CREATE 0120000000
Also kernel introduced a safe guard around O_TMPFILE such that whenever __O_TMPFILE bit is set, it has to also have O_DIRECTORY. As a result, it makes Lustre unable to keep backward compatibility. So I am in fact unsure how to solve this. Do we care about O_LOV_DELAY_CREATE compatibility?
Because this is mostly related to user space ABI, I created this ticket so that we can solve it in Lustre tree first, and then I can port the change to kernel client.