Re: [PATCH] cifs: Close deferred files that may be open via hard links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 16, 2023 at 02:41:06PM -0400, Tom Talpey wrote:
On 5/16/2023 11:01 AM, Ross Lagerwall wrote:
Windows Server (tested with 2016) disallows opening the same inode via
two different hardlinks at the same time. With deferred closes, this can
result in unexpected behaviour as the following Python snippet shows:

The final open returns EINVAL due to the server returning
STATUS_INVALID_PARAMETER.

Good sleuthing. The hardlink behavior is slightly surprising, but
it is certainly the case that certain incompatible combinations of
open/create flags can conflict with other handles, including
cached opens.

That certainly sounds like implementation-dependent behavior,
probably due to running into the same dev/ino numbers via
a new path :-).

This is kind of an RFC. Is the server doing the wrong thing? Is it
correct to work around this in the client?

By definition the server is doing what it does, and it's a moot
question whether it's appropriate to work around it. However, I don't
see this behavior explicitly stated in MS-FSA. And INVALID_PARAMETER
is a strange error code to return for this. Do you have a packet
trace? We should ask Microsoft.

A packet trace of this would be really interesting :-).



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux