[prev in list] [next in list] [prev in thread] [next in thread]
List: samba-technical
Subject: union smb_open in *_open
From: Amin Azez <azez () ufomechanic ! net>
Date: 2007-09-27 15:41:02
Message-ID: 46FBCF0E.3050305 () ufomechanic ! net
[Download RAW message or body]
I'm just writing some simple proof of concept cifs caching so I can see
where the integration problems are going to be.
In cifs_open I need to get at the cifs filename, so I can produced a key
based on what is being opened, but io->ntcreatex.in.fname doesn't point
to a valid string in my vfs.
In the pvfs backend, function pvfs_open pvfs_open.c accesses the smbopen
union to get at the cifs name of the file being opened, as:
io->ntcreatex.in.fname
/* resolve the cifs name to a posix name */
status = pvfs_resolve_name(pvfs, req, io->ntcreatex.in.fname,
PVFS_RESOLVE_STREAMS, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
So in vfs_cifs.c (yeah, I know it may be vfs_cifs_proxy.c later, but I
want to get the updates till then)
static NTSTATUS cvfs_open(struct ntvfs_module_context *ntvfs,
struct ntvfs_request *req, union smb_open *io)
{
...
f = talloc_zero(h, struct cvfs_file);
NT_STATUS_HAVE_NO_MEMORY(f);
f->h = h;
/* Set up caching */
f->cache_state=0; /* set based on op-lock status */
DEBUG(1,("Open proxied for file: %x\n",(io->ntcreatex.in.fname)));
//f->cache_name=talloc_strdup(ntvfs->ctx,io->ntcreatex.in.fname);
Now for in my debug statement I get debug lines like:
Open proxied for file: 4e000000
which is NOT a valid filename pointer, and I get a segfault if I try to
use it as one?
What am I missing? What does pvfs have over the cifs back end?
Sam
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic