linux/fs/ecryptfs
Li Wang e4bc6522d5 eCryptfs: Avoid unnecessary disk read and data decryption during writing
ecryptfs_write_begin grabs a page from page cache for writing.
If the page contains invalid data, or data older than the
counterpart on the disk, eCryptfs will read out the
corresponing data from the disk into the page, decrypt them,
then perform writing. However, for this page, if the length
of the data to be written into is equal to page size,
that means the whole page of data will be overwritten,
in which case, it does not matter whatever the data were before,
it is beneficial to perform writing directly rather than bothering
to read and decrypt first.

With this optimization, according to our test on a machine with
Intel Core 2 Duo processor, iozone 'write' operation on an existing
file with write size being multiple of page size will enjoy a steady
3x speedup.

Signed-off-by: Li Wang <wangli@kylinos.com.cn>
Signed-off-by: Yunchuan Wen <wenyunchuan@kylinos.com.cn>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
2012-11-07 17:56:16 -08:00
..
crypto.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
debug.c eCryptfs: update comment and debug statement 2007-10-16 09:43:11 -07:00
dentry.c stop passing nameidata * to ->d_revalidate() 2012-07-14 16:34:14 +04:00
ecryptfs_kernel.h - Fixes a bug when the lower filesystem mount options include 'acl', but the 2012-08-02 10:56:34 -07:00
file.c eCryptfs: Call lower ->flush() from ecryptfs_flush() 2012-09-14 09:35:54 -07:00
inode.c eCryptfs: Copy up attributes of the lower target inode after rename 2012-09-14 09:36:03 -07:00
Kconfig eCryptfs: fix compile error 2011-08-09 13:42:46 -05:00
keystore.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
kthread.c switch dentry_open() to struct path, make it grab references itself 2012-07-23 00:01:29 +04:00
main.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-10-02 20:25:04 -07:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c userns: Convert ecryptfs to use kuid/kgid where appropriate 2012-09-21 03:13:09 -07:00
miscdev.c eCryptfs: Make all miscdev functions use daemon ptr in file private_data 2012-07-08 12:51:44 -05:00
mmap.c eCryptfs: Avoid unnecessary disk read and data decryption during writing 2012-11-07 17:56:16 -08:00
read_write.c ecryptfs: remove the second argument of k[un]map_atomic() 2012-02-16 16:06:27 -06:00
super.c vfs: Rename end_writeback() to clear_inode() 2012-05-06 13:43:41 +08:00