[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file_chmod in unionfs, copy-on-write
From: |
Thomas Bushnell, BSG |
Subject: |
Re: file_chmod in unionfs, copy-on-write |
Date: |
21 Nov 2002 11:42:34 -0800 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Moritz Schulte <moritz@duesseldorf.ccc.de> writes:
> just out of curiosity: how should the yet-to-be-written unionfs
> implement copy-on-write for file_chmod()?
>
> unionfs usually gives out ports to the underlying files; when in
> copy-on-write mode, it should give out a port to which the user can
> safely write without modifying the `real' data. In my understanding
> this works, since unionfs notices at open time that the user intents
> to write to the file (the O_WRITE flag is specified).
>
> But for file_chmod there is no O_WRITE needed, therefore unionfs is
> not able to detect this `write'.
Well, copy-on-write is a nice idea, but it's not an inherent part of
unionfs.
If you want to catch file_* calls, then you really have to intervene
in every call; you can't hand out the real ports at all.