Low level read api

View: New views
2 Messages — Rating Filter:   Alert me  

Low level read api

by jojy.varghese :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all
I am trying to create a file system in which the data gets loaded  
dynamically in the file when it is read. Now, the problem with this is that  
if i set the "st_size" of the "stat" for the file as 0, then OS wont read  
beyond 0 bytes the first time because fuse asks for the stat of the file  
first. So if I set the default size to something and plan to change it when  
the file gets populated, I get all "0"s after the real data. Is there a way  
around it?
The fuse low level API "fuse_reply_buf" says it will populate all "0"s upto  
the size. But when when I call the method  
as "fuse_reply_buf(request,NULL,0)", it still seems to fill the rest of the  
data with "0"s. Any ideas how to fix this?

Thanks in advance
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Low level read api

by Csaba Henk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-10-06, jojy.varghese@... <jojy.varghese@...> wrote:

> Hi all
> I am trying to create a file system in which the data gets loaded  
> dynamically in the file when it is read. Now, the problem with this is that  
> if i set the "st_size" of the "stat" for the file as 0, then OS wont read  
> beyond 0 bytes the first time because fuse asks for the stat of the file  
> first. So if I set the default size to something and plan to change it when  
> the file gets populated, I get all "0"s after the real data. Is there a way  
> around it?
> The fuse low level API "fuse_reply_buf" says it will populate all "0"s upto  
> the size. But when when I call the method  
> as "fuse_reply_buf(request,NULL,0)", it still seems to fill the rest of the  
> data with "0"s. Any ideas how to fix this?

Maybe this:

http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FAQ#I_can_not_know_the_file_size_in_advance.2C_how_do_I_force_EOF_from_fs_read.28.29_to_be_seen_in_the_application.3F

would be helpful to you?

Csaba


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel