• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with VFS Locking Semantics and OpenDeny calls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with VFS Locking Semantics and OpenDeny calls


  • Subject: Problems with VFS Locking Semantics and OpenDeny calls
  • From: Paul Nelson <email@hidden>
  • Date: Wed, 15 Dec 2010 16:36:37 -0600

First, I am assuming that calls like PBOpenForkSync do not block when a requested deny mode cannot be immediately fulfilled by the VFS.
For example:
FSForkIOParam pblock;
memset(&pblock, 0, sizeof(pblock));
pblock.ref = &theRef;
pblock.permissions = fsWrDenyPerm | fsRdWrPerm;
pblock.forkNameLength = dataForkName.length;
pblock.forkName = dataForkName.unicode;


err = PBOpenForkSync(&pblock);

err = permErr if the process can't obtain the proper deny mode.


For POSIX opens:
int fd = open( path, O_SHLOCK | O_RDWR );
the open call should block until the lock can be obtained.

The blocking behavior is opposite.  However, when a VFS gets these calls, PBOpenForkSync does not set O_NONBLOCK in the open, and the VNOP_ADVLOCK call has the F_WAIT flag set.
This appears to be a bug in the core foundation / carbon layer interface with BSD because a VFS implementor can't tell the proper blocking behavior in the VNOP_ADVLOCK call.

It appears that Apple's SMB and AFP clients do not implement POSIX O_SHLOCK and O_EXLOCK semantics properly, since they do not block until such a lock can be obtained even when O_NONBLOCK is not set.

Has anyone seen this before?  I believe that the Adobe Acrobat problem on network home folders is caused by the AFP client not blocking on O_EXLOCK properly.

Paul Nelson
Thursby Software Systems, Inc.


Note, PBHOpenDenySync appears to call into the VFS the same way PBOpenForkSync does.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: DADiskMount behavior for whole disk object.
  • Next by Date: MNT_DONTBROWSE with FSMountServerVolumeSync
  • Previous by thread: Re: DADiskMount behavior for whole disk object.
  • Next by thread: MNT_DONTBROWSE with FSMountServerVolumeSync
  • Index(es):
    • Date
    • Thread