From owner-freebsd-questions Tue Dec 24 6:52:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3872F37B401 for ; Tue, 24 Dec 2002 06:52:35 -0800 (PST) Received: from pollux.cse.buffalo.edu (pollux.cse.Buffalo.EDU [128.205.35.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CB5843EC2 for ; Tue, 24 Dec 2002 06:52:34 -0800 (PST) (envelope-from asthana@cse.Buffalo.EDU) Received: (from asthana@localhost) by pollux.cse.buffalo.edu (8.11.6+Sun/8.10.1) id gBOEqSW04948; Tue, 24 Dec 2002 09:52:28 -0500 (EST) Date: Tue, 24 Dec 2002 09:52:28 -0500 (EST) From: Somil Asthana To: Subject: Stackable File System Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi All: I am trying to develop a simple encrypted stackable file system. Instead of making a new stackable file system I modified nullfs code itself. I added null_read() and null_write() functions. null_read() internally calls VOP_READ() and null_write() calls VOP_WRITE() (it bypass control to lower vnode vectors VOPS). The code of null_write() function is such that before calling VOP_WRITE() it increments each character pointed by uio_iov->iov_base[i] by 1 and null_read() does the opposite ie it decrement each character pointed by uio_iov->iov_base[i] by 1 after calling VOP_READ. So for example if I open a file and store "ABCDE" it actually gets stored as "BCDEF" but when I read it back using cat program or read system call I get "BCDEF" not "ABCDE".I can see the code is going to null_read() and uio_iov->iov_base[i] is actually printing "ABCDE" on console. Whats surprising is that user space cat or read system call are not giving the correct output or I should say that modified uio structure is not reflected in user space. I am mounting using this command sudo mount -t null /mnt/ /TMP/ So in /TMP dir has a nullfs is on top of ufs Am I missing something here ? I can see that the control is actually going to null_read and null_write and I have tested that nullfs is on top of ufs in /TMP directory. thank you Somil To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message