search for: lock_mand

Displaying 11 results from an estimated 11 matches for "lock_mand".

2020 Jun 30
3
Issues with FLOCK on NFS Share
On 30/06/2020 14:55, Ralph Boehme via samba wrote: > Howdy! > > Am 6/30/20 um 2:37 PM schrieb Georg.Biberger--- via samba: >> We are using Samba 4.10.16 as a readonly file server on a linux box with SLES 12. All is working fine with our NAS NFS Shares. We are now trying to integrate new NFS Shares from an archive provider. We have some problems with samba not responding, when
2007 Mar 13
10
Need some explanation on Samba/NFS locks handle
...ires a patch to Linux. ****************************************************************************/ static void kernel_flock(files_struct *fsp, uint32 share_mode) { #if HAVE_KERNEL_SHARE_MODES int kernel_mode = 0; if (share_mode == FILE_SHARE_WRITE) { kernel_mode = LOCK_MAND|LOCK_WRITE; } else if (share_mode == FILE_SHARE_READ) { kernel_mode = LOCK_MAND|LOCK_READ; } else if (share_mode == FILE_SHARE_NONE) { kernel_mode = LOCK_MAND; } if (kernel_mode) { flock(fsp->fh->fd, kernel_mode);...
2020 Jul 01
0
Issues with FLOCK on NFS Share
...hare_mode set to FILE_SHARE_READ|FILE_SHARE_WRITE, then the function flock is not be called. void kernel_flock(int fd, uint32_t share_mode, uint32_t access_mask) { #ifdef HAVE_KERNEL_SHARE_MODES int kernel_mode = 0; if (share_mode == FILE_SHARE_WRITE) { kernel_mode = LOCK_MAND|LOCK_WRITE; } else if (share_mode == FILE_SHARE_READ) { kernel_mode = LOCK_MAND|LOCK_READ; } else if (share_mode == FILE_SHARE_NONE) { kernel_mode = LOCK_MAND; } if (kernel_mode) { flock(fd, kernel_mode); } #end...
2008 Jan 25
1
Windows share modes and Linux file locking, flock & fcntl
...start=256, len=1}, 0xbff6a890) = 0 open("temp/test.txt", O_RDWR|O_LARGEFILE) = 19 flock(19, 0x20 /* LOCK_??? */) = 0 fcntl64(19, F_SETSIG, 0x23) = 0 fcntl64(19, 0x400 /* F_??? */, 0x1) = 0 The second argument to flock() on the test file is 0x20, which is what LOCK_MAND is defined as in the samba-3.0.28 source in the file source/include/includes.h. This is the same value I find in /usr/include/bits/fcntl.h and /usr/include/asm/fcntl.h. So I wrote a test program (included below) that uses flock with this value (instad of the usual LOCK_EX) but multiple instances...
2020 Jul 01
2
Issues with FLOCK on NFS Share
...hare_mode set to FILE_SHARE_READ|FILE_SHARE_WRITE, then the function flock is not be called. void kernel_flock(int fd, uint32_t share_mode, uint32_t access_mask) { #ifdef HAVE_KERNEL_SHARE_MODES int kernel_mode = 0; if (share_mode == FILE_SHARE_WRITE) { kernel_mode = LOCK_MAND|LOCK_WRITE; } else if (share_mode == FILE_SHARE_READ) { kernel_mode = LOCK_MAND|LOCK_READ; } else if (share_mode == FILE_SHARE_NONE) { kernel_mode = LOCK_MAND; } if (kernel_mode) { flock(fd, kernel_mode); } #end...
2009 Apr 21
1
blocking file locks
...ocks would work for them, and also they do not seem to be Linux-compatible on the server, and I suspect I may need that for efficiency's sake (a lot of files are being locked/unlocked). I downloaded samba-latest.tar.gz and noticed that source/smbd/blocking.c seems to respond to these by setting LOCK_MAND versions of flock states, which are available only for "sys_flock" and rumored not to affect normal Linux programming. Can file locks block a Samba open request? Can they be set by, or made to affect, Linux programming on the server (I don't care about NFS file opens, only local open...
2023 Jan 20
2
oplocks, kernel oplocks, kernel share modes, .. - how it all works?
Hi! I'm trying to understand how various ways to grant a file lease to (windows) clients works. Especially in context when files are being modified locally on the linux filesystem. For example, there's this wording in man smb.conf: kernel share modes ... Kernel share modes provide a minimal level of interoperability with local UNIX processes and NFS operations by
2006 Jun 26
2
[klibc 28/43] mips support for klibc
...K64 33 +#define F_SETLK64 34 +#define F_SETLKW64 35 + +#define FD_CLOEXEC 1 + +#define F_RDLCK 0 +#define F_WRLCK 1 +#define F_UNLCK 2 + +#define F_EXLCK 4 +#define F_SHLCK 8 + +#define F_INPROGRESS 16 + +#define LOCK_SH 1 +#define LOCK_EX 2 +#define LOCK_NB 4 +#define LOCK_UN 8 + +#define LOCK_MAND 32 +#define LOCK_READ 64 +#define LOCK_WRITE 128 +#define LOCK_RW 192 + +typedef struct flock { + short l_type; + short l_whence; + loff_t l_start; + loff_t l_len; + pid_t l_pid; +} flock_t; + +#define F_LINUX_SPECIFIC_BASE 1024 + +#endif /* _KLIBC_ARCHFCNTL_H */ diff --git a/usr/include/arch/m...
2003 Apr 20
1
log of build of 2.2.8a on Solaris9 using SUN's studio7 cc.
...conftest.o ld: fatal: Symbol referencing errors. No output written to conftest configure: failed program was: #line 10456 "configure" #include "confdefs.h" #include <sys/types.h> #include <fcntl.h> #include <signal.h> #include <sys/file.h> #ifndef LOCK_MAND #define LOCK_MAND 32 #define LOCK_READ 64 #endif main() { exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); } configure:10498: checking for IRIX kernel oplock type definitions configure:10512: /opt/SUNWspro/bin/cc -c -O -fast -xtarget=ultra -xarch=v8plusa -I/usr/l...
2003 Dec 01
0
No subject
...may not run on a PA 1.x system. /usr/ccs/bin/ld: Unsatisfied symbols: flock (code) configure: failed program was: #line 9554 "configure" #include "confdefs.h" #include <sys/types.h> #include <fcntl.h> #include <signal.h> #include <sys/file.h> #ifndef LOCK_MAND #define LOCK_MAND 32 #define LOCK_READ 64 #endif main() { exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0); } - Regards, Reinout Wijnveen "All those who believe in psychokinesis raise my hand" ICT-N/Philips Semiconductors Nijmegen Address:...
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In particular, the patchset has been reorganized so as not to break git-bisect. Additionally, this updates the patch base to 2.6.17-git12 (d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main difference on the klibc side is removal of obsolete code. This is also available as a git tree at: