From owner-freebsd-fs@FreeBSD.ORG Thu Feb 26 03:38:33 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A8D5BFF for ; Thu, 26 Feb 2015 03:38:33 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE660E91 for ; Thu, 26 Feb 2015 03:38:32 +0000 (UTC) Received: by wesu56 with SMTP id u56so7456527wes.10 for ; Wed, 25 Feb 2015 19:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=eoDIm89A6nsAbmdXw+p9Tabe/N2d857EOMENg+qgzxM=; b=KdUySYVBsofkmGKUtQVNPmULPcfC7y7IFlpiu3hQZEkTn5OJSs371797EwiKjrA3D4 79jbNtSrGTVMewn4x8DgxalCkIyVAkkRcj07ym+nQ7/FbeVOzWGnDRII2A8SnFTSukXx MpIE2csFOoca0pIFdA/pKOQp+tfetOit0YAaMH21tFLWGKD/XeSn9T4oDJJvjUvHF0BC uKjgDj5zngeLHkMwm2h07fOoHsVvfUVW2POBZRqFts7M1sUMeK8qFbtVHYOTqXFrM/Pe BtuFPPt8a82EdTK8bjxmiKE5/AFF/JSxeiJAQu42YExRngUSvzbKu0FF0iN77RsojgpX uZqQ== X-Received: by 10.194.23.39 with SMTP id j7mr12523286wjf.9.1424921911133; Wed, 25 Feb 2015 19:38:31 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id kj8sm67530009wjc.29.2015.02.25.19.38.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 19:38:30 -0800 (PST) Date: Thu, 26 Feb 2015 04:38:27 +0100 From: Mateusz Guzik To: andy zhang Subject: Re: About Filesystem freeze/thaw in freebsd Message-ID: <20150226033827.GA3799@dft-labs.eu> References: <54E1B90E.8050101@freebsd.org> <20150216095410.GH34251@kib.kiev.ua> <1424920944349-5992079.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1424920944349-5992079.post@n5.nabble.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2015 03:38:33 -0000 On Wed, Feb 25, 2015 at 08:22:24PM -0700, andy zhang wrote: > Thanks, I have already tried "UFSSUSPEND/UFSRESUME ioctls on the > /dev/ufssuspend", and I found it actually not work. In Linux, if I send > freeze ioctl, all write operations will be blocked unless I send thaw ioctl. > While for "UFSSUSPEND/UFSRESUME ioctls", it does not work in that way. > that is: > If I send UFSSUSPEND ioctl, I still can do write operations, like create > files, etc. > > I am still looking that the code of ufssuspend, and if that really not > works, i may implement that in my driver level. thanks for any advice. > Can you show your code? If you inspect ffs_susp_ioctl, you will see it expects fsid as an argument. Unless stuff got horribly broken, you can also see that proper usage results in setting MNTK_SUSPEND flag. Then if you inspect code creating files, writing etc. you will see it checks for that flag. -- Mateusz Guzik