Re: [GIT PULL] scripts: recordmcount: break hardlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 15, 2015 at 1:11 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> Hold off. I reread what Linus wrote, and it should only do the copy if
> it actually changed something.

Right. Please just write the new copy out at the end, and make the
original file open be read-only.

Also, the "good" way to rewrite files is not to unlink and create a
new file with the same name on top, but to create a new file with a
new name, and then rename on top of the file. That way you never get
half-way done files when somebody ^C's in the middle, but all or
nothing.

Trying to figure out why a build doesn't work when there is some
half-created new file can be a real pain in the arse.

               Linus
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]