Commit 7bac612c authored by Tim Wickberg's avatar Tim Wickberg
Browse files

Restructure file_bcast mechanism to fork only on first block.

1) Add a new global file_bcast_list to store info on in-progress file
   transfers, cache FD there rather than reopening the file for every block.
2) Restructure security mechanisms. First block will fork() and open the
   file, and pass the FD back to the thread. Thread then registers this file
   transfer in the file_bcast_list. Split fork() stuff into
   _file_bcast_register_file to keep _rpc_file_bcast readable.
3) Successive blocks are handled within the thread. Security is handled by
   matching uid and file name to existing file transfer.

TODO:

1) Write transfer cleanup function to remove stalled transfers.
2) Use mmap for file output.
3) Allow for parallel block transfer. Current code assumes blocks will always
   arrive in order. Out of order blocks will result in corrupted output.
   (sbcast currently prevents this by requiring each message to be ack'd
   before continuing, but at a likely severe performance penalty.)
4) Add stats on receive side.
parent 90206f27
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment