tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PUFFS putpages/read race?



Hi

I suspect I have another possible race between putpages and read.

If page cache is used, VOP_PUTPAGES for PUFFS calls Fire-And-Forget
write operations. That means the kernel sends the write request and does
not wait for the reply.  The kernel therefore has no way to know when
the operation completed.

What happens if a read is issued after a VOP_PUTPAGE, and while that
operation is not yet completed? What prevents the read to get a page
full of zeroes from the filesystem? 

I suspect I have hit this bug when building sources on a
PUFFS/perfuse/glusterfs filesystem: objdump -x file.o reported a file
without any section. Running the command again just afterwards succeeded
without a hitch. 

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index