From owner-freebsd-bugs@FreeBSD.ORG Mon May 12 10:40:06 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51F41106564A for ; Mon, 12 May 2008 10:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 401BB8FC1B for ; Mon, 12 May 2008 10:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4CAe5ct034091 for ; Mon, 12 May 2008 10:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4CAe5d0034090; Mon, 12 May 2008 10:40:05 GMT (envelope-from gnats) Date: Mon, 12 May 2008 10:40:05 GMT Message-Id: <200805121040.m4CAe5d0034090@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jaakko Heinonen Cc: Subject: Re: kern/122833: [snapshots] [patch] mountd fails on nmount() after UFS snapshot creation with mount X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jaakko Heinonen List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2008 10:40:06 -0000 The following reply was made to PR kern/122833; it has been noted by GNATS. From: Jaakko Heinonen To: =?utf-8?B?R2HDq2w=?= Roualland Cc: bug-followup@FreeBSD.org, leon.kos@lecad.fs.uni-lj.si, rodrigc@FreeBSD.org, Yar Tikhiy Subject: Re: kern/122833: [snapshots] [patch] mountd fails on nmount() after UFS snapshot creation with mount Date: Mon, 12 May 2008 13:37:00 +0300 Hi, On 2008-05-11, Gaƫl Roualland wrote: > After looking a bit in mount and mksnap_ffs, this seems due to a > difference in the way the snapshot is created : mount calls nmount(2), > while mksnap_ffs only calls mount(2). This bug occurs because when doing a snapshot with nmount(2) call (with "snapshot" option) the "snapshot" option string persists for the mount point even after the nmount call. Later nmount(2) calls made by mountd(8) fail because the ffs code tries to create a snapshot due to "snapshot" option string presence. You can work around the problem without reboot by removing the option string with mount -o nosnapshot The bug could be worked around in mountd code but IMO a proper fix is needed in kernel nmount code. There are also other ways to reproduce the bug: # mount -o snapshot /.snap/foo / # mount -u -o atime / mount: /dev/ad2s1a : Cross-device link # mount -o nosnapshot / # mount -u -o atime / # -- Jaakko