Symbol: hio
sbin/hastd/primary.c
109
TAILQ_ENTRY(hio) *hio_next;
sbin/hastd/primary.c
1178
write_complete(struct hast_resource *res, struct hio *hio)
sbin/hastd/primary.c
118
static TAILQ_HEAD(, hio) hio_free_list;
sbin/hastd/primary.c
1183
PJDLOG_ASSERT(!hio->hio_done);
sbin/hastd/primary.c
1185
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
1207
hio->hio_done = true;
sbin/hastd/primary.c
1226
struct hio *hio;
sbin/hastd/primary.c
1232
QUEUE_TAKE2(hio, free);
sbin/hastd/primary.c
1233
pjdlog_debug(2, "ggate_recv: (%p) Got free request.", hio);
sbin/hastd/primary.c
1234
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
1238
hio->hio_done = false;
sbin/hastd/primary.c
1239
hio->hio_replication = res->hr_replication;
sbin/hastd/primary.c
1242
hio);
sbin/hastd/primary.c
1257
hio);
sbin/hastd/primary.c
127
static TAILQ_HEAD(, hio) *hio_send_list;
sbin/hastd/primary.c
1277
hio->hio_errors[ii] = EINVAL;
sbin/hastd/primary.c
1280
hio);
sbin/hastd/primary.c
1355
if (ISMEMSYNC(hio)) {
sbin/hastd/primary.c
1356
hio->hio_memsyncacked = false;
sbin/hastd/primary.c
1357
refcnt_init(&hio->hio_writecount, ncomps);
sbin/hastd/primary.c
1368
"ggate_recv: (%p) Moving request to the send queues.", hio);
sbin/hastd/primary.c
1369
refcnt_init(&hio->hio_countdown, ncomps);
sbin/hastd/primary.c
137
static TAILQ_HEAD(, hio) *hio_recv_list;
sbin/hastd/primary.c
1371
QUEUE_INSERT1(hio, send, ii);
sbin/hastd/primary.c
1386
struct hio *hio;
sbin/hastd/primary.c
1397
QUEUE_TAKE1(hio, send, ncomp, 0);
sbin/hastd/primary.c
1398
pjdlog_debug(2, "local_send: (%p) Got request.", hio);
sbin/hastd/primary.c
1399
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
1406
hio->hio_errors[ncomp] = 0;
sbin/hastd/primary.c
1407
else if (!ISSYNCREQ(hio)) {
sbin/hastd/primary.c
1420
QUEUE_INSERT1(hio, send, rncomp);
sbin/hastd/primary.c
1429
hio->hio_errors[ncomp] = errno;
sbin/hastd/primary.c
1434
hio->hio_errors[ncomp] = EIO;
sbin/hastd/primary.c
1439
hio->hio_errors[ncomp] = 0;
sbin/hastd/primary.c
1440
if (ISASYNC(hio)) {
sbin/hastd/primary.c
1442
write_complete(res, hio);
sbin/hastd/primary.c
1451
hio->hio_errors[ncomp] = errno;
sbin/hastd/primary.c
1456
hio->hio_errors[ncomp] = 0;
sbin/hastd/primary.c
146
static TAILQ_HEAD(, hio) hio_done_list;
sbin/hastd/primary.c
1469
hio->hio_errors[ncomp] = errno;
sbin/hastd/primary.c
1474
hio->hio_errors[ncomp] = 0;
sbin/hastd/primary.c
1478
if (ISMEMSYNCWRITE(hio)) {
sbin/hastd/primary.c
1479
if (refcnt_release(&hio->hio_writecount) == 0) {
sbin/hastd/primary.c
1480
write_complete(res, hio);
sbin/hastd/primary.c
1483
if (refcnt_release(&hio->hio_countdown) > 0)
sbin/hastd/primary.c
1485
if (ISSYNCREQ(hio)) {
sbin/hastd/primary.c
1487
SYNCREQDONE(hio);
sbin/hastd/primary.c
1493
hio);
sbin/hastd/primary.c
1494
QUEUE_INSERT2(hio, done);
sbin/hastd/primary.c
1548
struct hio *hio;
sbin/hastd/primary.c
1562
QUEUE_TAKE1(hio, send, ncomp, HAST_KEEPALIVE);
sbin/hastd/primary.c
1563
if (hio == NULL) {
sbin/hastd/primary.c
1571
pjdlog_debug(2, "remote_send: (%p) Got request.", hio);
sbin/hastd/primary.c
1572
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
1606
if (ISMEMSYNCWRITE(hio))
sbin/hastd/primary.c
1609
hio->hio_errors[ncomp] = nv_error(nv);
sbin/hastd/primary.c
1612
hio);
sbin/hastd/primary.c
1625
hio->hio_errors[ncomp] = ENOTCONN;
sbin/hastd/primary.c
1635
hio);
sbin/hastd/primary.c
1638
TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]);
sbin/hastd/primary.c
1643
hio->hio_errors[ncomp] = errno;
sbin/hastd/primary.c
1646
"remote_send: (%p) Unable to send request.", hio);
sbin/hastd/primary.c
1649
strerror(hio->hio_errors[ncomp]));
sbin/hastd/primary.c
1660
if (ISSYNCREQ(hio)) {
sbin/hastd/primary.c
1661
if (refcnt_release(&hio->hio_countdown) > 0)
sbin/hastd/primary.c
1664
SYNCREQDONE(hio);
sbin/hastd/primary.c
1677
if (ISMEMSYNCWRITE(hio)) {
sbin/hastd/primary.c
1678
if (refcnt_release(&hio->hio_writecount) == 0) {
sbin/hastd/primary.c
1679
if (hio->hio_errors[0] == 0)
sbin/hastd/primary.c
1680
write_complete(res, hio);
sbin/hastd/primary.c
1684
if (refcnt_release(&hio->hio_countdown) > 0)
sbin/hastd/primary.c
1688
hio);
sbin/hastd/primary.c
1689
QUEUE_INSERT2(hio, done);
sbin/hastd/primary.c
1704
struct hio *hio;
sbin/hastd/primary.c
1734
hio = TAILQ_FIRST(&hio_recv_list[ncomp]);
sbin/hastd/primary.c
1735
PJDLOG_ASSERT(hio != NULL);
sbin/hastd/primary.c
1736
TAILQ_REMOVE(&hio_recv_list[ncomp], hio,
sbin/hastd/primary.c
1740
hio->hio_errors[ncomp] = ENOTCONN;
sbin/hastd/primary.c
1759
TAILQ_FOREACH(hio, &hio_recv_list[ncomp], hio_next[ncomp]) {
sbin/hastd/primary.c
1760
if (hio->hio_ggio.gctl_seq == seq) {
sbin/hastd/primary.c
1761
TAILQ_REMOVE(&hio_recv_list[ncomp], hio,
sbin/hastd/primary.c
1768
if (hio == NULL) {
sbin/hastd/primary.c
1774
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
1778
hio->hio_errors[ncomp] = error;
sbin/hastd/primary.c
1794
hio->hio_errors[ncomp] = errno;
sbin/hastd/primary.c
181
#define QUEUE_INSERT1(hio, name, ncomp) do { \
sbin/hastd/primary.c
1811
hio->hio_errors[ncomp] = 0;
sbin/hastd/primary.c
1814
if (ISMEMSYNCWRITE(hio)) {
sbin/hastd/primary.c
1815
if (!hio->hio_memsyncacked) {
sbin/hastd/primary.c
1817
hio->hio_errors[ncomp] != 0);
sbin/hastd/primary.c
1819
if (refcnt_release(&hio->hio_writecount) == 0) {
sbin/hastd/primary.c
1820
if (hio->hio_errors[0] == 0)
sbin/hastd/primary.c
1821
write_complete(res, hio);
sbin/hastd/primary.c
1823
hio->hio_memsyncacked = true;
sbin/hastd/primary.c
1824
if (hio->hio_errors[ncomp] == 0) {
sbin/hastd/primary.c
1827
"back to the recv queue.", hio);
sbin/hastd/primary.c
1830
hio, hio_next[ncomp]);
sbin/hastd/primary.c
1840
if (refcnt_release(&hio->hio_countdown) > 0)
sbin/hastd/primary.c
1842
if (ISSYNCREQ(hio)) {
sbin/hastd/primary.c
1844
SYNCREQDONE(hio);
sbin/hastd/primary.c
185
TAILQ_INSERT_TAIL(&hio_##name##_list[(ncomp)], (hio), \
sbin/hastd/primary.c
1850
hio);
sbin/hastd/primary.c
1851
QUEUE_INSERT2(hio, done);
sbin/hastd/primary.c
1866
struct hio *hio;
sbin/hastd/primary.c
1873
QUEUE_TAKE2(hio, done);
sbin/hastd/primary.c
1874
pjdlog_debug(2, "ggate_send: (%p) Got request.", hio);
sbin/hastd/primary.c
1875
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
1877
if (hio->hio_errors[ii] == 0) {
sbin/hastd/primary.c
1894
ggio->gctl_error = hio->hio_errors[1];
sbin/hastd/primary.c
1896
ggio->gctl_error = hio->hio_errors[0];
sbin/hastd/primary.c
190
#define QUEUE_INSERT2(hio, name) do { \
sbin/hastd/primary.c
1918
if (!hio->hio_done)
sbin/hastd/primary.c
1919
write_complete(res, hio);
sbin/hastd/primary.c
1926
if (hio->hio_errors[0]) {
sbin/hastd/primary.c
194
TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\
sbin/hastd/primary.c
1943
"ggate_send: (%p) Moving request to the free queue.", hio);
sbin/hastd/primary.c
1944
QUEUE_INSERT2(hio, free);
sbin/hastd/primary.c
1957
struct hio *hio;
sbin/hastd/primary.c
198
#define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \
sbin/hastd/primary.c
203
while (((hio) = TAILQ_FIRST(&hio_##name##_list[(ncomp)])) == NULL && !_last) { \
sbin/hastd/primary.c
2066
QUEUE_TAKE2(hio, free);
sbin/hastd/primary.c
2067
pjdlog_debug(2, "sync: (%p) Got free request.", hio);
sbin/hastd/primary.c
209
if (hio != NULL) { \
sbin/hastd/primary.c
2098
SYNCREQ(hio);
sbin/hastd/primary.c
2099
ggio = &hio->hio_ggio;
sbin/hastd/primary.c
2104
hio->hio_done = false;
sbin/hastd/primary.c
2105
hio->hio_replication = res->hr_replication;
sbin/hastd/primary.c
2107
hio->hio_errors[ii] = EINVAL;
sbin/hastd/primary.c
2109
hio);
sbin/hastd/primary.c
2111
hio);
sbin/hastd/primary.c
212
TAILQ_REMOVE(&hio_##name##_list[(ncomp)], (hio), \
sbin/hastd/primary.c
2130
refcnt_init(&hio->hio_countdown, 1);
sbin/hastd/primary.c
2131
QUEUE_INSERT1(hio, send, ncomp);
sbin/hastd/primary.c
2137
while (!ISSYNCREQDONE(hio))
sbin/hastd/primary.c
2141
if (hio->hio_errors[ncomp] != 0) {
sbin/hastd/primary.c
2143
strerror(hio->hio_errors[ncomp]));
sbin/hastd/primary.c
2151
SYNCREQ(hio);
sbin/hastd/primary.c
2154
hio->hio_errors[ii] = EINVAL;
sbin/hastd/primary.c
2156
hio);
sbin/hastd/primary.c
2158
hio);
sbin/hastd/primary.c
217
#define QUEUE_TAKE2(hio, name) do { \
sbin/hastd/primary.c
2179
hio);
sbin/hastd/primary.c
2180
refcnt_init(&hio->hio_countdown, 1);
sbin/hastd/primary.c
2181
QUEUE_INSERT1(hio, send, ncomp);
sbin/hastd/primary.c
2187
while (!ISSYNCREQDONE(hio))
sbin/hastd/primary.c
219
while (((hio) = TAILQ_FIRST(&hio_##name##_list)) == NULL) { \
sbin/hastd/primary.c
2191
if (hio->hio_errors[ncomp] != 0) {
sbin/hastd/primary.c
2193
strerror(hio->hio_errors[ncomp]));
sbin/hastd/primary.c
2205
hio);
sbin/hastd/primary.c
2206
QUEUE_INSERT2(hio, free);
sbin/hastd/primary.c
225
TAILQ_REMOVE(&hio_##name##_list, (hio), hio_##name##_next); \
sbin/hastd/primary.c
229
#define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC)
sbin/hastd/primary.c
230
#define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC)
sbin/hastd/primary.c
231
#define ISASYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_ASYNC)
sbin/hastd/primary.c
233
#define SYNCREQ(hio) do { \
sbin/hastd/primary.c
234
(hio)->hio_ggio.gctl_unit = -1; \
sbin/hastd/primary.c
235
(hio)->hio_ggio.gctl_seq = 1; \
sbin/hastd/primary.c
237
#define ISSYNCREQ(hio) ((hio)->hio_ggio.gctl_unit == -1)
sbin/hastd/primary.c
238
#define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0)
sbin/hastd/primary.c
239
#define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2)
sbin/hastd/primary.c
241
#define ISMEMSYNCWRITE(hio) (ISMEMSYNC(hio) && \
sbin/hastd/primary.c
242
(hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio))
sbin/hastd/primary.c
378
struct hio *hio;
sbin/hastd/primary.c
470
hio = malloc(sizeof(*hio));
sbin/hastd/primary.c
471
if (hio == NULL) {
sbin/hastd/primary.c
474
sizeof(*hio));
sbin/hastd/primary.c
476
refcnt_init(&hio->hio_countdown, 0);
sbin/hastd/primary.c
477
hio->hio_errors = malloc(sizeof(hio->hio_errors[0]) * ncomps);
sbin/hastd/primary.c
478
if (hio->hio_errors == NULL) {
sbin/hastd/primary.c
481
sizeof(hio->hio_errors[0]) * ncomps);
sbin/hastd/primary.c
483
hio->hio_next = malloc(sizeof(hio->hio_next[0]) * ncomps);
sbin/hastd/primary.c
484
if (hio->hio_next == NULL) {
sbin/hastd/primary.c
487
sizeof(hio->hio_next[0]) * ncomps);
sbin/hastd/primary.c
489
hio->hio_ggio.gctl_version = G_GATE_VERSION;
sbin/hastd/primary.c
490
hio->hio_ggio.gctl_data = malloc(MAXPHYS);
sbin/hastd/primary.c
491
if (hio->hio_ggio.gctl_data == NULL) {
sbin/hastd/primary.c
496
hio->hio_ggio.gctl_length = MAXPHYS;
sbin/hastd/primary.c
497
hio->hio_ggio.gctl_error = 0;
sbin/hastd/primary.c
498
TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_free_next);
sbin/hastd/secondary.c
111
#define QUEUE_INSERT(name, hio) do { \
sbin/hastd/secondary.c
115
TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \
sbin/hastd/secondary.c
119
#define QUEUE_TAKE(name, hio) do { \
sbin/hastd/secondary.c
121
while (((hio) = TAILQ_FIRST(&hio_##name##_list)) == NULL) { \
sbin/hastd/secondary.c
127
TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next); \
sbin/hastd/secondary.c
141
hio_clear(struct hio *hio)
sbin/hastd/secondary.c
144
hio->hio_seq = 0;
sbin/hastd/secondary.c
145
hio->hio_error = 0;
sbin/hastd/secondary.c
146
hio->hio_cmd = HIO_UNDEF;
sbin/hastd/secondary.c
147
hio->hio_offset = 0;
sbin/hastd/secondary.c
148
hio->hio_length = 0;
sbin/hastd/secondary.c
149
hio->hio_memsync = false;
sbin/hastd/secondary.c
153
hio_copy(const struct hio *srchio, struct hio *dsthio)
sbin/hastd/secondary.c
170
struct hio *hio;
sbin/hastd/secondary.c
190
hio = malloc(sizeof(*hio));
sbin/hastd/secondary.c
191
if (hio == NULL) {
sbin/hastd/secondary.c
194
sizeof(*hio));
sbin/hastd/secondary.c
196
hio->hio_data = malloc(MAXPHYS);
sbin/hastd/secondary.c
197
if (hio->hio_data == NULL) {
sbin/hastd/secondary.c
202
hio_clear(hio);
sbin/hastd/secondary.c
203
TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next);
sbin/hastd/secondary.c
511
reqlog(int loglevel, int debuglevel, int error, struct hio *hio,
sbin/hastd/secondary.c
522
switch (hio->hio_cmd) {
sbin/hastd/secondary.c
525
"READ(%ju, %ju).", (uintmax_t)hio->hio_offset,
sbin/hastd/secondary.c
526
(uintmax_t)hio->hio_length);
sbin/hastd/secondary.c
530
"DELETE(%ju, %ju).", (uintmax_t)hio->hio_offset,
sbin/hastd/secondary.c
531
(uintmax_t)hio->hio_length);
sbin/hastd/secondary.c
538
"WRITE(%ju, %ju).", (uintmax_t)hio->hio_offset,
sbin/hastd/secondary.c
539
(uintmax_t)hio->hio_length);
sbin/hastd/secondary.c
546
"UNKNOWN(%u).", (unsigned int)hio->hio_cmd);
sbin/hastd/secondary.c
554
requnpack(struct hast_resource *res, struct hio *hio, struct nv *nv)
sbin/hastd/secondary.c
557
hio->hio_cmd = nv_get_uint8(nv, "cmd");
sbin/hastd/secondary.c
558
if (hio->hio_cmd == 0) {
sbin/hastd/secondary.c
560
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
563
if (hio->hio_cmd != HIO_KEEPALIVE) {
sbin/hastd/secondary.c
564
hio->hio_seq = nv_get_uint64(nv, "seq");
sbin/hastd/secondary.c
565
if (hio->hio_seq == 0) {
sbin/hastd/secondary.c
567
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
571
switch (hio->hio_cmd) {
sbin/hastd/secondary.c
576
hio->hio_memsync = nv_exists(nv, "memsync");
sbin/hastd/secondary.c
580
hio->hio_offset = nv_get_uint64(nv, "offset");
sbin/hastd/secondary.c
583
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
586
hio->hio_length = nv_get_uint64(nv, "length");
sbin/hastd/secondary.c
589
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
592
if (hio->hio_length == 0) {
sbin/hastd/secondary.c
594
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
597
if (hio->hio_cmd != HIO_DELETE && hio->hio_length > MAXPHYS) {
sbin/hastd/secondary.c
599
(uintmax_t)hio->hio_length, (uintmax_t)MAXPHYS);
sbin/hastd/secondary.c
600
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
603
if ((hio->hio_offset % res->hr_local_sectorsize) != 0) {
sbin/hastd/secondary.c
605
(uintmax_t)hio->hio_offset);
sbin/hastd/secondary.c
606
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
609
if ((hio->hio_length % res->hr_local_sectorsize) != 0) {
sbin/hastd/secondary.c
611
(uintmax_t)hio->hio_length);
sbin/hastd/secondary.c
612
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
615
if (hio->hio_offset + hio->hio_length >
sbin/hastd/secondary.c
618
(uintmax_t)(hio->hio_offset + hio->hio_length),
sbin/hastd/secondary.c
620
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
626
hio->hio_cmd);
sbin/hastd/secondary.c
627
hio->hio_error = EINVAL;
sbin/hastd/secondary.c
630
hio->hio_error = 0;
sbin/hastd/secondary.c
632
return (hio->hio_error);
sbin/hastd/secondary.c
655
struct hio *hio, *mshio;
sbin/hastd/secondary.c
660
QUEUE_TAKE(free, hio);
sbin/hastd/secondary.c
661
pjdlog_debug(2, "recv: (%p) Got request.", hio);
sbin/hastd/secondary.c
666
if (requnpack(res, hio, nv) != 0) {
sbin/hastd/secondary.c
670
hio);
sbin/hastd/secondary.c
671
QUEUE_INSERT(send, hio);
sbin/hastd/secondary.c
674
switch (hio->hio_cmd) {
sbin/hastd/secondary.c
691
hio->hio_cmd);
sbin/hastd/secondary.c
693
reqlog(LOG_DEBUG, 2, -1, hio,
sbin/hastd/secondary.c
694
"recv: (%p) Got request header: ", hio);
sbin/hastd/secondary.c
695
if (hio->hio_cmd == HIO_KEEPALIVE) {
sbin/hastd/secondary.c
699
hio);
sbin/hastd/secondary.c
700
hio_clear(hio);
sbin/hastd/secondary.c
701
QUEUE_INSERT(free, hio);
sbin/hastd/secondary.c
703
} else if (hio->hio_cmd == HIO_WRITE) {
sbin/hastd/secondary.c
705
hio->hio_data, MAXPHYS) == -1) {
sbin/hastd/secondary.c
709
if (hio->hio_memsync) {
sbin/hastd/secondary.c
718
hio_copy(hio, mshio);
sbin/hastd/secondary.c
724
hio->hio_memsync = false;
sbin/hastd/secondary.c
733
hio);
sbin/hastd/secondary.c
734
QUEUE_INSERT(disk, hio);
sbin/hastd/secondary.c
74
TAILQ_ENTRY(hio) hio_next;
sbin/hastd/secondary.c
748
struct hio *hio;
sbin/hastd/secondary.c
756
QUEUE_TAKE(disk, hio);
sbin/hastd/secondary.c
788
reqlog(LOG_DEBUG, 2, -1, hio, "disk: (%p) Got request: ", hio);
sbin/hastd/secondary.c
791
switch (hio->hio_cmd) {
sbin/hastd/secondary.c
793
ret = pread(res->hr_localfd, hio->hio_data,
sbin/hastd/secondary.c
794
hio->hio_length,
sbin/hastd/secondary.c
795
hio->hio_offset + res->hr_localoff);
sbin/hastd/secondary.c
797
hio->hio_error = errno;
sbin/hastd/secondary.c
798
else if (ret != (int64_t)hio->hio_length)
sbin/hastd/secondary.c
799
hio->hio_error = EIO;
sbin/hastd/secondary.c
801
hio->hio_error = 0;
sbin/hastd/secondary.c
804
ret = pwrite(res->hr_localfd, hio->hio_data,
sbin/hastd/secondary.c
805
hio->hio_length,
sbin/hastd/secondary.c
806
hio->hio_offset + res->hr_localoff);
sbin/hastd/secondary.c
808
hio->hio_error = errno;
sbin/hastd/secondary.c
809
else if (ret != (int64_t)hio->hio_length)
sbin/hastd/secondary.c
810
hio->hio_error = EIO;
sbin/hastd/secondary.c
812
hio->hio_error = 0;
sbin/hastd/secondary.c
816
hio->hio_offset + res->hr_localoff,
sbin/hastd/secondary.c
817
hio->hio_length);
sbin/hastd/secondary.c
819
hio->hio_error = errno;
sbin/hastd/secondary.c
821
hio->hio_error = 0;
sbin/hastd/secondary.c
826
hio->hio_error = EOPNOTSUPP;
sbin/hastd/secondary.c
83
static TAILQ_HEAD(, hio) hio_free_list;
sbin/hastd/secondary.c
834
hio->hio_error = errno;
sbin/hastd/secondary.c
836
hio->hio_error = 0;
sbin/hastd/secondary.c
841
hio->hio_cmd);
sbin/hastd/secondary.c
843
if (logerror && hio->hio_error != 0) {
sbin/hastd/secondary.c
844
reqlog(LOG_ERR, 0, hio->hio_error, hio,
sbin/hastd/secondary.c
848
hio);
sbin/hastd/secondary.c
849
QUEUE_INSERT(send, hio);
sbin/hastd/secondary.c
863
struct hio *hio;
sbin/hastd/secondary.c
869
QUEUE_TAKE(send, hio);
sbin/hastd/secondary.c
870
reqlog(LOG_DEBUG, 2, -1, hio, "send: (%p) Got request: ", hio);
sbin/hastd/secondary.c
873
nv_add_uint64(nvout, hio->hio_seq, "seq");
sbin/hastd/secondary.c
874
if (hio->hio_memsync) {
sbin/hastd/secondary.c
875
PJDLOG_ASSERT(hio->hio_cmd == HIO_WRITE);
sbin/hastd/secondary.c
878
switch (hio->hio_cmd) {
sbin/hastd/secondary.c
880
if (hio->hio_error == 0) {
sbin/hastd/secondary.c
881
data = hio->hio_data;
sbin/hastd/secondary.c
882
length = hio->hio_length;
sbin/hastd/secondary.c
897
hio->hio_cmd);
sbin/hastd/secondary.c
899
if (hio->hio_error != 0) {
sbin/hastd/secondary.c
90
static TAILQ_HEAD(, hio) hio_disk_list;
sbin/hastd/secondary.c
900
switch (hio->hio_cmd) {
sbin/hastd/secondary.c
914
nv_add_int16(nvout, hio->hio_error, "error");
sbin/hastd/secondary.c
922
hio);
sbin/hastd/secondary.c
923
hio_clear(hio);
sbin/hastd/secondary.c
924
QUEUE_INSERT(free, hio);
sbin/hastd/secondary.c
97
static TAILQ_HEAD(, hio) hio_send_list;
sys/dev/ocs_fc/ocs_els.c
1960
ocs_bls_send_acc_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *app)
sys/dev/ocs_fc/ocs_els.c
1987
ocs_els_abort_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *app)
sys/dev/ocs_fc/ocs_els.c
203
if (els->hio != NULL) {
sys/dev/ocs_fc/ocs_els.c
2066
ocs_assert(abort_io->hio == NULL, NULL);
sys/dev/ocs_fc/ocs_els.c
2354
ocs_assert(els->hio, NULL);
sys/dev/ocs_fc/ocs_els.c
2355
ocs_hw_io_free(&ocs->hw, els->hio);
sys/dev/ocs_fc/ocs_els.c
2356
els->hio = NULL;
sys/dev/ocs_fc/ocs_els.c
2446
if (els->hio != NULL) {
sys/dev/ocs_fc/ocs_els.c
2447
ocs_hw_io_free(&ocs->hw, els->hio);
sys/dev/ocs_fc/ocs_els.c
2448
els->hio = NULL;
sys/dev/ocs_fc/ocs_els.c
2675
ocs_ct_acc_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *arg)
sys/dev/ocs_fc/ocs_els.c
452
ocs_els_req_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *arg)
sys/dev/ocs_fc/ocs_els.c
469
ocs_assert(io->hio, -1);
sys/dev/ocs_fc/ocs_els.c
470
ocs_assert(hio == io->hio, -1);
sys/dev/ocs_fc/ocs_els.c
545
ocs_els_acc_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *arg)
sys/dev/ocs_fc/ocs_els.c
562
ocs_assert(io->hio, -1);
sys/dev/ocs_fc/ocs_els.c
563
ocs_assert(hio == io->hio, -1);
sys/dev/ocs_fc/ocs_els.c
60
static int32_t ocs_els_acc_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *arg);
sys/dev/ocs_fc/ocs_els.c
62
static int32_t ocs_bls_send_acc_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length,
sys/dev/ocs_fc/ocs_hw.h
758
ocs_hw_io_t *hio; /**< HW IO */
sys/dev/ocs_fc/ocs_hw_queues.c
1757
seq->hio = NULL;
sys/dev/ocs_fc/ocs_hw_queues.c
1864
seq->hio = NULL;
sys/dev/ocs_fc/ocs_hw_queues.c
1875
seq->hio = ocs_hw_io_lookup(hw, seq->xri);
sys/dev/ocs_fc/ocs_hw_queues.c
1876
ocs_lock(&seq->hio->axr_lock);
sys/dev/ocs_fc/ocs_hw_queues.c
1880
seq->hio->axr_buf->fcfi = seq->fcfi;
sys/dev/ocs_fc/ocs_hw_queues.c
1881
seq->hio->axr_buf->hdr.ox_id = fc_hdr->ox_id;
sys/dev/ocs_fc/ocs_hw_queues.c
1882
seq->hio->axr_buf->hdr.s_id = fc_hdr->s_id;
sys/dev/ocs_fc/ocs_hw_queues.c
1883
seq->hio->axr_buf->hdr.d_id = fc_hdr->d_id;
sys/dev/ocs_fc/ocs_hw_queues.c
1884
seq->hio->axr_buf->cmd_cqe = 1;
sys/dev/ocs_fc/ocs_hw_queues.c
1894
if (seq->hio->type == OCS_HW_IO_TARGET_RSP) {
sys/dev/ocs_fc/ocs_hw_queues.c
1895
seq->hio->axr_buf->call_axr_cmd = 1;
sys/dev/ocs_fc/ocs_hw_queues.c
1896
seq->hio->axr_buf->cmd_seq = seq;
sys/dev/ocs_fc/ocs_hw_queues.c
1916
if(seq->hio->axr_buf->data_cqe == 1) {
sys/dev/ocs_fc/ocs_hw_queues.c
1930
(*hw->callback.bounce)(ocs_hw_unsol_process_bounce, &seq->hio->axr_buf->seq, s_id, d_id, ox_id);
sys/dev/ocs_fc/ocs_hw_queues.c
1933
hw->callback.unsolicited(hw->args.unsolicited, &seq->hio->axr_buf->seq);
sys/dev/ocs_fc/ocs_hw_queues.c
1940
ocs_unlock(&seq->hio->axr_lock);
sys/dev/ocs_fc/ocs_hw_queues.c
1982
seq->hio = io;
sys/dev/ocs_fc/ocs_io.c
253
io->hio = NULL;
sys/dev/ocs_fc/ocs_io.c
285
ocs_hw_io_t *hio = NULL;
sys/dev/ocs_fc/ocs_io.c
292
hio = io->hio;
sys/dev/ocs_fc/ocs_io.c
293
io->hio = NULL;
sys/dev/ocs_fc/ocs_io.c
297
if (hio) {
sys/dev/ocs_fc/ocs_io.c
298
ocs_hw_io_free(&ocs->hw, hio);
sys/dev/ocs_fc/ocs_io.c
392
if (io->hio) {
sys/dev/ocs_fc/ocs_io.c
393
ocs_ddump_value(textbuf, "hw_tag", "%#x", io->hio->reqtag);
sys/dev/ocs_fc/ocs_io.c
394
ocs_ddump_value(textbuf, "hw_xri", "%#x", io->hio->indicator);
sys/dev/ocs_fc/ocs_io.c
395
ocs_ddump_value(textbuf, "hw_type", "%#x", io->hio->type);
sys/dev/ocs_fc/ocs_io.h
94
ocs_hw_io_t *hio; /**< HW IO context */
sys/dev/ocs_fc/ocs_node.c
739
node->ls_acc_io->hio = NULL;
sys/dev/ocs_fc/ocs_node.c
942
if (node->ls_acc_io && node->ls_acc_io->hio != NULL) {
sys/dev/ocs_fc/ocs_node.c
955
ocs_hw_io_free(&ocs->hw, node->ls_acc_io->hio);
sys/dev/ocs_fc/ocs_node.c
958
node->ls_acc_io->hio = NULL;
sys/dev/ocs_fc/ocs_scsi.c
1008
hio = NULL;
sys/dev/ocs_fc/ocs_scsi.c
1012
hio = NULL;
sys/dev/ocs_fc/ocs_scsi.c
1014
hio = ocs_hw_io_alloc(&ocs->hw);
sys/dev/ocs_fc/ocs_scsi.c
1015
if (hio == NULL) {
sys/dev/ocs_fc/ocs_scsi.c
1023
hio->eq = io->hw_priv;
sys/dev/ocs_fc/ocs_scsi.c
1038
if (hio == NULL) {
sys/dev/ocs_fc/ocs_scsi.c
1041
status = ocs_scsi_io_dispatch_hw_io(io, hio);
sys/dev/ocs_fc/ocs_scsi.c
1068
if (io->io_to_abort->hio != NULL) {
sys/dev/ocs_fc/ocs_scsi.c
1120
ocs_hw_io_t *hio;
sys/dev/ocs_fc/ocs_scsi.c
1132
if (io->hio != NULL) {
sys/dev/ocs_fc/ocs_scsi.c
1133
return ocs_scsi_io_dispatch_hw_io(io, io->hio);
sys/dev/ocs_fc/ocs_scsi.c
1166
hio = ocs_hw_io_alloc(&io->ocs->hw);
sys/dev/ocs_fc/ocs_scsi.c
1167
if (hio == NULL) {
sys/dev/ocs_fc/ocs_scsi.c
1179
return ocs_scsi_io_dispatch_hw_io(io, hio);
sys/dev/ocs_fc/ocs_scsi.c
1243
ocs_scsi_io_dispatch_hw_io(ocs_io_t *io, ocs_hw_io_t *hio)
sys/dev/ocs_fc/ocs_scsi.c
1249
io->hio = hio;
sys/dev/ocs_fc/ocs_scsi.c
1251
io->tgt_task_tag = hio->indicator;
sys/dev/ocs_fc/ocs_scsi.c
1253
io->init_task_tag = hio->indicator;
sys/dev/ocs_fc/ocs_scsi.c
1255
io->hw_tag = hio->reqtag;
sys/dev/ocs_fc/ocs_scsi.c
1257
hio->eq = io->hw_priv;
sys/dev/ocs_fc/ocs_scsi.c
1262
hio->wq_steering = OCS_HW_WQ_STEERING_CLASS;
sys/dev/ocs_fc/ocs_scsi.c
1265
hio->wq_steering = OCS_HW_WQ_STEERING_REQUEST;
sys/dev/ocs_fc/ocs_scsi.c
1268
hio->wq_steering = OCS_HW_WQ_STEERING_CPU;
sys/dev/ocs_fc/ocs_scsi.c
1299
rc = ocs_hw_io_register_sgl(&ocs->hw, io->hio, &io->ovfl_sgl, count);
sys/dev/ocs_fc/ocs_scsi.c
1309
rc = ocs_scsi_build_sgls(&ocs->hw, io->hio, &io->hw_dif, io->sgl, io->sgl_count, io->hio_type);
sys/dev/ocs_fc/ocs_scsi.c
1323
rc = ocs_hw_io_send(&io->ocs->hw, io->hio_type, io->hio, io->wire_len, &io->iparam, &io->node->rnode,
sys/dev/ocs_fc/ocs_scsi.c
1329
rc = ocs_hw_srrs_send(&ocs->hw, io->hio_type, io->hio,
sys/dev/ocs_fc/ocs_scsi.c
1336
rc = ocs_hw_srrs_send(&ocs->hw, io->hio_type, io->hio,
sys/dev/ocs_fc/ocs_scsi.c
1345
rc = ocs_hw_srrs_send(&ocs->hw, io->hio_type, io->hio,
sys/dev/ocs_fc/ocs_scsi.c
1377
hio_to_abort = io->io_to_abort->hio;
sys/dev/ocs_fc/ocs_scsi.c
1392
((ocs_hw_done_t)io->hw_cb)(io->hio, NULL, 0, SLI4_FC_WCQE_STATUS_SUCCESS, 0, io);
sys/dev/ocs_fc/ocs_scsi.c
1407
((ocs_hw_done_t)io->hw_cb)(io->hio, NULL, 0, status, 0, io);
sys/dev/ocs_fc/ocs_scsi.c
1846
ocs_target_abort_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *app)
sys/dev/ocs_fc/ocs_scsi.c
1953
ocs_assert(abort_io->hio == NULL, -1);
sys/dev/ocs_fc/ocs_scsi.c
198
if (io->hio != NULL) {
sys/dev/ocs_fc/ocs_scsi.c
1992
ocs_target_bls_resp_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *app)
sys/dev/ocs_fc/ocs_scsi.c
2119
ocs_initiator_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length,
sys/dev/ocs_fc/ocs_scsi.c
2665
ocs_scsi_abort_io_cb(struct ocs_hw_io_s *hio, ocs_remote_node_t *rnode, uint32_t len, int32_t status,
sys/dev/ocs_fc/ocs_scsi.c
316
ocs_target_io_cb(ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t length,
sys/dev/ocs_fc/ocs_scsi.c
683
ocs_scsi_build_sgls(ocs_hw_t *hw, ocs_hw_io_t *hio, ocs_hw_dif_info_t *hw_dif, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, ocs_hw_io_type_e type)
sys/dev/ocs_fc/ocs_scsi.c
691
ocs_assert(hio, -1);
sys/dev/ocs_fc/ocs_scsi.c
694
rc = ocs_hw_io_init_sges(hw, hio, type);
sys/dev/ocs_fc/ocs_scsi.c
704
rc = ocs_hw_io_add_seed_sge(hw, hio, hw_dif);
sys/dev/ocs_fc/ocs_scsi.c
72
static int32_t ocs_scsi_abort_io_cb(struct ocs_hw_io_s *hio, ocs_remote_node_t *rnode, uint32_t len, int32_t status,
sys/dev/ocs_fc/ocs_scsi.c
741
rc = ocs_hw_io_add_seed_sge(hw, hio, hw_dif);
sys/dev/ocs_fc/ocs_scsi.c
745
rc = ocs_hw_io_add_dif_sge(hw, hio, sgl[i].dif_addr);
sys/dev/ocs_fc/ocs_scsi.c
759
rc = ocs_hw_io_add_sge(hw, hio, sgl[i].addr, sgl[i].len);
sys/dev/ocs_fc/ocs_scsi.c
772
rc = ocs_hw_io_add_sge(hw, hio, sgl[i].addr, sgl[i].len);
sys/dev/ocs_fc/ocs_scsi.c
85
static int32_t ocs_scsi_io_dispatch_hw_io(ocs_io_t *io, ocs_hw_io_t *hio);
sys/dev/ocs_fc/ocs_scsi.c
907
ocs_hw_io_t *hio = io->hio;
sys/dev/ocs_fc/ocs_scsi.c
914
ocs_addr32_hi(hio->def_sgl.phys),
sys/dev/ocs_fc/ocs_scsi.c
915
ocs_addr32_lo(hio->def_sgl.phys));
sys/dev/ocs_fc/ocs_scsi.c
916
n_sge = (hio->sgl == &hio->def_sgl ? hio->n_sge : hio->def_sgl_count);
sys/dev/ocs_fc/ocs_scsi.c
917
for (i = 0, data = hio->def_sgl.virt; i < n_sge; i++, data++) {
sys/dev/ocs_fc/ocs_scsi.c
928
if (hio->ovfl_sgl != NULL &&
sys/dev/ocs_fc/ocs_scsi.c
929
hio->sgl == hio->ovfl_sgl) {
sys/dev/ocs_fc/ocs_scsi.c
931
ocs_addr32_hi(hio->ovfl_sgl->phys),
sys/dev/ocs_fc/ocs_scsi.c
932
ocs_addr32_lo(hio->ovfl_sgl->phys));
sys/dev/ocs_fc/ocs_scsi.c
933
for (i = 0, data = hio->ovfl_sgl->virt; i < hio->n_sge; i++, data++) {
sys/dev/ocs_fc/ocs_scsi.c
970
cb(io->hio, NULL, 0, SLI4_FC_WCQE_STATUS_DISPATCH_ERROR, 0, io);
sys/dev/ocs_fc/ocs_scsi.c
993
ocs_hw_io_t *hio;
sys/dev/ocs_fc/ocs_unsol.c
1036
ocs_hw_io_activate_port_owned(&ocs->hw, seq->hio);
sys/dev/ocs_fc/ocs_unsol.c
1037
io->hio = seq->hio;
sys/dev/ocs_fc/ocs_unsol.c
1038
seq->hio->ul_io = io;
sys/dev/ocs_fc/ocs_unsol.c
1039
io->tgt_task_tag = seq->hio->indicator;
sys/dev/ocs_fc/ocs_unsol.c
1073
ocs_hw_io_t *hio = seq->hio;
sys/dev/ocs_fc/ocs_unsol.c
1078
ocs_assert(hio, -1);
sys/dev/ocs_fc/ocs_unsol.c
1080
io = hio->ul_io;
sys/dev/ocs_fc/ocs_unsol.c
1083
hio->indicator);
sys/dev/ocs_fc/ocs_unsol.c
1091
if (!ocs_hw_is_io_port_owned(hw, seq->hio)) {
sys/dev/ocs_fc/ocs_unsol.c
1093
hio->indicator);
sys/dev/ocs_fc/ocs_unsol.c
1100
seq->status, hio->indicator);
sys/dev/ocs_fc/ocs_unsol.c
1107
ocs_port_owned_abort(ocs, seq->hio);
sys/dev/ocs_fc/ocs_unsol.c
1129
hio->indicator, io->init_task_tag);
sys/dev/ocs_fc/ocs_unsol.c
115
ocs_unsol_abort_cb (ocs_hw_io_t *hio, ocs_remote_node_t *rnode, uint32_t len, int32_t status, uint32_t ext, void *arg)
sys/dev/ocs_fc/ocs_unsol.c
118
ocs_assert(hio, -1);
sys/dev/ocs_fc/ocs_unsol.c
120
ocs_log_debug(ocs, "xri=0x%x tag=0x%x\n", hio->indicator, hio->reqtag);
sys/dev/ocs_fc/ocs_unsol.c
121
ocs_hw_io_free(&ocs->hw, hio);
sys/dev/ocs_fc/ocs_unsol.c
131
ocs_port_owned_abort(ocs_t *ocs, ocs_hw_io_t *hio)
sys/dev/ocs_fc/ocs_unsol.c
134
hw_rc = ocs_hw_io_abort(&ocs->hw, hio, FALSE,
sys/dev/ocs_fc/ocs_unsol.c
138
ocs_log_debug(ocs, "already aborted XRI 0x%x\n", hio->indicator);
sys/dev/ocs_fc/ocs_unsol.c
141
hio->indicator, hw_rc);
sys/dev/ocs_fc/ocs_unsol.c
219
if (seq->hio != NULL) {
sys/dev/ocs_fc/ocs_unsol.c
220
ocs_port_owned_abort(ocs, seq->hio);
sys/dev/ocs_fc/ocs_unsol.c
250
if (seq->hio != NULL) {
sys/dev/ocs_fc/ocs_unsol.c
251
ocs_port_owned_abort(ocs, seq->hio);
sys/dev/ocs_fc/ocs_unsol.c
302
if (seq->hio != NULL) {
sys/dev/ocs_fc/ocs_unsol.c
303
ocs_port_owned_abort(ocs, seq->hio);
sys/dev/ocs_fc/ocs_unsol.c
364
if (seq->hio != NULL) {
sys/dev/ocs_fc/ocs_unsol.c
365
ocs_port_owned_abort(ocs, seq->hio);
sys/dev/ocs_fc/ocs_unsol.c
403
if (frame->hio != NULL) {
sys/dev/ocs_fc/ocs_unsol.c
404
ocs_port_owned_abort(ocs, frame->hio);
sys/dev/ocs_fc/ocs_unsol.h
49
extern void ocs_seq_coalesce_cleanup(ocs_hw_io_t *hio, uint8_t abort_io);