Lines Matching defs:iostate
138 int flags, buf_t real_bp, struct clios *iostate, int (*)(buf_t, void *), void *callback_arg);
492 struct clios *iostate;
531 iostate = (struct clios *)cbp->b_iostate;
576 if (iostate) {
585 if (error && iostate->io_error == 0)
586 iostate->io_error = error;
588 iostate->io_completed += total_size;
590 if (iostate->io_wanted) {
595 iostate->io_wanted = 0;
601 wakeup((caddr_t)&iostate->io_wanted);
750 int flags, buf_t real_bp, struct clios *iostate, int (*callback)(buf_t, void *), void *callback_arg)
1294 if ((cbp->b_iostate = (void *)iostate))
1299 iostate->io_issued += io_size;
1418 if (iostate) {
1428 if (iostate->io_error == 0)
1429 iostate->io_error = error;
1430 iostate->io_issued -= io_size;
1432 if (iostate->io_wanted) {
1437 iostate->io_wanted = 0;
1443 wakeup((caddr_t)&iostate->io_wanted);
1914 struct clios iostate;
1935 iostate.io_completed = 0;
1936 iostate.io_issued = 0;
1937 iostate.io_error = 0;
1938 iostate.io_wanted = 0;
2093 while ((iostate.io_issued - iostate.io_completed) > (2 * max_upl_size)) {
2096 iostate.io_issued, iostate.io_completed, 2 * max_upl_size, 0, 0);
2098 iostate.io_wanted = 1;
2099 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_write_direct", NULL);
2102 iostate.io_issued, iostate.io_completed, 2 * max_upl_size, 0, 0);
2106 if (iostate.io_error) {
2124 io_size, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
2139 if (retval == 0 && iostate.io_error == 0 && io_req_size == 0) {
2153 if (iostate.io_issued) {
2160 while (iostate.io_issued != iostate.io_completed) {
2162 iostate.io_issued, iostate.io_completed, 0, 0, 0);
2164 iostate.io_wanted = 1;
2165 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_write_direct", NULL);
2168 iostate.io_issued, iostate.io_completed, 0, 0, 0);
2172 if (iostate.io_error)
2173 retval = iostate.io_error;
2210 struct clios iostate;
2229 iostate.io_completed = 0;
2230 iostate.io_issued = 0;
2231 iostate.io_error = 0;
2232 iostate.io_wanted = 0;
2322 if (iostate.io_issued) {
2325 while ((iostate.io_issued - iostate.io_completed) > (2 * MAX_IO_CONTIG_SIZE)) {
2328 iostate.io_issued, iostate.io_completed, 2 * MAX_IO_CONTIG_SIZE, 0, 0);
2330 iostate.io_wanted = 1;
2331 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_write_contig", NULL);
2334 iostate.io_issued, iostate.io_completed, 2 * MAX_IO_CONTIG_SIZE, 0, 0);
2338 if (iostate.io_error) {
2351 xsize, CL_DEV_MEMORY | CL_ASYNC | bflag, (buf_t)NULL, (struct clios *)&iostate, callback, callback_arg);
2365 if (error == 0 && iostate.io_error == 0 && tail_size == 0 && num_upl < MAX_VECTS) {
2383 while (iostate.io_issued != iostate.io_completed) {
2385 iostate.io_issued, iostate.io_completed, 0, 0, 0);
2387 iostate.io_wanted = 1;
2388 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_write_contig", NULL);
2391 iostate.io_issued, iostate.io_completed, 0, 0, 0);
2395 if (iostate.io_error)
2396 error = iostate.io_error;
3151 struct clios iostate;
3367 iostate.io_completed = 0;
3368 iostate.io_issued = 0;
3369 iostate.io_error = 0;
3370 iostate.io_wanted = 0;
3390 io_size, CL_READ | CL_ASYNC | bflag, (buf_t)NULL, &iostate, callback, callback_arg);
3471 while (iostate.io_issued != iostate.io_completed) {
3473 iostate.io_issued, iostate.io_completed, 0, 0, 0);
3475 iostate.io_wanted = 1;
3476 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_read_copy", NULL);
3479 iostate.io_issued, iostate.io_completed, 0, 0, 0);
3483 if (iostate.io_error)
3484 error = iostate.io_error;
3602 struct clios iostate;
3631 iostate.io_completed = 0;
3632 iostate.io_issued = 0;
3633 iostate.io_error = 0;
3634 iostate.io_wanted = 0;
3861 while ((iostate.io_issued - iostate.io_completed) > max_rd_ahead) {
3863 iostate.io_issued, iostate.io_completed, max_rd_ahead, 0, 0);
3865 iostate.io_wanted = 1;
3866 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_read_direct", NULL);
3869 iostate.io_issued, iostate.io_completed, max_rd_ahead, 0, 0);
3873 if (iostate.io_error) {
3893 retval = cluster_io(vp, upl, upl_offset, uio->uio_offset, io_size, io_flag, (buf_t)NULL, &iostate, callback, callback_arg);
3907 if (retval == 0 && iostate.io_error == 0 && io_req_size == 0 && uio->uio_offset < filesize) {
3921 if (iostate.io_issued) {
3928 while (iostate.io_issued != iostate.io_completed) {
3930 iostate.io_issued, iostate.io_completed, 0, 0, 0);
3932 iostate.io_wanted = 1;
3933 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_read_direct", NULL);
3936 iostate.io_issued, iostate.io_completed, 0, 0, 0);
3941 if (iostate.io_error)
3942 retval = iostate.io_error;
3975 struct clios iostate;
4002 iostate.io_completed = 0;
4003 iostate.io_issued = 0;
4004 iostate.io_error = 0;
4005 iostate.io_wanted = 0;
4104 if (iostate.io_issued) {
4107 while ((iostate.io_issued - iostate.io_completed) > (2 * MAX_IO_CONTIG_SIZE)) {
4109 iostate.io_issued, iostate.io_completed, 2 * MAX_IO_CONTIG_SIZE, 0, 0);
4111 iostate.io_wanted = 1;
4112 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_read_contig", NULL);
4115 iostate.io_issued, iostate.io_completed, 2 * MAX_IO_CONTIG_SIZE, 0, 0);
4119 if (iostate.io_error) {
4130 (buf_t)NULL, &iostate, callback, callback_arg);
4143 if (error == 0 && iostate.io_error == 0 && tail_size == 0 && num_upl < MAX_VECTS && uio->uio_offset < filesize) {
4161 while (iostate.io_issued != iostate.io_completed) {
4163 iostate.io_issued, iostate.io_completed, 0, 0, 0);
4165 iostate.io_wanted = 1;
4166 msleep((caddr_t)&iostate.io_wanted, cl_mtxp, PRIBIO + 1, "cluster_read_contig", NULL);
4169 iostate.io_issued, iostate.io_completed, 0, 0, 0);
4173 if (iostate.io_error)
4174 error = iostate.io_error;