Date: Mon, 27 Sep 2010 13:06:16 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= <phcoder@gmail.com> To: freebsd-mips@freebsd.org Subject: Re: [PATCH] [yeeloong] held proper mountroot waits Message-ID: <4CA07AA8.7020704@gmail.com> In-Reply-To: <4CA040CE.8090706@gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On 09/27/2010 08:59 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Hello. Here the yeeloong patches split into small pieces for easier
> review and merge.
> First patch is to held mountroot wait during usb probing. I believe this
> issue isn't yeeloong-specific but became apparent on it because of
> either different speed ratios between varios hardware components or
> because when I first came up with it I was testing without cache at all.
>
>
Resending the attachment with .txt added
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2 --]
=== modified file 'cam/cam_xpt.c'
--- cam/cam_xpt.c 2010-08-13 22:16:49 +0000
+++ cam/cam_xpt.c 2010-08-13 22:20:49 +0000
@@ -816,6 +816,9 @@
return 0;
}
+static struct root_hold_token *xpt_rool_hold = NULL;
+static int rescan_counter = 0;
+
static void
xpt_rescan_done(struct cam_periph *periph, union ccb *done_ccb)
{
@@ -828,6 +831,11 @@
(*done_ccb->ccb_h.cbfcnp)(periph, done_ccb);
}
xpt_release_boot();
+ if (atomic_fetchadd_int (&rescan_counter, -1) == 1)
+ {
+ root_mount_rel (xpt_rool_hold);
+ xpt_rool_hold = NULL;
+ }
}
/* thread to handle bus rescans */
@@ -861,6 +869,11 @@
{
struct ccb_hdr *hdr;
+ if (atomic_fetchadd_int (&rescan_counter, 1) == 0)
+ {
+ xpt_rool_hold = root_mount_hold("XPT bus rescan");
+ }
+
/* Prepare request */
if (ccb->ccb_h.path->target->target_id == CAM_TARGET_WILDCARD &&
ccb->ccb_h.path->device->lun_id == CAM_LUN_WILDCARD)
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CA07AA8.7020704>
