Skip to content

eCryptfs: Introduce persistent lower files for each eCryptfs inode

Michael Halcrow linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11eCryptfs: Remove header_extent_sizefs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/inode.c +1 more+52 -360 replies
2/11eCryptfs: Remove assignments in if-statementsfs/ecryptfs/crypto.c fs/ecryptfs/file.c fs/ecryptfs/inode.c +4 more+89 -640 replies
3/11eCryptfs: read_write.c routinesfs/ecryptfs/Makefile fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/mmap.c +1 more+379 -26 replies
4/11eCryptfs: Replace encrypt, decrypt, and inode size writefs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/inode.c +2 more+290 -3063 replies
5/11eCryptfs: Set up and destroy persistent lower filefs/ecryptfs/inode.c fs/ecryptfs/main.c fs/ecryptfs/super.c+103 -70 replies
6/11eCryptfs: Update metadata read/write functionsfs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/file.c +2 more+113 -1332 replies
7/11eCryptfs: Make open, truncate, and setattr use persistent filefs/ecryptfs/crypto.c fs/ecryptfs/file.c fs/ecryptfs/inode.c+44 -1210 replies
8/11eCryptfs: Convert mmap functions to use persistent filefs/ecryptfs/mmap.c+103 -962 replies
9/11eCryptfs: Initialize persistent lower file on inode createfs/ecryptfs/super.c+7 -60 replies
10/11eCryptfs: Remove unused functions and kmem_cachefs/ecryptfs/crypto.c fs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/file.c +2 more+1 -5390 replies
11/11eCryptfs: Replace magic numbersfs/ecryptfs/crypto.c+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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 accomplish this, eCryptfs needs a way to call vfs_read() and vfs_write() on the lower file when ecryptfs_aops->readpage() and ecryptfs_aops->writepage() are called. I propose keeping a persistent lower file around for each eCryptfs inode. This is the only lower file that eCryptfs will open for any given eCryptfs inode; multiple eCryptfs files may map to this one persistent lower file. When the eCrypfs inode is destroyed, this persistent lower file is closed.

Consolidating all reads and writes to the lower file to a single execution path simplifies the code. This should also make it easier to port eCryptfs to use the asynchronous crypto API functions. Note that this patch set also removes all direct calls to lower prepare_write() and commite_write(), fixing an oops when mounted on NFS.

Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/