[patch] Cascaded VFS v.4

Alexander Bokovoy a.bokovoy at sam-solutions.net
Tue Jul 9 05:39:02 GMT 2002


On Tue, Jul 09, 2002 at 02:58:51PM +0300, TUDOR Coserea wrote:
> Hi Alexander,
> 
> Alexander Bokovoy <a.bokovoy at sam-solutions.net> writes:
> > > And another question:
> > >         I used VFS to build a antivirus scanner and on close method I
> > >         need (const struct files_struct*)->fsp_name which position
> > >         depends by this _LARGEFILE64_SOURCE. If one of smbd and my
> > >         scanner is build with this flag and other is not, on close
> > >         method smbd with my scanner will crash. Could be rearranged
> > >         files in this struct such as fields dependent by compilation
> > >         flags be the last?
> > Could you please show how would this struct look correctly? There are
> > files_struct entries (next,prev), various SMB_XXX (dev, inode, pos, size) 
> > which all are variable-sized...
> Like this:
> typedef struct files_struct
> {
>         struct files_struct *next, *prev;
>         int fnum;
>         struct connection_struct *conn;
>         int fd;
>         int print_jobid;
>         mode_t mode;
>         uint16 vuid;
>         write_bmpx_struct *wbmpx_ptr;
>         write_cache *wcp;
>         struct timeval open_time;
>         int share_mode;
>         uint32 desired_access;
>         time_t pending_modtime;
>         int oplock_type;
>         int sent_oplock_break;
>         unsigned long file_id;
>         BOOL can_lock;
>         BOOL can_read;
>         BOOL can_write;
>         BOOL print_file;
>         BOOL modified;
>         BOOL is_directory;
>         BOOL directory_delete_on_close;
>         BOOL delete_on_close;
>         char *fsp_name;
>         SMB_DEV_T dev;
>         SMB_INO_T inode;
>         SMB_OFF_T pos;
>         SMB_OFF_T size;
> } files_struct;
> now all fsp->mode ... fsp->fsp_name fields will not longer depend by compilation 
> _LARGEFILE64_SOURCE/_LARGEFILE_SOURCE/_FILE_OFFSET_BITS/_GNU_SOURCE defines.
Fine for me. Now let's wait few hours when developers from other side of
the planet will wake up :)


-- 
/ Alexander Bokovoy
---
Nothing is illegal if one hundred businessmen decide to do it.
		-- Andrew Young




More information about the samba-technical mailing list