2006-09-26  David Smith  <dsmith@redhat.com>

	* transport.c: Changed 'stpd' references to 'staprun'.
	* transport.txt: Ditto.

2006-09-26  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_handle_start): Don't initialize timers here.
	(_stp_transport_init): Initialize timers here. 
	(_stp_cleanup_and_exit): Don't kill timers or free print buffers here.
	(_stp_transport_close): kill timers and free print buffers here.

2006-09-25  Tom Zanussi  <zanussi@us.ibm.com>
	
	* procfs.c (_stp_proc_read): Set buf_info flushing flag.
	* transport.c (_stp_cleanup_and_exit): Remove braces.
	* transport_msgs.h: Add flushing flag to buf_info.

2006-09-22  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_work_queue): Reenable some cleanup
	code.

2006-09-21  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_transport_init): Call _stp_print_init().
	(_stp_cleanup_and_exit): Call _stp_print_cleanup().

2006-09-21  Tom Zanussi  <zanussi@us.ibm.com>
	
	* relayfs.c (_stp_get_relay_root): Call new mutex lock/unlock
	wrappers instead.
	(_stp_lock_inode): New.
	(_stp_unlock_inode): New.

2006-09-19  Tom Zanussi  <zanussi@us.ibm.com>
	
	* procfs.c (_stp_get_proc_root): Removed.
	(_stp_force_dir_creation): Removed.
	(_stp_register_procfs): Remove unneeded procfs dentry code.  *
	relayfs.c (_stp_create_buf_file): Remove code to create relay
	files in procfs, add code to create in debugfs.
	(_stp_remove_buf_file): Remove code to delete relay files in
	procfs, add code to delete from debugfs.
	(_stp_create_relay_dir): New.
	(_stp_remove_relay_dir): New.
	(_stp_get_relay_root): New.
	(_stp_relayfs_close): Use new functions.
	(_stp_relayfs_open): Consolidate alternative versions and remove
	extraneous version.  * relayfs.h: Remove extraneous
	_stp_relayfs_open prototype.
	* transport.c (_stp_transport_open): Remove extraneous call to
	_stp_relayfs_open() and remove call to _stp_unregister_procfs() on
	failure - since it's called from cmd write, cmd can't be removed;
	it's removed in normal shutdown anyway.

2006-09-18  Martin Hunt  <hunt@redhat.com>

	* transport_msgs.h (struct transport_info): Add merge field.
	* transport.c (_stp_transport_open): Set merge field.

2006-06-21  Josh Stone  <joshua.i.stone@intel.com>

	PR 2525
	* transport.c (_stp_handle_start): Initialize timer functions.
	* transport.c (_stp_cleanup_and_exit): Teardown timer functions.

2006-06-13  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_transport_close): Destroy workqueue when
	done.

2006-06-09  Martin Hunt  <hunt@redhat.com>

	* transport.c: Using the default workqueue was causing problems
	because of the long delays on probe_exit(). Created a new
	systemtap work queue and used that instead.

2006-06-05  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_write): Always use spin_lock_irqsave() because
	this function can sometimes be called with interrupts enabled.

2006-04-10  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_write): More fixes because buffers
	are no longer null-terminated.

2006-03-20  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_write): Combine buffers only for REALTIME_DATA.

2006-03-16  Tom Zanussi  <zanussi@us.ibm.com>

 	* procfs.c (_stp_proc_read): Change ifdef for relayfs version.
 	* relayfs.c: Change ifdefs for relayfs version.
 	* relayfs.h: Remove relayfs-config.h include.
 	* transport.c (_stp_handle_buf_info.c): Change ifdef for relayfs
	version.
 	* relayfs-config.h.in: Removed.

