1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

42 Commits

Author SHA1 Message Date
Volker Lendecke
ff48f7c00c s3: Attempt to fix the IRIX build 2010-10-03 10:54:28 +02:00
Volker Lendecke
8aa3f47dc9 s3: Remove procid_self() from irix_oplocks_read_fde_handler() 2010-07-05 11:06:29 +02:00
Tim Prouty
5a8d70d465 s3: Change fsp->fsp_name to be an smb_filename struct! 2009-07-20 17:26:56 -07:00
Tim Prouty
6fbebb5369 s3: Modify SMB_VFS_FILE_ID_CREATE to take a stat struct
Since file_id_create_dev is incompatible with the concept of file_ids,
it is now static and in the one file that needs it.
2009-02-19 20:58:01 -08:00
Tim Prouty
c6f1f055fd s3 oplocks: Make the level2 oplock contention API more granular
This replaces release_level2_oplocks_on_change with
contend_level2_oplock_begin/end in order to contend level2 oplocks
throughout an operation rather than just at the begining.  This is
necessary for some kernel oplock implementations, and also lays the
groundwork for better correctness in Samba's standard level2 oplock
handling.  The next step for non-kernel oplocks is to add additional
state to the share mode lock struct that prevents any new opens from
granting oplocks while a contending operation is in progress.

All operations that contend level 2 oplocks are now correctly spanned
except for aio and synchronous writes.  The two write paths both have
non-trivial error paths that need extra care to get right.

RAW-OPLOCK and the rest of 'make test' are still passing with this
change.
2009-02-09 23:47:45 -08:00
Tim Prouty
9c1310fa6a s3 oplocks: Differentiate between releasing an oplock vs. downgrading to Level 2 for kernel oplocks
Pass in an extra argument when releasing an oplock so kernel oplock
implementations can support downgrading from Level 1 to Level 2.
2009-02-09 23:47:44 -08:00
Stefan Metzmacher
52f6a4436f s3:smbd: make kernel oplocks event driven
And use signal events for Linux oplocks.

metze
2009-01-27 15:28:10 +01:00
Stefan Metzmacher
196028ab7b s3:smbd: restructure kernel oplocks code
This converts the irix oplocks code to use a fd event
and removes the last special case for file descriptors
for the main sys_select().

metze
2009-01-22 12:37:29 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Jeremy Allison
4a09c5a09f Two more fixes from Jim Brown <jim.brown@miami.edu> for SGI compiler warnings.
Jeremy.
(This used to be commit d85cbdbe29)
2008-07-01 15:39:41 -07:00
Volker Lendecke
88c27f83d4 Convert receive_smb_raw to NTSTATUS
(This used to be commit ba771bd858)
2008-02-02 11:03:23 +01:00
Michael Adam
30a48a5c6c Try to fix the build on irix.
There were two callers of set_smb_read_error() in irix_oplocks.c
not converted to the new prototype.

