From owner-freebsd-fs@FreeBSD.ORG Sat Feb 11 11:56:21 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D05761065670 for ; Sat, 11 Feb 2012 11:56:21 +0000 (UTC) (envelope-from guyyur@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0F78FC1C for ; Sat, 11 Feb 2012 11:56:21 +0000 (UTC) Received: by werm13 with SMTP id m13so3847397wer.13 for ; Sat, 11 Feb 2012 03:56:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=xnZ6g3XpBXf+aQTFYFAZbUZqCw5KnpBZxBP5TrAG8Q4=; b=VbpmmzHX/HeApboEmYi3BmnzDHe+NqiygvmCebXi/Y6+pStTuuf+imHnJMz0wN97+P cCkvzhTDPcJT1Wewn/VDD9eqCuoXAQP+0eORchwrpjRB7GxC2V/Try6u5+ze55qaODRk aTl7doPx7f5UAM8E/q+b3GSvrbJ0oDmEs20fw= MIME-Version: 1.0 Received: by 10.216.131.91 with SMTP id l69mr2092250wei.28.1328959765929; Sat, 11 Feb 2012 03:29:25 -0800 (PST) Received: by 10.180.85.74 with HTTP; Sat, 11 Feb 2012 03:29:25 -0800 (PST) Date: Sat, 11 Feb 2012 13:29:25 +0200 Message-ID: From: Guy Yur To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: "mount -u -o ro" stuck on ufs mount with journaled soft-updates X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 11:56:21 -0000 Hi, When updating a mount to read-only for ufs with journaled soft-updates it can get stuck in ffs_sync when there are open unlinked files. The issue doesn't occur when using only soft-updates. >From prints added to softdep_check_suspend I see softdep_deps and ump->softdep_deps are 1 each time the function is called for the specified mount point after doing "mount -u -o ro" terminal 1 prepare /dev/md0 with journaled soft-updates, newfs -U -j mount /dev/md0 /mnt touch /mnt/a.txt tail -f /mnt/a.txt terminal 2 rm /mnt/a.txt mount -u -o ro /mnt mount -u -o ro /mnt Happens with physical hdd as well, for example /dev/ada0p2 Tested on 9.0-RELEASE and head r231393 VirtualBox 1 CPU and 2 CPU guests on i7-860 host Atom 330 host with journaled soft-updates # mount -u -o ro /mnt fsync: giving up on dirty 0xc4697770: tag devfs, type VCHR usecount 1, writecount 0, refcount 6 mountedhere 0xc4654500 flags () v_object 0xc469daa0 ref 0 pages 11 lock type devfs: EXCL by thread 0xc466f2e0 (pid 1518) dev md0 mount: /dev/md0 : Resource temporarily unavailable # mount -u -o ro /mnt mount is stuck taking 100% CPU with soft-updates only # mount -u -o ro /mnt mount: /dev/md0 : Device busy # mount -u -o ro /mnt mount: /dev/md0 : Device busy Thanks, Guy Yur