Thoughts on how to communicate to VFS functions that a CREATE is occurring

Richard Sharpe realrichardsharpe at
Sat Apr 2 15:00:27 UTC 2016

Hi folks,

There are times in VFS functions where we want to know that the
current call was made from a CREATE vs other paths (like

This allows the VFS modules to do interesting things.

We now have a flags field in the struct smb_filename structure and one
obvious thing we could do is to add an SMB_FILENAME_CREATE_PATH flag
and set it in unix_convert.

However, this has some problems. One is that it would have to be reset
somewhere and secondly there are some VFS functions that are not
passed a struct smb_filename that might want to know we are in the
create path. Indeed, they might want to know whether they were called
for a CREATE, a GETINFO or whatever.

Perhaps the best approach is to have a field in the VFS handle that
indicates what request is being processed.

Is there an easier way to handle this?

Richard Sharpe

More information about the samba-technical mailing list