Is it possible that my filesystem receives two write request for the
same inode (but possibly at different offsets) at the same time, or is
this prevented by fuse?
I'm asking because I'm worried that if I change the file size in
my write() method I may override changes made by another thread:
1. File has size 0
2. fs receives two parallel write requests
3. Thread 1 writes 100 bytes and is interrupted
4. Thread 2 writes 200 bytes, sets file size to 200
5. Thread 1 continues and sets filesize to 100
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
On Sun, 28 Jun 2009, Nikolaus Rath wrote:
> Is it possible that my filesystem receives two write request for the
> same inode (but possibly at different offsets) at the same time, or is
> this prevented by fuse?
On linux this is prevented by the kernel. I don't know what is the
case for other OSs.