You request a write of 5000 bytes. JFFS2 writes 4096 bytes of it and returns accordingly. Power is lost before you can do anything about it or attempt to perform a second write call to write the remaining 904 bytes. You request a write of 5000 bytes. JFFS2 writes 4096 bytes and is about to write the remainder.
Power is lost before it does so.
The first is perfectly legal.