Problem with VFS & stat

Marek Grac xgrac at fi.muni.cz
Thu Nov 18 09:42:57 GMT 2004


Hi,

I'm writing VFS module without underlying filesystem, so I have to rewrite 
most of the functions available in VFS. Problem is that when I try to set 
filesize in vfs_stat(), now I'm using stat from real file. And this is 
result [samba-3.0.7-1 debian package] :

   .                               0  Thu Jan  1 01:00:00 1970
   ..                              0  Thu Jan  1 01:00:00 1970
   frufru.mp3       A 17592186044416  Tue Jul 21 05:26:40 1970
   marha.file       A 17592186044416  Tue Jul 21 05:26:40 1970

I use same stat for every dir and every file. But the size is really 
strange (I set size to 0 for this example). I have found that this problem 
should be something with largefile support. But unfortunately I'm not able 
to find how to resolve this problem in samba. I'm using this piece of code 
to set stat buffer:

                 sbuf->st_dev = 769;
                 sbuf->st_ino = 1;
                 sbuf->st_mode = 33279;
                 sbuf->st_uid = 0;
                 sbuf->st_gid = 0;
                 sbuf->st_nlink = 1;               // why A in listing?
                 sbuf->st_size = 0;                // SIZE
                 sbuf->st_blksize = 4096;
                 sbuf->st_blocks = 205008;
                 sbuf->st_atime = 17382400;
                 sbuf->st_mtime = 17382400;
                 sbuf->st_ctime = 17382400;


Any help, or pointer to help is welcomed.

 			pax, marx
--
[****************************][*************************************]
[ marek 'marx' grác / gerard ][        Mama má Emu                  ]
[                            ][                                     ]
[     xgrac at fi.muni.cz       ][             Emu má perie            ]
[****************************][*************************************]


More information about the samba-technical mailing list