From owner-freebsd-fs@FreeBSD.ORG Tue Dec 9 14:27:44 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56CF106564A for ; Tue, 9 Dec 2008 14:27:44 +0000 (UTC) (envelope-from chris@arnold.se) Received: from mailstore.infotropic.com (mailstore.infotropic.com [213.136.34.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0241C8FC18 for ; Tue, 9 Dec 2008 14:27:43 +0000 (UTC) (envelope-from chris@arnold.se) Received: (qmail 10796 invoked by uid 89); 9 Dec 2008 14:01:01 -0000 Received: by simscan 1.2.0 ppid: 10791, pid: 10793, t: 0.1087s scanners: attach: 1.2.0 clamav: 0.94/m: Received: from unknown (HELO ?192.168.123.35?) (chris@arnold.se@85.132.191.39) by mailstore.infotropic.com with ESMTPA; 9 Dec 2008 14:01:00 -0000 Date: Tue, 9 Dec 2008 15:01:00 +0100 (CET) From: Christopher Arnold X-X-Sender: chris@localhost To: freebsd-fs@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: =?ISO-8859-1?Q?Outlook_isn=B4t_compliant_with_current_standards_please_install_another_mail_client!?= MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: ZFS and other filesystem semantics. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 14:27:44 -0000 Hi, i have been thinking a bit about filesytem semantics lately. Mainly about open files. Classicly if a file is open the filedescriptor continues accessing the same file regardless if it is deleted or someone did a mv and replaced it. But what happens in ZFS? * delete file in ZFS I guess this is a no brainer, standard unix way of accessing the old file. * The fs get snapshotted and file deleted Same as above i guess. * The fs gets snapshotted and later the snapshot get deleted... What happens here? Or maybe even: * The fs gets snapshotted, file deleted, then snapshot deleted. (These questions are actually just a sidestep from the issue im trying to figure out right no. But i guess they are nevertheless interesting.) The reason i have been thinking about this is that i'm implementing a remote RO filesystem with local caching. And to reduce latency i download chunks of the files and cache these chunks. I'm trying to keep the filesystem stateless, but my issue is that if the file get changed under our feet the resulting chunks would be from different files. Have anyone seen a nice solution to this issue? Does anyone have any ideas of how to implement unix like semantics over a stateless procotol without to much magic? /Chris -- http://www.arnold.se/chris/