From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 1 11:07:27 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2CC816A4CE for ; Thu, 1 Jul 2004 11:07:27 +0000 (GMT) Received: from smtp102.mail.sc5.yahoo.com (smtp102.mail.sc5.yahoo.com [216.136.174.140]) by mx1.FreeBSD.org (Postfix) with SMTP id 9714743D1D for ; Thu, 1 Jul 2004 11:07:27 +0000 (GMT) (envelope-from q_dolan@yahoo.com.au) Received: from unknown (HELO ?192.168.100.135?) (q?dolan@203.144.21.67 with plain) by smtp102.mail.sc5.yahoo.com with SMTP; 1 Jul 2004 11:00:06 -0000 In-Reply-To: <0FAC476E-CB27-11D8-9145-000D9335C6A0@yahoo.com.au> References: <20040630115340.L806-100000@kozubik.com> <1088648757.56400.5.camel@dirk> <0FAC476E-CB27-11D8-9145-000D9335C6A0@yahoo.com.au> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Q Date: Thu, 1 Jul 2004 21:00:04 +1000 To: Q X-Mailer: Apple Mail (2.618) cc: freebsd-hackers@freebsd.org cc: Sam Lawrance Subject: Re: writing to RW-mounted UFS2 snapshots - confirmed. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 11:07:27 -0000 On 01/07/2004, at 4:22 PM, Q wrote: > On 01/07/2004, at 12:25 PM, Sam Lawrance wrote: > >>> This is unexpected. You can successfully mount the snapshot >>> read/write and create and write to files in that snapshot. You can >>> also write to files that existed in the snapshot prior to mounting it >>> read/write. >> >> Perhaps the writing is done from a point where the schg flag is not >> checked or obeyed? > > While this may not be "expected" behavior, I am curious why this is > something that should be prevented, rather than verified for > correctness? By "correct" I mean, that the copy on write process is > performed correctly and modifications made to the snapshot don't > modify the underlying filesystem elements also. Ok, I decided to be self sufficient and read Marshall McKusick's paper on background fsck (which also covers snapshots) to answer my own question. Firstly, one of the stated requirements for snapshots to function as outlined in the paper is that they must be read only. The reason they need to be read only is because the support for multiple snapshots assumes that they cannot change, and handles block allocation of freed blocks with this in mind. Supporting snapshot modification is outside the scope of the original implementation and would require further thought. -- Seeya...Q -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _____ / Quinton Dolan - q_dolan@yahoo.com.au __ __/ / / __/ / / / __ / _/ / / Gold Coast, QLD, Australia __/ __/ __/ ____/ / - / Ph: +61 419 729 806 _______ / _\