aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
authorMichael Halcrow <mhalcrow@us.ibm.com>2007-10-16 04:28:07 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:12 -0400
commitda0102a10aed2244d8fc34f289e81e502622b81e (patch)
treea3c939a25b12efb94c3fd36f98d65708ae09b964 /fs/ecryptfs/ecryptfs_kernel.h
parentcf81f89d9a85b1825d8c8cf1f8f0e2c98cc72823 (diff)
eCryptfs: read_write.c routines
Add a set of functions through which all I/O to lower files is consolidated. This patch adds a new inode_info reference to a persistent lower file for each eCryptfs inode; another patch later in this series will set that up. This persistent lower file is what the read_write.c functions use to call vfs_read() and vfs_write() on the lower filesystem, so even when reads and writes come in through aops->readpage and aops->writepage, we can satisfy them without resorting to direct access to the lower inode's address space. Several function declarations are going to be changing with this patchset. For now, in order to keep from breaking the build, I am putting dummy parameters in for those functions. Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index a618ab77642d..e6a68a87b5df 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -260,6 +260,8 @@ struct ecryptfs_crypt_stat {
260struct ecryptfs_inode_info { 260struct ecryptfs_inode_info {
261 struct inode vfs_inode; 261 struct inode vfs_inode;
262 struct inode *wii_inode; 262 struct inode *wii_inode;
263 struct file *lower_file;
264 struct mutex lower_file_mutex;
263 struct ecryptfs_crypt_stat crypt_stat; 265 struct ecryptfs_crypt_stat crypt_stat;
264}; 266};
265 267
@@ -653,5 +655,21 @@ int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key,
653 char *sig); 655 char *sig);
654int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, 656int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start,
655 int num_zeros); 657 int num_zeros);
658int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
659 loff_t offset, size_t size);
660int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode,
661 struct page *page_for_lower,
662 size_t offset_in_page, size_t size);
663int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
664 size_t size);
665int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
666 struct inode *ecryptfs_inode);
667int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
668 pgoff_t page_index,
669 size_t offset_in_page, size_t size,
670 struct inode *ecryptfs_inode);
671int ecryptfs_read(char *data, loff_t offset, size_t size,
672 struct file *ecryptfs_file);
673struct page *ecryptfs_get1page(struct file *file, loff_t index);
656 674
657#endif /* #ifndef ECRYPTFS_KERNEL_H */ 675#endif /* #ifndef ECRYPTFS_KERNEL_H */