From owner-freebsd-hackers Wed Jan 2 20:17: 7 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id 6ED2437B41D for ; Wed, 2 Jan 2002 20:17:05 -0800 (PST) Received: from pool0067.cvx22-bradley.dialup.earthlink.net ([209.179.198.67] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16LzJQ-0001C0-00 for hackers@freebsd.org; Wed, 02 Jan 2002 20:17:04 -0800 Message-ID: <3C33DB43.AC29E161@mindspring.com> Date: Wed, 02 Jan 2002 20:17:07 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: hackers@freebsd.org Subject: Junior FS hacker task (more observations on nullfs filesystem) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG BOUWSMA Beery wrote: > This was tried under -current (and probably -stable too) > > Should a nullfs mount handle options the way that one would > expect from a normal filesystem mount? > > In particular, I have a read-only nullfs mount, but accesses > to that read-only filesystem result in the atime being updated > on the True Filesystem. > > Remounting the nullfs with `noatime' makes no difference -- > again accessing files in the read-only directories result in > updates of the Real Filesystem. > > Only by remounting the original fs with `noatime' do I get the > wanted result, with the drawback that not only are accesses via > the nullfs path, as desired, but all other accesses to the > original filesystem get ignored. Unfortunately, what you want is "a POSIX FS interface", and what you have is "a POSIX FS". In other words, it is the FS code, not the upper level code, that enforces the POSIX semantics. You could do it the other way around, and it would simplify some things, but make other more complex. Specifically, you would move the POSIX semantics that you could to the system call layer, and out of the FSs proper. This would simplify some of the FS code. But you would have to move it into any other VFS consumer as well... currently, this means the system call layer... and the NFS server code. A lot of people feel the NFS server code is hard to grok (it's actually not that complicated... in fact, it's uncomplicated to the point of being uninteresting, except that it is the only other VFS consumer, which _makes_ it interesting. In any case, you would need to move the semantics up, and then not propagate them down in the read-only mount case, but do propagate them down in the read/write mount case. It's not a lot of work, IMO, and would be good practice for any junior FS hacker. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message