]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
osx: Treat writer node as an internal buffer tree node.
authorAndre Noll <maan@systemlinux.org>
Thu, 14 Jun 2012 15:27:05 +0000 (17:27 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 30 Oct 2012 12:24:32 +0000 (13:24 +0100)
osx_write.c

index e34f03888c800ba5e157c89a4cc011aa66fc9469..73aa137732a61c57cab41a2f9f1532008ae652c9 100644 (file)
@@ -285,7 +285,7 @@ static void osx_write_pre_select(struct sched *s, struct task *t)
        }
 
        mutex_lock(powd->mutex);
-       ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_LEAF);
+       ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_INTERNAL);
        if (ret < 0)
                drain_delay_nec = need_drain_delay(powd);
        mutex_unlock(powd->mutex);
@@ -317,8 +317,9 @@ static void osx_write_post_select(__a_unused struct sched *s, struct task *t)
                AudioOutputUnitStart(powd->audio_unit);
        }
        mutex_lock(powd->mutex);
-       btr_pushdown(btrn);
-       ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF);
+       ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_INTERNAL);
+       if (ret > 0)
+               btr_pushdown(btrn);
        if (ret < 0 && need_drain_delay(powd))
                ret = 0;
        mutex_unlock(powd->mutex);