Michael
(This used to be commit e398a8d7b6)
2007-11-07 22:28:26 +01:00
Jeremy Allison
73d4079680 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
(This used to be commit d50d14c300)
2007-11-03 15:12:42 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
dd16ae2506 r25141: More pstring removal.
Jeremy.
(This used to be commit cfcf7cf03e)
2007-10-10 12:30:45 -05:00
Volker Lendecke
4ee8b2937d r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9a)
2007-10-10 12:30:36 -05:00
Stefan Metzmacher
3e8fc031c8 r24272: try to fix the build on irix...
metze
(This used to be commit dd7e94258b)
2007-10-10 12:29:24 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
fb76516ccd r23185: Try to fix the IRIX build, also add the forgotten file_id.c in .26
(This used to be commit 5360e6405b)
2007-10-10 12:22:53 -05:00
Volker Lendecke
e8156439f2 r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
(This used to be commit 9b10dbbd5d)
2007-10-10 12:22:52 -05:00
Volker Lendecke
def7b0bca1 r20833: Reformatting
(This used to be commit 2c2d5308a2)
2007-10-10 12:17:11 -05:00
Herb Lewis
6914b29daa r20131: get rid of a few no previous prototype warnings
(This used to be commit e710a7d39a)
2007-10-10 12:16:26 -05:00
Jeremy Allison
cc9ea93456 r15668: DOS or FCB opens share one share mode entry from different
fsp pointers. Ensure we cope with this to pass Samba4
DENY tests (we used to pass these, there must have been
a regression with newer code). We now pass them.
Jeremy
(This used to be commit fd6fa1d4ea)
2007-10-10 11:17:06 -05:00
James Peach
5910e397d3 r15446: Tidy up the formatting of locking debug messages and make it more
consistent. Bring oplocks withing the purview of the locking debug
channel.
(This used to be commit e817cfd7d3)
2007-10-10 11:16:45 -05:00
James Peach
97ee5b1afa r14600: Refactor capability interface from being IRIX-specific to using only
the POSIX interface. Note that this removes support for inherited
capabilities. This wasn't used, and probably should not be.
(This used to be commit 763f4c0148)
2007-10-10 11:15:39 -05:00
Jeremy Allison
447d49be9e r13724: Remove unused variable. Bug #3559 from
jason@ncac.gwu.edu.
Jeremy.
(This used to be commit 0295ed3d5c)
2007-10-10 11:10:51 -05:00
James Peach
0c0ce531a8 r13500: Fix ordering of FD_* arguments.
(This used to be commit ed619421de)
2007-10-10 11:10:07 -05:00
Jeremy Allison
5c149702b0 r13498: Fix the kernel oplocks code for IRIX. Should fix #3515.
Jeremy.
(This used to be commit 006cf9c365)
2007-10-10 11:10:07 -05:00
Volker Lendecke
f3d7084bad r10672: Attempt to fix the IRIX build. James, could you test the Oplock code on a box?
Thanks,

Volker
(This used to be commit 9fcf83dcd8)
2007-10-10 11:04:50 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Volker Lendecke
a32a7969c5 r8231: Patch from James Peach to fix the IRIX build.
Thanks,

Volker
(This used to be commit 1ebb3aa0d5)
2007-10-10 10:58:18 -05:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jeremy Allison
88b55f47b4 Move from timestamp to gen count file id's for finding oplocked files
in a tdb.
Jeremy.
(This used to be commit 058ae6b58f)
2001-10-20 21:59:34 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
Jeremy Allison
a69d47640c Fixes for IRIX kernel oplocks and systems that don't have nss.h
Jeremy.
(This used to be commit 711f15ac23)
2000-06-20 00:32:32 +00:00
Andrew Tridgell
b2d01bd2db totally rewrote the async signal, notification and oplock notification
handling in Samba. This was needed due to several limitations and
races in the previous code - as a side effect the new code is much
cleaner :)

in summary:

- changed sys_select() to avoid a signal/select race condition. It is a
  rare race but once we have signals doing notification and oplocks it
  is important.

- changed our main processing loop to take advantage of the new
  sys_select semantics

- split the notify code into implementaion dependent and general
  parts. Added the following structure that defines an implementation:

struct cnotify_fns {
	void * (*register_notify)(connection_struct *conn, char *path, uint32 flags);
	BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t);
	void (*remove_notify)(void *data);
};


then I wrote two implementations, one using hash/poll (like our old
code) and the other using the new Linux kernel change notify. It
should be easy to add other change notify implementations by creating
a sructure of the above type.

- fixed a bug in change notify where we were returning the wrong error
  code.

- rewrote the core change notify code to be much simpler

- moved to real-time signals for leases and change notify

Amazingly, it all seems to work. I was very surprised!
(This used to be commit 44766c39e0)
2000-06-12 15:53:31 +00:00
Andrew Tridgell
8843a6379d Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
26848a3478 a first pass at Linux kernel oplocks support
(This used to be commit 3253085d98)
2000-06-10 14:29:31 +00:00
Andrew Tridgell
52cb05678a continued the split of the kernel level oplocks code into a more
modular form. In this pass I added oplock_irix.c and added a "struct
kernel_oplocks" that describes a kernel oplock implementation.
(This used to be commit b5ceab8102)
2000-06-10 13:38:07 +00:00