All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH for testing] cow behaviour for hard links
Date: Wed, 10 Mar 2004 21:34:27 +0000	[thread overview]
Message-ID: <20040310213427.GB7341@mail.shareable.org> (raw)
In-Reply-To: <20040310193429.GB4589@wohnheim.fh-wedel.de>

Jörn Engel wrote:
> Yeah, well, here it is, sortof.  It works on file granularity instead
> of block, doesn't do the cow part inside the kernel (userspace get's
> an error and has to do it).  But it works for ext2 and ext3 and is
> relatively short.
> 
> Interna:
> I introduced a new flag for inodes, switching between normal behaviour
> and cow for hard links.  Flag can be changed and queried per fcntl().
> Ext[23] needed a bit of tweaking to write this flag to disk.  open()
> will fail, when a) cowlink flags is set, b) inode has more than one
> link and c) write access is requested.

I like the idea!

I keep many hard-linked kernel trees, and local version management is
done by "cp -rl" to make new trees and then change a few files in
those trees, compile, test etc.  To prevent changes in one tree
accidentally affecting other trees, I "chmod -R a-r" all but the tree
I'm currently working on.

Thats works quite nicely, but it'd be even nicer to not need the
"chmod", and just be confident that writes won't clobber files in
another tree by accident.

-- Jamie

  parent reply	other threads:[~2004-03-10 21:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 19:34 [PATCH for testing] cow behaviour for hard links Jörn Engel
2004-03-10 19:35 ` [Program " Jörn Engel
2004-03-10 21:34 ` Jamie Lokier [this message]
2004-03-10 22:17   ` [PATCH " Jörn Engel
2004-03-10 23:07 ` Sytse Wielinga
2004-03-10 23:46   ` Sytse Wielinga
2004-03-12 17:48 ` Sytse Wielinga
2004-03-12 18:18   ` Jörn Engel
2004-03-12 18:29   ` Jörn Engel
2004-03-13 13:43     ` Pavel Machek
2004-03-13 19:48       ` Jörn Engel
2004-03-13 21:03         ` Pavel Machek
2004-03-15  7:45           ` Jamie Lokier
2004-03-15 10:27             ` Jörn Engel
2004-03-13 22:14       ` Jörn Engel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040310213427.GB7341@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.