diff --git a/sys/fs/udf/udf_strat_direct.c b/sys/fs/udf/udf_strat_direct.c index 126fd307b16b..4299874c6a84 100644 --- a/sys/fs/udf/udf_strat_direct.c +++ b/sys/fs/udf/udf_strat_direct.c @@ -1,4 +1,4 @@ -/* $NetBSD: udf_strat_direct.c,v 1.5 2008/08/29 15:04:18 reinoud Exp $ */ +/* $NetBSD: udf_strat_direct.c,v 1.6 2008/11/28 15:29:47 reinoud Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -28,7 +28,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.5 2008/08/29 15:04:18 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_strat_direct.c,v 1.6 2008/11/28 15:29:47 reinoud Exp $"); #endif /* not lint */ @@ -278,7 +278,8 @@ udf_queue_buf_direct(struct udf_strat_args *args) /* use disc sheduler */ class = ump->discinfo.mmc_class; KASSERT((class == MMC_CLASS_UNKN) || (class == MMC_CLASS_DISC) || - (ump->discinfo.mmc_cur & MMC_CAP_HW_DEFECTFREE)); + (ump->discinfo.mmc_cur & MMC_CAP_HW_DEFECTFREE) || + (ump->vfs_mountp->mnt_flag & MNT_RDONLY)); if (queue == UDF_SHED_READING) { DPRINTF(SHEDULE, ("\nudf_issue_buf READ %p : sector %d type %d," diff --git a/sys/fs/udf/udf_subr.c b/sys/fs/udf/udf_subr.c index e99039685090..32c8b8df69d2 100644 --- a/sys/fs/udf/udf_subr.c +++ b/sys/fs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: udf_subr.c,v 1.74 2008/11/28 14:33:36 reinoud Exp $ */ +/* $NetBSD: udf_subr.c,v 1.75 2008/11/28 15:29:47 reinoud Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -29,7 +29,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.74 2008/11/28 14:33:36 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.75 2008/11/28 15:29:47 reinoud Exp $"); #endif /* not lint */ @@ -1991,6 +1991,12 @@ udf_process_vds(struct udf_mount *ump) { if (n_spar) ump->strategy = &udf_strat_rmw; +#if 0 + /* read-only access won't benefit from the other shedulers */ + if (ump->vfs_mountp->mnt_flag & MNT_RDONLY) + ump->strategy = &udf_strat_direct; +#endif + /* print results */ DPRINTF(VOLUMES, ("\tdata partition %d\n", ump->data_part)); DPRINTF(VOLUMES, ("\t\talloc scheme %d\n", ump->vtop_alloc[ump->data_part]));