32c32
< __FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 230092 2012-01-13 23:25:35Z pjd $");
---
> __FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 246922 2013-02-17 21:12:34Z pjd $");
73a74
> bool hio_memsync;
137a139
> hio->hio_memsync = false;
140a143,157
> hio_copy(const struct hio *srchio, struct hio *dsthio)
> {
>
> /*
> * We don't copy hio_error, hio_data and hio_next fields.
> */
>
> dsthio->hio_seq = srchio->hio_seq;
> dsthio->hio_cmd = srchio->hio_cmd;
> dsthio->hio_offset = srchio->hio_offset;
> dsthio->hio_length = srchio->hio_length;
> dsthio->hio_memsync = srchio->hio_memsync;
> }
>
> static void
546d562
< case HIO_READ:
547a564,566
> hio->hio_memsync = nv_exists(nv, "memsync");
> /* FALLTHROUGH */
> case HIO_READ:
624c643
< struct hio *hio;
---
> struct hio *hio, *mshio;
677a697,717
> if (hio->hio_memsync) {
> /*
> * For memsync requests we expect two replies.
> * Clone the hio so we can handle both of them.
> */
> pjdlog_debug(2, "recv: Taking free request.");
> QUEUE_TAKE(free, mshio);
> pjdlog_debug(2, "recv: (%p) Got request.",
> mshio);
> hio_copy(hio, mshio);
> mshio->hio_error = 0;
> /*
> * We want to keep 'memsync' tag only on the
> * request going onto send queue (mshio).
> */
> hio->hio_memsync = false;
> pjdlog_debug(2,
> "recv: (%p) Moving memsync request to the send queue.",
> mshio);
> QUEUE_INSERT(send, mshio);
> }
820a861,864
> if (hio->hio_memsync) {
> PJDLOG_ASSERT(hio->hio_cmd == HIO_WRITE);
> nv_add_int8(nvout, 1, "received");
> }
< __FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 230092 2012-01-13 23:25:35Z pjd $");
---
> __FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 246922 2013-02-17 21:12:34Z pjd $");
73a74
> bool hio_memsync;
137a139
> hio->hio_memsync = false;
140a143,157
> hio_copy(const struct hio *srchio, struct hio *dsthio)
> {
>
> /*
> * We don't copy hio_error, hio_data and hio_next fields.
> */
>
> dsthio->hio_seq = srchio->hio_seq;
> dsthio->hio_cmd = srchio->hio_cmd;
> dsthio->hio_offset = srchio->hio_offset;
> dsthio->hio_length = srchio->hio_length;
> dsthio->hio_memsync = srchio->hio_memsync;
> }
>
> static void
546d562
< case HIO_READ:
547a564,566
> hio->hio_memsync = nv_exists(nv, "memsync");
> /* FALLTHROUGH */
> case HIO_READ:
624c643
< struct hio *hio;
---
> struct hio *hio, *mshio;
677a697,717
> if (hio->hio_memsync) {
> /*
> * For memsync requests we expect two replies.
> * Clone the hio so we can handle both of them.
> */
> pjdlog_debug(2, "recv: Taking free request.");
> QUEUE_TAKE(free, mshio);
> pjdlog_debug(2, "recv: (%p) Got request.",
> mshio);
> hio_copy(hio, mshio);
> mshio->hio_error = 0;
> /*
> * We want to keep 'memsync' tag only on the
> * request going onto send queue (mshio).
> */
> hio->hio_memsync = false;
> pjdlog_debug(2,
> "recv: (%p) Moving memsync request to the send queue.",
> mshio);
> QUEUE_INSERT(send, mshio);
> }
820a861,864
> if (hio->hio_memsync) {
> PJDLOG_ASSERT(hio->hio_cmd == HIO_WRITE);
> nv_add_int8(nvout, 1, "received");
> }