trans_logger: improve event handling

This commit is contained in:
Thomas Schoebel-Theuer 2012-12-11 16:33:26 +01:00 committed by Thomas Schoebel-Theuer
parent 776e83fea4
commit d9aa8046b7
3 changed files with 6 additions and 0 deletions

View File

@ -115,6 +115,9 @@ void log_write_endio(struct generic_callback *cb)
done:
put_log_cb_info(cb_info);
atomic_dec(&logst->mref_flying);
if (logst->signal_event)
wake_up_interruptible(logst->signal_event);
return;
err:

View File

@ -88,6 +88,8 @@ struct log_header_v1 {
/* Bookkeeping status between calls
*/
struct log_status {
// interfacing
wait_queue_head_t *signal_event;
// tunables
int align_size; // alignment between requests
int chunk_size; // must be at least 8K (better 64k)

View File

@ -2224,6 +2224,7 @@ void _init_input(struct trans_logger_input *input)
loff_t start_pos = input->log_start_pos;
init_logst(logst, (void*)input, 0);
logst->signal_event = &brick->worker_event;
logst->align_size = brick->align_size;
logst->chunk_size = brick->chunk_size;