From owner-freebsd-fs Mon Dec 23 13:31:14 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAC7B37B401 for ; Mon, 23 Dec 2002 13:31:12 -0800 (PST) Received: from callisto.acsu.buffalo.edu (callisto.acsu.buffalo.edu [128.205.7.122]) by mx1.FreeBSD.org (Postfix) with SMTP id 26A3B43EF2 for ; Mon, 23 Dec 2002 13:31:12 -0800 (PST) (envelope-from asthana@buffalo.edu) Received: (qmail 22822 invoked by uid 87418); 23 Dec 2002 21:31:11 -0000 Date: Mon, 23 Dec 2002 16:31:11 -0500 (EST) From: Somil Asthana X-Sender: asthana@callisto.acsu.buffalo.edu To: freebsd-fs@freebsd.org Subject: Stackable FileSystem. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@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-fs" in the body of the message