https://bugzilla.kernel.org/show_bug.cgi?id=103111 --- Comment #3 from Rakesh <patelrakeshcomp@xxxxxxxxx> --- Same behaviour on kernel 3.14.27 also. Power cut for 15sec, 20sec and 25sec. All 3times, files is having zero length. For above code file "example.txt1" is empty. If I remove rename command(system(mv example.txt example.txt1)) then also example.txt is blank. ofstream myfile; myfile.open ("example.txt",std::ofstream::trunc); myfile << "Writing this to a file.\n"; Looks like rename via trunc call is not wroking. Uploaded sample file. -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html