1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-18 06:04:06 +03:00

6 Commits

Author SHA1 Message Date
Jeremy Allison
5e06151e4d Paranoia changes to ensure that anything touched by a signal handler
and the main code is declared as VOLATILE SIG_ATOMIC_T.
Jeremy.
(This used to be commit b737c784e34b0e1af014cb828ef37d5b6d73c3e2)
2000-06-19 21:30:27 +00:00
Andrew Tridgell
cc5502a4d0 allow the notify implementation to choose the select timeout change
(This used to be commit b1441d9622609af5ef598c5e1e1f5af438dc0731)
2000-06-14 07:11:27 +00:00
Andrew Tridgell
bf575bf283 use DN_ATTRIB kernel change notify attribute
(This used to be commit 9f542484d11b7b908d3170b702b3bad82ba71525)
2000-06-13 09:31:43 +00:00
Andrew Tridgell
b7930178c3 always use the DN_CREATE mask (NT expects file creation always to
cause a notify)
(This used to be commit 20a06b7fb7c855e874b79b86251d597e7797b3c0)
2000-06-13 06:33:15 +00:00
Andrew Tridgell
c8de9b8fe1 enable the Linux change notify code and change some notify debug code
(This used to be commit c6be511fcc1be79619a0184f03d4c33dbfe12f04)
2000-06-12 17:06:00 +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 44766c39e0027c762bee8b33b12c621c109a3267)
2000-06-12 15:53:31 +00:00