From owner-freebsd-fs@freebsd.org Tue Jun 28 19:57:39 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 6F728B862FD for ; Tue, 28 Jun 2016 19:57:39 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (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 02C272049 for ; Tue, 28 Jun 2016 19:57:39 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm0-x235.google.com with SMTP id f126so153901337wma.1 for ; Tue, 28 Jun 2016 12:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=rATWQx3fnSMCH+HgNCyfh4FQ82ibPiuaMJxvv2yL0ZA=; b=IP0LtCydT+Jhu5R7fzp10QN2DEOr3yE+LppTTc2lJwzTXi6cT5B9PumrqAU4x7jkap fBpyPimx2uCfYrmbljjBYMaVnEo+HHLqh9xWs9KTjejrd0mEzk1YbObbSVCFqaQvnIwT GEk9SjIRHhATO5oM9TZBq7wgKd7e+V+5kALIMYP8kl7cYOzXj9wQph7H//WKURt10HDY mdB3WmqHSXK10+qSB3YfnmcCP/gC7RNz5hi8+/bn/NqMj6q5hwRaGI95o7+/99jOFXVe XjLyMQQKdFXu7rzdai1LUuGl3MxQdtzRGTxuPRZ3aJ4cWJAuIRHxZhhO8TsPlYaavukI xe/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=rATWQx3fnSMCH+HgNCyfh4FQ82ibPiuaMJxvv2yL0ZA=; b=ZCPzrlU5Sc6XK8GZqdgOeUDd82+8t1yJQsR0SFk30G1A3WCGOXyDCGPd+lDnR1miLw /HWXRh6MyhjjeNeaegeB1n1aHTY9QurTv8iIAnUHzxEAXsCdnCw7fGdisS4vpbtLMUre gz+gbWEaSIH/IUZ4qgtsqiPLhdp5F9007ULKXn+4mA8XbMG6N8DYa6otJFmtPrHmKLye ULw8o5mjlfR5ZtiIPusS24raetoAi3R/a8n/ITMN3AMsFZy+v4fLRDvODl78vmnU5BJF vUZCSUlSW4HQV+QVnNUWNfE4XYwVy3Yd5H079ScktQjD0Es039DlDe6sQzmHtSMgoJH9 dzKQ== X-Gm-Message-State: ALyK8tJ6KWW65WUeRG6asuLUpRj71/hYoOnkw+C4JcIrAkCsPcaC4XPholMMUoAnHI9hiQ== X-Received: by 10.194.67.101 with SMTP id m5mr5174642wjt.129.1467143857448; Tue, 28 Jun 2016 12:57:37 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id qg5sm12761wjc.13.2016.06.28.12.57.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 28 Jun 2016 12:57:33 -0700 (PDT) Date: Tue, 28 Jun 2016 21:57:31 +0200 From: Mateusz Guzik To: Hongjiang Zhang , "freebsd-fs@freebsd.org" Subject: Re: ufs freeze does not work Message-ID: <20160628195731.GA21323@dft-labs.eu> References: <20160628065432.GA20716@brick> <20160628185523.GA82035@brick> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160628185523.GA82035@brick> User-Agent: Mutt/1.5.21 (2010-09-15) 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:57:39 -0000 On Tue, Jun 28, 2016 at 08:55:23PM +0200, Edward Tomasz Napierała wrote: > 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. > The example with freeze -f strongly hints this is supposed to work as a drop in replacement for linux scripts. As such, maybe ufs should grow another operation which does not automagically unfreeze. > 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. > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" -- Mateusz Guzik