2006-03-15  Tom Zanussi  <zanussi@us.ibm.com>
 
 	* procfs.c (_stp_proc_read): Add ifdef for CONFIG_RELAY.
 	(_stp_get_proc_root): New function.
 	(_stp_force_dir_create): New function.
 	(_stp_register_procfs): Add support for CONFIG_RELAY files in
 	proc.
 
 	* relayfs.c (_stp_subbuf_start): Fix ppc64 compilation error
 	mentioned in bug #2406.
 	(_stp_create_buf_file): New function.
 	(_stp_remove_buf_file): New function.
 	(_stp_relayfs_close): Add support for CONFIG_RELAY.
 	(_stp_relayfs_open): Add support for CONFIG_RELAY.
 
 	* relayfs.h: Add support for CONFIG_RELAY and
 	RELAYFS_VERSION_GE_4.
 	* transport.c (_stp_handle_buf_info.c): Add support for
 	CONFIG_RELAY.
 	* transport (_stp_transport_open.c): Add support for CONFIG_RELAY.

 	* relayfs-config.h.in: New file.

2006-03-15  Martin Hunt  <hunt@redhat.com>

	* procfs.c (STP_DEFAULT_BUFFERS): Bump up to 256.

2006-03-06  Martin Hunt  <hunt@redhat.com>

	* transport_msgs.h (struct cmd_info): New message.

2006-02-25  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_proc_write_cmd): Check return code for
	_stp_transport_open().

	* transport.c (_stp_transport_write): This function 
	can now sleep because it is
	(_stp_handle_start): Don't use a mutex when a simple atomic 
	will do.
	(_stp_work_queue): Check atomic to see if probe_start()
	has finished before attempting exit.
	(_stp_transport_close): PR2391. Cancel work queue.
	(_stp_transport_init): If _stp_register_procfs() fails,
	return an error code.

	* transport.txt: New file. Documents transport initialization and 
	shutdown sequence.
	
2006-02-24  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_transport_init): Fail if 
	_stp_register_procfs() fails.

2006-02-17  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_proc_read_cmd): Change spin_lock()
	to spin_lock_irqsave(). 

	* transport.c (_stp_work_queue): Ditto.
	
2005-12-02  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_set_buffers): kmalloc the buffers instead
	of vmalloc.
	(_stp_register_procfs): Ditto.
	(_stp_unregister_procfs): kfree the buffers.

2005-11-30  Martin Hunt  <hunt@redhat.com>

	* transport.h (STP_WORK_TIMER): Declare.
	* transport.c (_stp_work_queue): Wake up every STP_WORK_QUEUE
	jiffies and check IO and exit status.
	(_stp_handle_exit): Deleted.
	* procfs.c (_stp_proc_write_cmd): Just set exit flag on STP_EXIT.
	(_stp_write): Don't call wake_up_interruptible.

2005-10-17  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_handle_start): Grab semaphore before
	calling probe_start() and release after it is done.
	(_stp_handle_exit): Ditto for exiting. This prevents
	exiting before probe_start() is finished.

2005-10-14  Tom Zanussi  <zanussi@us.ibm.com>

	* relayfs.h: Add ifdef'ed relayfs_fs.h include for mainline
	relayfs version.  If you're running a kernel with a version
	of relayfs >= 4 (the version # can be found in
	/include/linux/relayfs_fs.h) configured in, adding a
	#define RELAYFS_VERSION_GE_4 at the top of transport/relayfs.h
	will make systemtap use it instead of the packaged version.
	
	* relayfs.c: Add ifdef'ed relayfs callback functions for
	mainline relayfs version.
	(_stp_relayfs_open): Add ifdef'ed code for mainline
	relayfs version.
	* procfs.c (_stp_proc_read): Ditto.
	* transport.c (_handle_buf_info): Ditto.

2005-10-05  Tom Zanussi  <zanussi@us.ibm.com>

	* transport.c (_stp_transport_open): Add kbug message.
	* transport.h: Change default n_subbufs to 16.

2005-09-08  Martin Hunt  <hunt@redhat.com>

	* procfs.c (_stp_register_procfs): Change ifdefs to eliminate
	unused variable warnings.
	(_stp_unregister_procfs): Ditto.

2005-09-06  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_handle_start): Always reply to
	a start message with STP_START.

2005-08-24  Martin Hunt  <hunt@redhat.com>

	* transport_msgs.h (enum): New type, STP_OOB_DATA.

2005-08-23  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_cleanup_and_exit): Remove a 2 second sleep
	that should no longer be necessary.

	* procfs.c (_stp_write): If the ready queue is not empty
	then attempt to grab the last buffer in it and append our data 
	to it.

