matrix65536 / kosmosfs

Automatically exported from code.google.com/p/kosmosfs
Apache License 2.0
2 stars 4 forks source link

bugs #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1.there are bugs In Kfs_fuse_main.cc 
2.when client call write(nfd,buf,nwrite) function to write data into dfs,
why the return size is even bigger than nwrite size .Lt is absurd. l print the 
log
and find that it returns the total size that have been written to dfs.
cause l call {int res=write(nfd,buf,4096)} for serval times.
and res is 4096,8192...
l thought maybe it is because of the default buffer in client.
so l call function SetIoBufferSize(nfd,0),but it doesn't work.
what a fun it is .the write function returns some size bigger than 4096,and the 
file is even closed in client,but the file size in dfs is still 4096 big.

so many bugs in the project

Original issue reported on code.google.com by charles....@gmail.com on 13 May 2012 at 12:08

GoogleCodeExporter commented 9 years ago
In Kfs_fuse_main.cc 

fuse_open function should be defined like this:

{
   int nFd=client->Open(path,finfo->flags)
   if(nFd>0){
         finfo->fh=nFd;
         finfo->noseekable=0;
         finfo->direct_io=1;
         return 0;
   }else
        return -1;
}

Original comment by charles....@gmail.com on 14 May 2012 at 8:46