LNFS - vfs module and lotus notes
Сафонов Андрей
dot at gorodok.net
Thu May 12 18:38:11 GMT 2005
> |
> | If you interested in one more VFS module you can visit
> | http://virtualfilesystem.nexuswebs.net
> |
> | I'd like to thank Eric Lorimer for it's DatabaseFS as great example of
> | programing vfs modules. Without his help that widget hardly could be
> | available.
> |
> | Module right now in coding stage and it wold great if some one tells
> | what he/she thinks about it.
>
> Is there a public svn/cvs repository?
>
> - --
> metze
>
> Stefan Metzmacher <metze at samba.org> www.samba.org
Now lnfs should be available at http://virtualfilesystem.nexuswebs.net/lnfs.tar.gz.txt (270 kb)
when downloaded - please rename txt file to lnfs.tar.gz
I haven't succeeded with teaching it to read/write files, but now it can display contents of example database.
There is a moment which I can't understand - why samba brokes while reading my file ? here's the log:
[2005/05/12 13:54:00, 1] lnfs.c:lnfs_open(235)
lnfs_open('honda_odyssey_7785.jpeg')
[2005/05/12 13:54:00, 0] mmem.c:report_log(63)
succ opened document
........
Notes_OpenAttachment(): returning 1 (at this moment we return our fd ==1 )
[2005/05/12 13:54:00, 1] modules/vfs_extd_audit.c:audit_open(198)
vfs_extd_audit: open honda_odyssey_7785.jpeg
[2005/05/12 13:54:00, 1] lnfs.c:lnfs_lock(244)
lnfs_lock('1')
[2005/05/12 13:54:00, 1] lnfs.c:lnfs_lseek(264)
lnfs_lseek('1') 0
[2005/05/12 13:54:00, 1] modules/vfs_extd_audit.c:audit_fstat(333)
redifined extd_audit_fstat('1'): (this comes from extd_audit with new fstat function which prints smb_struct_stat contents)
st_dev 0
st_ino 0
st_mode 0
st_nlink 0
st_size 770
st_blksize 0
st_blocks 135632155
st_atime 137732496
lnfs_fstat('1') (this comes from lnfs_fstat function )
[2005/05/12 13:54:00, 1] lnfs.c:lnfs_close(250)
lnfs_close('1') ( for some reason samba closes file. why ? )
this is function generic_file_stat (copied from Eric Lorimer DatabaseFS) which stats all 'files' in my code :
{
memset(sbuf, 0, sizeof(SMB_STRUCT_STAT));
sbuf->st_dev = 770;
sbuf->st_ino = 1;
sbuf->st_mode = 0170777;
sbuf->st_uid = 0;
sbuf->st_gid = 0;
sbuf->st_nlink = 1; // number of hard links
sbuf->st_size = 2048; // Actual size in bytes
sbuf->st_blksize = 4096; // Physical block size
sbuf->st_blocks = 1; // Number of blocks allocated
sbuf->st_atime = 1027382400;
sbuf->st_mtime = 1027382400;
sbuf->st_ctime = 1027382400;
return 0;
}
and here's what happens with client:
smb: \Honda\Odyssey\> ls
. A 2048 Mon Jul 22 20:00:00 2002
.. A 2048 Mon Jul 22 20:00:00 2002
honda_odyssey_7785.jpeg A 2048 Mon Jul 22 20:00:00 2002
honda_odyssey_7780.jpeg A 2048 Mon Jul 22 20:00:00 2002
44534 blocks of size 131072. 1659 blocks available
smb: \Honda\Odyssey\> print honda_odyssey_7785.jpeg
NT_STATUS_INVALID_HANDLE opening remote file honda_odyssey_7785.jpeg
smb: \Honda\Odyssey\>
here's my smb.conf
[lnfs]
public = yes
writable = yes
browseable = yes
comment = test lnfs share
path = /tmp
vfs objects = extd_audit lnfs
lotus:user = notes
lotus:server=/opt/lotus/notes/latest/linux/server
lotus:ini= =/local/notesdata/notes.ini
lotus:DbServer=
lotus:DbFileName=lnfs
lotus:DbViewName=lnfs
Thnx in advance. Andrey Safonov
More information about the samba-technical
mailing list