geom_subr.c (144157) | geom_subr.c (152565) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/geom/geom_subr.c 144157 2005-03-26 21:07:35Z phk $"); | 37__FBSDID("$FreeBSD: head/sys/geom/geom_subr.c 152565 2005-11-18 02:43:49Z jdp $"); |
38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/devicestat.h> 42#include <sys/kernel.h> 43#include <sys/malloc.h> 44#include <sys/bio.h> 45#include <sys/sysctl.h> --- 683 unchanged lines hidden (view full) --- 729 730 error = pp->geom->access(pp, dcr, dcw, dce); 731 KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, 732 ("Geom provider %s::%s failed closing ->access()", 733 pp->geom->class->name, pp->name)); 734 if (!error) { 735 /* 736 * If we open first write, spoil any partner consumers. | 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/devicestat.h> 42#include <sys/kernel.h> 43#include <sys/malloc.h> 44#include <sys/bio.h> 45#include <sys/sysctl.h> --- 683 unchanged lines hidden (view full) --- 729 730 error = pp->geom->access(pp, dcr, dcw, dce); 731 KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0, 732 ("Geom provider %s::%s failed closing ->access()", 733 pp->geom->class->name, pp->name)); 734 if (!error) { 735 /* 736 * If we open first write, spoil any partner consumers. |
737 * If we close last write, trigger re-taste. | 737 * If we close last write and provider is not errored, 738 * trigger re-taste. |
738 */ 739 if (pp->acw == 0 && dcw != 0) 740 g_spoil(pp, cp); | 739 */ 740 if (pp->acw == 0 && dcw != 0) 741 g_spoil(pp, cp); |
741 else if (pp->acw != 0 && pp->acw == -dcw && | 742 else if (pp->acw != 0 && pp->acw == -dcw && pp->error == 0 && |
742 !(pp->geom->flags & G_GEOM_WITHER)) 743 g_post_event(g_new_provider_event, pp, M_WAITOK, 744 pp, NULL); 745 746 pp->acr += dcr; 747 pp->acw += dcw; 748 pp->ace += dce; 749 cp->acr += dcr; --- 194 unchanged lines hidden --- | 743 !(pp->geom->flags & G_GEOM_WITHER)) 744 g_post_event(g_new_provider_event, pp, M_WAITOK, 745 pp, NULL); 746 747 pp->acr += dcr; 748 pp->acw += dcw; 749 pp->ace += dce; 750 cp->acr += dcr; --- 194 unchanged lines hidden --- |