git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: enforcing DB immutability

From
NCNick Craig-Wood <nick@craig-wood.com>
Date
Apr 20, 2005, 14:57 UTC
Message-ID
<20050420145725.GA23072@craig-wood.com>
In-Reply-To
<20050420074948.GA22620@elte.hu>
On Wed, Apr 20, 2005 at 09:49:48AM +0200, Ingo Molnar wrote:
Show 14 quoted lines
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > perhaps having a new 'immutable hardlink' feature in the Linux VFS 
> > would help? I.e. a hardlink that can only be readonly followed, and 
> > can be removed, but cannot be chmod-ed to a writeable hardlink. That i 
> > think would be a large enough barrier for editors/build-tools not to 
> > play the tricks they already do that makes 'readonly' files virtually 
> > meaningless.
> 
> immutable hardlinks have the following advantage: a hardlink by design 
> hides the information where the link comes from. So even if an editor 
> wanted to play stupid games and override the immutability - it doesnt 
> know where the DB object is. (sure, it could find it if it wants to, but 
> that needs real messing around - editors wont do _that_)

This has already been implemented for the linux vserver project. Take a look in the patch here :-

  http://vserver.13thfloor.at/Experimental/patch-2.6.11.7-vs1.9.5.x5.diff.bz2
(Its not split out, but search for IMMUTABLE and you'll see what I mean)

It implements immutable linkage invert, which basically allows people to delete hardlinks to immutable files, but not do anything else to them. It uses another bit out of the attributes to "invert" the immutability of the linkage of immutable files.

Its used in the vserver project so that individual vservers (which are basically just fancy chroots) can share libraries, binaries and hence memory, can't muck each other up, but can upgrade their libs/binaries.

-- 
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-wood.com/nick
Previous: Chris WedgwoodNext: Wout
Message 12 of 20 in “Re: Index/hash order”
  1. Ingo MolnarApr 13, 2005
  2. H. Peter AnvinApr 13, 2005
  3. Ingo MolnarApr 13, 2005
  4. Ingo MolnarApr 13, 2005
  5. Ingo MolnarApr 13, 2005
  6. Updated base64 patchesH. Peter Anvin, Apr 13, 2005
  7. Linus TorvaldsApr 13, 2005
  8. enforcing DB immutabilityIngo Molnar, Apr 20, 2005
  9. Ingo MolnarApr 20, 2005
  10. Ingo MolnarApr 20, 2005
  11. Chris WedgwoodApr 20, 2005
  12. Nick Craig-WoodApr 20, 2005
  13. WoutApr 27, 2005
  14. Linus TorvaldsApr 13, 2005
  15. Baruch EvenApr 13, 2005
  16. Florian WeimerApr 13, 2005
  17. Linus TorvaldsApr 13, 2005
  18. Florian WeimerApr 13, 2005
  19. Ingo MolnarApr 14, 2005
  20. cache-cold repository performanceIngo Molnar, Apr 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.