Re: Minimizing disk usage for kernel development.

From: Andreas Bombe (andreas.bombe@munich.netsurf.de)
Date: Sat Feb 26 2000 - 12:55:13 EST


On Fri, Feb 25, 2000 at 11:23:45PM -0300, Horst von Brand wrote:
> William Stearns <wstearns@pobox.com> said:
>
> [...]
>
> > This came from a Kernel-FAQ, although it doesn't seem to be in the
> > current FAQ. Anyways:
>
> [...]
>
> > <quote>
> > Assuming that your editor does the same thing, too (moving original files
> > to backup files before writing out changed ones) you can freely edit
> > within the hardlinked tree.
>
> Editors are careful to place the modified file into the same inode as the
> original. Only exception I found when I did a extensive check a while back
> was jed, and that is broken IMHO.

Emacs is an exception, too. And I wouldn't call it broken but
efficient (consider big files).

[andreasb@storm test]$ touch file
[andreasb@storm test]$ ll -i
insgesamt 0
 131187 -rw-r--r-- 1 andreasb andreasb 0 Feb 26 18:41 file

... editing with emacs 20.5.2 and saving ...

[andreasb@storm test]$ ll -i
insgesamt 4
 131189 -rw-r--r-- 1 andreasb andreasb 7 Feb 26 18:41 file
 131187 -rw-r--r-- 1 andreasb andreasb 0 Feb 26 18:41 file~
[andreasb@storm test]$

It's on Debian, I don't know whether there are different default
configs, but Debian generally doesn't have flashy customized defaults.

> Gave me quite a headache on Solaris,
> where the /etc/rc?d/* files are _hard_ links into /etc/init: Using vi(1) or
> emacs(1) allowed correct fixing of the files, jed(1) doesn't... the hard
> links elsewhere point to the backup afterwards!

Which is exactly what you want when editing a hardlinked kernel tree
copy.
 
> Better use symlinks, lndir(1x) is for this.

Then you overwrite the original files if you don't carefully make a
real copy of each file you want to edit before you start. Otherwise
you can forget about diffing, which is the most important reason to
keep more than one tree of the sources you are using.

-- 
          Andreas E. Bombe <andreas.bombe@munich.netsurf.de>
http://home.pages.de/~andreas.bombe/                DSA key 0x04880A44

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:15 EST