|
|
| version 1.13, 2004/03/01 06:33:23 | version 1.14, 2004/03/15 16:27:04 |
|---|---|
| Line 4292 loop: | Line 4292 loop: |
| * If we have managed to get rid of all the dirty buffers, | * If we have managed to get rid of all the dirty buffers, |
| * then we are done. For certain directories and block | * then we are done. For certain directories and block |
| * devices, we may need to do further work. | * devices, we may need to do further work. |
| * | |
| * We must wait for any I/O in progress to finish so that | |
| * all potential buffers on the dirty list will be visible. | |
| */ | */ |
| drain_output(vp, 1); | |
| if (TAILQ_FIRST(&vp->v_dirtyblkhd) == NULL) { | if (TAILQ_FIRST(&vp->v_dirtyblkhd) == NULL) { |
| FREE_LOCK(&lk); | FREE_LOCK(&lk); |
| return (0); | return (0); |
| Line 4305 loop: | Line 4309 loop: |
| * partially written files have been written to disk. The only easy | * partially written files have been written to disk. The only easy |
| * way to accomplish this is to sync the entire filesystem (luckily | * way to accomplish this is to sync the entire filesystem (luckily |
| * this happens rarely). | * this happens rarely). |
| * | |
| * We must wait for any I/O in progress to finish so that | |
| * all potential buffers on the dirty list will be visible. | |
| */ | */ |
| drain_output(vp, 1); | |
| if (vn_isdisk(vp, NULL) && | if (vn_isdisk(vp, NULL) && |
| vp->v_specmountpoint && !VOP_ISLOCKED(vp, NULL) && | vp->v_specmountpoint && !VOP_ISLOCKED(vp, NULL) && |
| (error = VFS_SYNC(vp->v_specmountpoint, MNT_WAIT, ap->a_td)) != 0) | (error = VFS_SYNC(vp->v_specmountpoint, MNT_WAIT, ap->a_td)) != 0) |