[linux-cifs-client] Re: Proposed new Unix,
POSIX_OPEN/POSIX_UNLINK calls.
Steve French (smfltc)
smfltc at us.ibm.com
Fri Mar 2 16:51:33 GMT 2007
On 01/03/07, Jeremy Allison <jra at samba.org> wrote:
>> On Thu, Mar 01, 2007 at 12:45:19PM -0800, Jeremy Allison wrote:
>
>
>>> > On Tue, Feb 06, 2007 at 04:26:03PM -0800, Jeremy Allison wrote:
>>
>>
>>>> > > Here's the (initially coded) spec for the POSIX open and
>>>> > > unlink calls.
>>>> > >
>>>> > > .....
>>>> > >
>>>> > > For unlink, call TRANSACT2_SETPATHINFO (0x06) call
>>>> > > info level :
>>>> > >
>>>> > > SMB_POSIX_PATH_UNLINK 0x20A
>>>> > >
>>>> > > No extra data is needed or returned.
>>>
>>>
>>> >
>>> > I think I need to change the spec for unlink before
>>> > 3.0.25 ships.
>>> >
>>> > Clients need to be able to determine if they're
>>> > doing unlink() or rmdir().
>>> >
>>> > Given that, I think we need to add 2 bytes of
>>> > data to the SMB_POSIX_PATH_UNLINK call, defined
>>> > as follows :
>>> >
>>> > 2 bytes : 0 - delete file, 1 - delete directory.
>>> >
>>> > No data is returned other than an NTSTATUS code.
>>> >
>>> > Any opposing thoughts before I change this ?
>>
>>
>>
>> Here's the definition of the data block :
>>
>> /* Definition of request data block for SMB_POSIX_UNLINK */
>> /*
>> [2 bytes] flags (defined below).
>> */
>>
>> #define SMB_POSIX_UNLINK_FILE_TARGET 0
>> #define SMB_POSIX_UNLINK_DIRECTORY_TARGET 1
>
>
I am not certain that we (client people) need to know whether we are
unlinking a file
or directory - but it probably is safer (races between the lookup to see
if it is a
directory and rmdir - when the server might change the directory to a file?)
Also note removing FIFOs, symlinks, device nodes etc. ... how do we handle
that?
More information about the linux-cifs-client
mailing list