2005-08-22  Martin Hunt  <hunt@redhat.com>

	* transport.h: Don't define _stp_transport_write.
	* transport.c (_stp_transport_write): Use
	_stp_transport_send() when in probe_exit().

2005-08-19  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_cmd_handler): Remove. This was used by 
	stp-control.

	* procfs.c (_stp_proc_write_cmd): Call schedule_work() instead
	of running _stp_exit_handler immediately. Fixes a problem where 
	the module couldn't exit if all the output buffers were full.
	Set .owner for the filesystem entries.

2005-08-19  Martin Hunt  <hunt@redhat.com>
	
	* transport.h: Remove netlink references.
	* transport.c: Remove netlink references. Ifdef relayfs code.
	* procfs.c: New file.
	* Makefile: Deleted.
	* control.c: Deleted.
	* control.h: Deleted.
	* netlink.c: Deleted.
	* netlink.h: Deleted.

2005-08-03  Martin Hunt  <hunt@redhat.com>

	* transport.c: Comment out a couple printks.

2005-08-01  Martin Hunt  <hunt@redhat.com>

	* control.h: Remove STP commands from here and put in
	transport_msgs.

	* transport_msgs.h: New file containing the structs and
	values for the messages exchanged between stpd and transport.

	* transport.h: Moved stuff shared with stpd to transport_msgs.h

	* transport.c: Complete rewrite to better handle complicated
	initialization involving exchanging data with stpd. Supports
	buffer size negotiation and more.
	
2005-07-18  Martin Hunt  <hunt@redhat.com>

	* transport.h (_stp_transport_write): Call _stp_relay_write().

	* transport.c (_stp_cleanup_and_exit): Print transport
	failure count.
	(_stp_relay_write): Like relay_write() except returns
	-1 on error.

2005-07-14  Tom Zanussi  <zanussi@us.ibm.com>

	* netlink.c (_stp_netlink_open): Add missing delayed_pkts
	initialization.
	
2005-07-08  Martin Hunt  <hunt@redhat.com>

	* transport.c: Rename pid to _stp_pid.
	Rename t to _stp_tport.
	(_stp_cleanup_and_exit): New internal function.
	(stp_exit_helper): Call _stp_cleanup_and_exit().
	(_stp_transport_cleanup): New function.
	(_stp_cmd_handler): Remove handler for STP_TRANSPORT_MODE.
	The transport now notifies the daemon of the transport.
	(_stp_transport_close): No longer calls _stp_exit_helper().
	That is done by _stp_transport_cleanup().
	(_stp_transport_open): When done, call _stp_handle_transport()
	to notify the daemon what our transport is.
	(_stp_transport_send): Put a retry limit on sends.

	* transport.h: Rename pid to _stp_pid.
	(_stp_transport_cleanup): Add prototype.
	
2005-06-23  Martin Hunt  <hunt@redhat.com>

	* transport.h: Move all the transport open stuff here
	and provide a convenient macro.

	* control.c: Replace macro DEFINE_SPINLOCK because
	some kernels don't have it.
	
2005-06-20  Tom Zanussi  <zanussi@us.ibm.com>

	* control.h: Added STP_TRANSPORT_MODE command.

	* transport.c: Lots of changes, most importantly
	added transport mode command, which also sends buffer
	sizes to daemon, added limit to number of attempts to
	sending STP_EXIT (in case there is no daemon), moved
	exit helper call.

	* transport.h: Added transport type enum and transport
	info struct for communication with userspace, changed and
	moved a couple functions to transport.c.

2005-05-17  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_transport_close): Call stp_exit_helper()
	directly instead of using work queue.

2005-05-16  Martin Hunt  <hunt@redhat.com>

	* transport.c (_stp_cmd_handler): For STP_EXIT, schedule a 
	work queue to do the exit functions.
	(_stp_transport_close): Call work queue for STP_EXIT.
	(_stp_transport_send): Call _stp_ctrl_send() like before, except
	when in probe_exit().  In that case, keep retrying on send errors
	until we succeed. 

	* transport.h (_stp_transport_write): Change to call 
	_stp_transport_send() for NETLINK_ONLY.

	* Makefile (KDIR): set to /lib/modules/... instead of
	/usr/local/src/...

	

