| 1924 | } |
| 1925 | |
| 1926 | static int |
| 1927 | bd_flushall(struct bufdomain *bd) |
| 1928 | { |
| 1929 | struct bufqueue *bq; |
| 1930 | int flushed; |
| 1931 | int i; |
| 1932 | |
| 1933 | if (bd->bd_lim == 0) |
| 1934 | return (0); |
| 1935 | flushed = 0; |
| 1936 | for (i = 0; i <= mp_maxid; i++) { |
| 1937 | bq = &bd->bd_subq[i]; |
| 1938 | if (bq->bq_len == 0) |
| 1939 | continue; |
| 1940 | BQ_LOCK(bq); |
| 1941 | bd_flush(bd, bq); |
| 1942 | BQ_UNLOCK(bq); |
| 1943 | flushed++; |
| 1944 | } |
| 1945 | |
| 1946 | return (flushed); |
| 1947 | } |
| 1948 | |
| 1949 | static void |
| 1950 | bq_insert(struct bufqueue *bq, struct buf *bp, bool unlock) |
no test coverage detected