[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] [Q] Fuse callback sequence
From:       Miklos Szeredi <miklos () szeredi ! hu>
Date:       2011-08-08 15:26:41
Message-ID: 87sjpbexfy.fsf () tucsk ! pomaz ! szeredi ! hu
[Download RAW message or body]

Emalayan Vairavanathan <svemalayan@yahoo.com> writes:

> Hi Devs,
>
> I wrote a distributed file system using fuse. I am now testing it with
> POSIX benchmarks to assess POSIX compatibility. But the entire
> benchmark suite is failing.
>
>
> I investigated further and found the following sequence of fuse_call
> backs were generated at some point by benchmark .
>
> - mknod()
> - open(READ_ONLY)
> - flush(READ_ONLY)
> - release()
>
> I designed the file system assumeing an open(WRITE) / open(READ-WRITE)
> immediately follows a mknod().
>
> So my file system does not updates the metadata server in mknod() call
> back. It updates the metadata only in write-open / read-write open
> calls. So an open(READ_ONLY) call immediately follows mknod() always
> fails.

In addition to ->mknod() and ->open() you should implement the
->create() callback, which is an atomic combination of mknod and open.

>  Until now I was testing the file system with various
> applications (such as tar, gzip, and some complex applications) and
> both the file system and applications were working fine.
>
> Could anyone tells whether my assumption about fuse call-back sequence
> is correct or not ?
>
> Also please tell me a simple C program which might generate the same
> sequence of callback as mentioned above ?

	open("/mnt/fuse/nonexistent-file", O_RDONLY | O_CREAT, 0777);

Thanks,
Miklos

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic