Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fstatfs to detect whether current file system supports shared locks for files opened for writing #55256

Merged
merged 16 commits into from
Jul 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
handle SMB2_SUPER_MAGIC as well (#53182)
  • Loading branch information
adamsitnik committed Jul 8, 2021
commit 04eced6414f39399ac8783aaa2d9ff2725efa4b7
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ private bool CanLockTheFile(Interop.Sys.LockOperations lockOperation, FileAccess
case 0x6969: // NFS_SUPER_MAGIC
case 0xFF534D42: // CIFS_MAGIC_NUMBER
case 0x517B: // SMB_SUPER_MAGIC
case 0xFE534D42: // SMB2_SUPER_MAGIC (#53182)
return false; // LOCK_SH is not OK when writing to NFS, CIFS or SMB
case -1: // error
return false; // assume we should not acquire the lock if we don't know the File System
Expand Down