Re: Read from file fails

From: Libor Vanek
Date: Wed May 05 2004 - 04:50:16 EST


On Tue, May 04, 2004 at 07:45:49PM +0100, Paulo Marques wrote:
> Libor Vanek wrote:
>
> >Using kernel module:
> >- user space process wants to change some file which is in "snapshoted" dir
> >- my module catches this request, holds it, creates copy of original file
> >and allows original request to proceed
>
>
> Did you take a look at LVM snapshots?
>
> http://tldp.org/HOWTO/LVM-HOWTO/snapshotintro.html
>
> Maybe your problem is already solved...

No - this has several disadvantages - mainly you can snapshot only whole "logical volume" and have preserved space for it (okay - you can add more disks) and it's not very flexible. My approach can even snapshot files to the NFS volume and if you loose primary volume you can still recover some data.

> Anyway, you really shouldn't worry about the time it takes to make a
> context switch when you want to copy a file on modify ;)

Yeah - I'm now convinced that user space daemon is "The Only Right Thing (tm)". I'm now looking how can kernel comunicate with running user-space process.

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