Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-25 Thread Michael Halcrow
(), and ecryptfs_copy_up_encrypted_with_header() should have the responsibility of managing the page Uptodate status. This patch gets rid of some of the ugliness that resulted from trying to push some of the page flag setting too far down the stack. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- diff --git a/fs/ecryptfs/crypto.c b/fs

Re: [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-24 Thread Michael Halcrow
and perhaps the whole fs for this easy-to-do, hard-to-find bug. Update data types and add casts in order to avoid potential overflow issues. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 5d27cf9..4bf1a95 100644 --- a/fs/ecryptfs/crypto.c

Re: [PATCH 6/11] eCryptfs: Update metadata read/write functions

2007-09-24 Thread Michael Halcrow
On Wed, Sep 19, 2007 at 10:48:17PM -0700, Andrew Morton wrote: On Mon, 17 Sep 2007 16:48:44 -0500 Michael Halcrow [EMAIL PROTECTED] wrote: + if ((rc = ecryptfs_write_lower(ecryptfs_dentry-d_inode, checkpatch missed the assignment-in-an-if here. Fix an assignment-in-an-if. Signed

Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-21 Thread Michael Halcrow
://lkml.org/lkml/2007/9/15/55 In order to avoid this possibility, eCryptfs must allocate an intermediate block of memory to use with vfs_read() and vfs_write(), copying the data through this memory region, since kmap_atomic() cannot be held during calls which may block. Signed-off-by: Michael Halcrow

Re: [PATCH 4/11] eCryptfs: Replace encrypt, decrypt, and inode size write

2007-09-20 Thread Michael Halcrow
On Wed, Sep 19, 2007 at 10:46:26PM -0700, Andrew Morton wrote: (from ecryptfs_encrypt_page()): + enc_extent_virt = kmalloc(PAGE_CACHE_SIZE, GFP_USER); I'd have thought that alloc_page() would be nicer. After all, we _are_ treating it as a page, and not as a random piece of memry. +

Re: [PATCH 8/11] eCryptfs: Convert mmap functions to use persistent file

2007-09-20 Thread Michael Halcrow
On Wed, Sep 19, 2007 at 10:50:57PM -0700, Andrew Morton wrote: On Mon, 17 Sep 2007 16:50:16 -0500 Michael Halcrow [EMAIL PROTECTED] wrote: +ecryptfs_copy_up_encrypted_with_header(struct page *page, + struct ecryptfs_crypt_stat *crypt_stat

[PATCH 0/11] eCryptfs: Introduce persistent lower files for each eCryptfs inode

2007-09-17 Thread Michael Halcrow
Currently, eCryptfs directly accesses the lower inode address space, doing things like grab_cache_page() on lower_inode-i_mapping. It really should not do that. The main point of this patch set is to make all I/O with the lower files go through vfs_read() and vfs_write() instead. In order to

[PATCH 1/11] eCryptfs: Remove header_extent_size

2007-09-17 Thread Michael Halcrow
There is no point to keeping a separate header_extent_size and an extent_size. The total size of the header can always be represented as some multiple of the regular data extent size. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c | 40

[PATCH 2/11] eCryptfs: Remove assignments in if-statements

2007-09-17 Thread Michael Halcrow
Remove assignments in if-statements. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c| 17 -- fs/ecryptfs/file.c |8 -- fs/ecryptfs/inode.c | 35 ++ fs/ecryptfs/keystore.c | 55

[PATCH 3/11] eCryptfs: read_write.c routines

2007-09-17 Thread Michael Halcrow
. For now, in order to keep from breaking the build, I am putting dummy parameters in for those functions. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/Makefile |2 +- fs/ecryptfs/ecryptfs_kernel.h | 18 ++ fs/ecryptfs/mmap.c|2 +- fs/ecryptfs

[PATCH 4/11] eCryptfs: Replace encrypt, decrypt, and inode size write

2007-09-17 Thread Michael Halcrow
Replace page encryption and decryption routines and inode size write routine with versions that utilize the read_write.c functions. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c | 427 ++-- fs/ecryptfs/ecryptfs_kernel.h

[PATCH 5/11] eCryptfs: Set up and destroy persistent lower file

2007-09-17 Thread Michael Halcrow
This patch sets up and destroys the persistent lower file for each eCryptfs inode. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/inode.c | 23 +++--- fs/ecryptfs/main.c | 65 +++ fs/ecryptfs/super.c | 22

[PATCH 6/11] eCryptfs: Update metadata read/write functions

2007-09-17 Thread Michael Halcrow
the eCryptfs getxattr. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c | 126 +++-- fs/ecryptfs/ecryptfs_kernel.h | 15 +++-- fs/ecryptfs/file.c|2 +- fs/ecryptfs/inode.c | 101

[PATCH 7/11] eCryptfs: Make open, truncate, and setattr use persistent file

2007-09-17 Thread Michael Halcrow
. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c |2 +- fs/ecryptfs/file.c | 50 -- fs/ecryptfs/inode.c | 113 +++--- 3 files changed, 44 insertions(+), 121 deletions(-) diff --git a/fs/ecryptfs

[PATCH 8/11] eCryptfs: Convert mmap functions to use persistent file

2007-09-17 Thread Michael Halcrow
Convert readpage, prepare_write, and commit_write to use read_write.c routines. Remove sync_page; I cannot think of a good reason for implementing that in eCryptfs. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/mmap.c | 199

[PATCH 9/11] eCryptfs: Initialize persistent lower file on inode create

2007-09-17 Thread Michael Halcrow
Initialize persistent lower file on inode create. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/super.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index b97e210..f8cdab2 100644 --- a/fs

[PATCH 10/11] eCryptfs: Remove unused functions and kmem_cache

2007-09-17 Thread Michael Halcrow
The switch to read_write.c routines and the persistent file make a number of functions unnecessary. This patch removes them. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c | 150 -- fs/ecryptfs/ecryptfs_kernel.h | 21 +--- fs/ecryptfs/file.c

[PATCH 11/11] eCryptfs: Replace magic numbers

2007-09-17 Thread Michael Halcrow
Replace some magic numbers with sizeof() equivalents. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] --- fs/ecryptfs/crypto.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 3b3cf27..425a144 100644 --- a/fs

[PATCH] eCryptfs: Delay writing 0's after llseek until write

2007-05-21 Thread Michael Halcrow
Delay writing 0's out in eCryptfs after a seek past the end of the file until data is actually written. Signed-off-by: Michael Halcrow [EMAIL PROTECTED] diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 9881b5c..59288d8 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c

Re: [PATCH 01/24] Unionfs: Documentation

2007-01-08 Thread Michael Halcrow
On Mon, Jan 08, 2007 at 03:51:31PM -0500, Erez Zadok wrote: BTW, this is a problem with all stackable file systems, including ecryptfs. To be fair, our Unionfs users have come up against this problem, usually for the first time they use Unionfs :-). I suspect that the only reason why this has