From owner-freebsd-fs@freebsd.org Tue Jun 28 19:18:20 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E816DB854BB for ; Tue, 28 Jun 2016 19:18:20 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 78B3C2716 for ; Tue, 28 Jun 2016 19:18:20 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id v199so152427045wmv.0 for ; Tue, 28 Jun 2016 12:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=g7tIn69C2FIcOg6Wsz0XcX+Kfle3PW4i1DaGRo/JeNE=; b=0bKPftvIy4dKx2JNXSHtoZUcqyjCfr6w+53u5DfDUqpGurBlt6v+d0vwyKiWd2JvlM 0fNb8XbyyuBoWzUNt+4ungsVgZi2X8jA3P/6gZk1WBlYwl/YPE2/CD0mleffA3E5Sahj 9rmJqXg5k00OOiSS8dFnAuH0Vp3dR8/PccYrDPI6V6MM1o30Py4lNW4R7iPsQbqkllp7 enScPiQd4MmpuAm1coIGgcdY3k/YYXal/7FufLaH9T501d1eB7aZL4rmgdaE5ssLVDYC zD2vOxeJ+7eZshXq59hKLffYmqtdCAHdGbGYtwjsGO7oQlyFyI9w8/RD01eZ0e/SW+yX IemQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=g7tIn69C2FIcOg6Wsz0XcX+Kfle3PW4i1DaGRo/JeNE=; b=XzY0Wq9x9oSiNynx6Hx5oYZnCPJU0kIpsIh+6NaLXfFUQzZgSZzcwd0FmdoOtoTOpw YCC9EMtyRVn6jKuhBD7n26AMbTbfi4OWmoCYgaaohx+BzeUAKW/7Bnpf4pdyhfrbSDK3 I2AtZzqykCtrW9m+DunetPSTztnQZIGcmODvkRuHb1hCfSOJGel0b06EwM6FoPBWcgHi 49e/8I4HNEdcafU62jl9r/w4hQLL6Dz+IE70qiSpu81gEeFBxOgSid3fNR5ARDMwCL6b 1L9hu/Z8UWddYffiRnB0QDFx9hKYa0LPbVD/UIbJcvSOwbv6zYWHEry7hb7NTHZHEVxj DSDg== X-Gm-Message-State: ALyK8tLemBY2STkgnCIBpJ3zhp8rNskmP1+i0u29krbv6/T8AJV0cmzDqjZLU8hlCuzlRA== X-Received: by 10.28.184.5 with SMTP id i5mr4853734wmf.85.1467141498883; Tue, 28 Jun 2016 12:18:18 -0700 (PDT) Received: from brick (adjg143.neoplus.adsl.tpnet.pl. [79.184.214.143]) by smtp.gmail.com with ESMTPSA id e16sm4747659wma.12.2016.06.28.12.18.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 12:18:17 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Tue, 28 Jun 2016 20:55:23 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Hongjiang Zhang Cc: "freebsd-fs@freebsd.org" Subject: Re: ufs freeze does not work Message-ID: <20160628185523.GA82035@brick> Mail-Followup-To: Hongjiang Zhang , "freebsd-fs@freebsd.org" References: <20160628065432.GA20716@brick> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2016 19:18:21 -0000 As I said, the suspension is released when the ufssuspend file descriptor gets closed - which is what happens when the calling process exits. It's a protection mechanism, to avoid the situation where the process malfunction (eg a crash) would leave the system in unrecoverable (suspended) state. You probably want your process to just execute another one, and wait until it exits. On 0628T0733, Hongjiang Zhang wrote: > I run "./freeze -f", the program should freeze the "/" file partition, but I can still write something to "/tmp" folder. > > -----Original Message----- > From: Edward Tomasz NapieraƂa [mailto:etnapierala@gmail.com] On Behalf Of Edward Tomasz Napierala > Sent: Tuesday, June 28, 2016 2:55 PM > To: Hongjiang Zhang > Cc: freebsd-fs@freebsd.org > Subject: Re: ufs freeze does not work > > On 0627T0815, Hongjiang Zhang via freebsd-fs wrote: > > Hi all, > > > > I wrote a test to freeze ufs, but it does not work even if the ioctl returns successful. What is the problem? > > What do you mean by 'does not work'? What happens, and what did you expect to happen? > > Regarding your example - remember that the filesystem gets automatically unsuspended as soon as you close the /dev/ufssuspend file descriptor. >