Page MenuHomeFreeBSD

D61277.1796570825.diff
No OneTemporary

Authored By
Unknown
Size
852 B
Referenced Files
None
Subscribers
None

D61277.1796570825.diff

diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c
--- a/usr.sbin/camdd/camdd.c
+++ b/usr.sbin/camdd/camdd.c
@@ -1684,8 +1684,6 @@
pthread_mutex_lock(&dev->mutex);
- dev->flags |= CAMDD_DEV_FLAG_ACTIVE;
-
for (;;) {
struct kevent ke;
int retval = 0;
@@ -3343,13 +3341,18 @@
goto bailout;
}
+ /*
+ * Mark both devices active before starting either worker so that the
+ * reader can queue buffers before the writer starts running.
+ */
+ for (i = 0; i < num_io_opts; i++)
+ devs[i]->flags |= CAMDD_DEV_FLAG_ACTIVE;
+
for (i = 0; i < num_io_opts; i++) {
error = pthread_create(&threads[i], NULL, camdd_worker,
(void *)devs[i]);
- if (error != 0) {
- warnc(error, "pthread_create() failed");
- goto bailout;
- }
+ if (error != 0)
+ errc(1, error, "pthread_create() failed");
}
for (;;) {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 6, 3:27 PM (13 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41556324
Default Alt Text
D61277.1796570825.diff (852 B)

Event Timeline