From 328e0f4b04aeb4fa820ad42ef65b80d4219281e0 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Mon, 14 Jun 2010 21:44:20 +0000 Subject: [PATCH] Initialize gctl_seq for synchronization requests. Reported by: hiroshi@soupacific.com Analysed by: Mikolaj Golub Tested by: hiroshi@soupacific.com, Mikolaj Golub MFC after: 3 days --- sbin/hastd/primary.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c index 0985920c8843..ae7422044480 100644 --- a/sbin/hastd/primary.c +++ b/sbin/hastd/primary.c @@ -195,7 +195,10 @@ static pthread_mutex_t metadata_lock; mtx_unlock(&hio_##name##_list_lock); \ } while (0) -#define SYNCREQ(hio) do { (hio)->hio_ggio.gctl_unit = -1; } while (0) +#define SYNCREQ(hio) do { \ + (hio)->hio_ggio.gctl_unit = -1; \ + (hio)->hio_ggio.gctl_seq = 1; \ +} while (0) #define ISSYNCREQ(hio) ((hio)->hio_ggio.gctl_unit == -1) #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2)