[patch 4/6] xip: support non-struct page backed memory

2008-01-17 Thread npiggin
Convert XIP to support non-struct page backed memory, using VM_MIXEDMAP for the user mappings. This requires the get_xip_page API to be changed to an address based one. Improve the API layering a little bit too, while we're here. (The kaddr->pfn conversion may not be quite right for all architect

[patch 36/41] jffs2 convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/jffs2/file.c | 105 +++- 1 file changed, 66 insertions(+), 39 deletions(-) Index: linux-2.6/fs/jffs2/file.c ==

[patch 22/41] adfs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/adfs/inode.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) Index: linux-2.6/fs/adfs/inode.c === --- linux-2.6.or

[patch 39/41] sysv convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/sysv/dir.c | 51 +++ fs/sysv/itree.c | 23 +++ 2 files changed, 50 insertions(+), 24 deletions(-) Index: linux-2.6/fs/sysv/itre

[patch 35/41] hostfs convert to new aops.

2007-05-25 Thread npiggin
This also gets rid of a lot of useless read_file stuff. And also optimises the full page write case by marking a !uptodate page uptodate. Cc: Jeff Dike <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hostfs/hostfs_kern.c | 70 +++

[patch 40/41] minix convert to new aops.

2007-05-25 Thread npiggin
Cc: Andries Brouwer <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/minix/dir.c | 50 -- fs/minix/inode.c | 23 +++ 2 files changed, 51 insertions(+), 22 deletions(-) Index: lin

[patch 24/41] hfsplus convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hfsplus/extents.c | 21 + fs/hfsplus/inode.c | 20 2 files changed, 21 insertions(+), 20 deletions(-) Index: linux-2.6/fs/hfsplus/inode.c

[patch 03/41] Revert 6527c2bdf1f833cc18e8f42bd97973d583e4aa83

2007-05-25 Thread npiggin
From: Andrew Morton <[EMAIL PROTECTED]> This patch fixed the following bug: When prefaulting in the pages in generic_file_buffered_write(), we only faulted in the pages for the firts segment of the iovec. If the second of successive segment described a mmapping of the page into which we're

[patch 23/41] hfs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hfs/extent.c | 19 --- fs/hfs/inode.c | 20 2 files changed, 20 insertions(+), 19 deletions(-) Index: linux-2.6/fs/hfs/inode.c

[patch 20/41] fs: new cont helpers

2007-05-25 Thread npiggin
Rework the generic block "cont" routines to handle the new aops. Supporting cont_prepare_write would take quite a lot of code to support, so remove it instead (and we later convert all filesystems to use it). write_begin gets passed AOP_FLAG_CONT_EXPAND when called from generic_cont_expand, so fil

[patch 05/41] mm: debug write deadlocks

2007-05-25 Thread npiggin
Allow CONFIG_DEBUG_VM to switch off the prefaulting logic, to simulate the difficult race where the page may be unmapped before calling copy_from_user. Makes the race much easier to hit. This is useful for demonstration and testing purposes, but is removed in a subsequent patch. Cc: Linux Memory

[patch 27/41] qnx4 convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/qnx4/inode.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) Index: linux-2.6/fs/qnx4/inode.c === --- linu

[patch 06/41] mm: trim more holes

2007-05-25 Thread npiggin
If prepare_write fails with AOP_TRUNCATED_PAGE, or if commit_write fails, then we may have failed the write operation despite prepare_write having instantiated blocks past i_size. Fix this, and consolidate the trimming into one place. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux File

[patch 21/41] fat convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/fat/inode.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) Index: linux-2.6/fs/fat/inode.c === ---

[patch 12/41] fs: introduce write_begin, write_end, and perform_write aops

2007-05-25 Thread npiggin
These are intended to replace prepare_write and commit_write with more flexible alternatives that are also able to avoid the buffered write deadlock problems efficiently (which prepare_write is unable to do). Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nic

[patch 02/41] Revert 81b0c8713385ce1b1b9058e916edcf9561ad76d6

2007-05-25 Thread npiggin
From: Andrew Morton <[EMAIL PROTECTED]> This was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83, which we also revert. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>

[patch 11/41] fs: fix data-loss on error

2007-05-25 Thread npiggin
New buffers against uptodate pages are simply be marked uptodate, while the buffer_new bit remains set. This causes error-case code to zero out parts of those buffers because it thinks they contain stale data: wrong, they are actually uptodate so this is a data loss situation. Fix this by actuall

[patch 28/41] reiserfs use generic write.

2007-05-25 Thread npiggin
From: Vladimir Saveliev <[EMAIL PROTECTED]> Make reiserfs to write via generic routines. Original reiserfs write optimized for big writes is deadlock rone Signed-off-by: Vladimir Saveliev <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> --- --- fs/reiserfs/file.c | 1240 --

[patch 09/41] mm: fix pagecache write deadlocks

2007-05-25 Thread npiggin
Modify the core write() code so that it won't take a pagefault while holding a lock on the pagecache page. There are a number of different deadlocks possible if we try to do such a thing: 1. generic_buffered_write 2. lock_page 3.prepare_write 4. unlock_page+vmtruncate 5. copy_from_

[patch 07/41] mm: buffered write cleanup

2007-05-25 Thread npiggin
Quite a bit of code is used in maintaining these "cached pages" that are probably pretty unlikely to get used. It would require a narrow race where the page is inserted concurrently while this process is allocating a page in order to create the spare page. Then a multi-page write into an uncached

[patch 10/41] mm: buffered write iterator

2007-05-25 Thread npiggin
Add an iterator data structure to operate over an iovec. Add usercopy operators needed by generic_file_buffered_write, and convert that function over. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> include/linux/fs.h | 33

[patch 31/41] With reiserfs no longer using the weird generic_cont_expand, remove it completely.

2007-05-25 Thread npiggin
Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> --- fs/buffer.c | 20 include/linux/buffer_head.h |1 - 2 files changed, 21 deletions(-) Index: linux-2.6/fs/buffer.c === --- linux-2.6.orig/f

[patch 25/41] hpfs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hpfs/file.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Index: linux-2.6/fs/hpfs/file.c === --- linux-2

[patch 29/41] reiserfs convert to new aops.

2007-05-25 Thread npiggin
From: Vladimir Saveliev <[EMAIL PROTECTED]> Convert reiserfs to new aops Signed-off-by: Vladimir Saveliev <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> --- --- fs/reiserfs/inode.c | 177 +--- fs/reiserfs/ioctl.c | 10 +- fs

[patch 33/41] smb convert to new aops.

2007-05-25 Thread npiggin
Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/smbfs/file.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) Index: linux-2.6/fs/smbfs/file.c === --- linux-2.6.ori

[patch 04/41] mm: clean up buffered write code

2007-05-25 Thread npiggin
From: Andrew Morton <[EMAIL PROTECTED]> Rename some variables and fix some types. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> mm/filemap.c | 35 ++

[patch 41/41] jfs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/jfs/inode.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) Index: linux-2.6/fs/jfs/inode.c ==

[patch 37/41] ufs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/ufs/dir.c | 56 +--- fs/ufs/inode.c | 23 +++ 2 files changed, 56 insertions(+), 23 deletions(-) Index: linux-2.6/fs/ufs/in

[patch 18/41] ext4 convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Convert ext4 to use write_begin()/write_end() methods. Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> fs/ext4/inode.c | 147 +++- 1 file changed, 93 insertions(+), 54 deletions(-) Index: linux

[patch 38/41] udf convert to new aops.

2007-05-25 Thread npiggin
Convert udf to new aops. Also seem to have fixed pagecache corruption in udf_adinicb_commit_write -- page was marked uptodate when it is not. Also, fixed the silly setup where prepare_write was doing a kmap to be used in commit_write: just do kmap_atomic in write_end. Use libfs helpers to make this

[patch 26/41] bfs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/bfs/file.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) Index: linux-2.6/fs/bfs/file.c === --- linux-2.6.orig/fs/

[patch 32/41] nfs convert to new aops.

2007-05-25 Thread npiggin
Cc: Linux Filesystems Acked-by: Trond Myklebust <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/nfs/file.c | 49 - 1 file changed, 36 insertions(+), 13 deletions(-) Index: linux-2.6/fs/nfs/file.c ===

[patch 15/41] block_dev convert to new aops.

2007-05-25 Thread npiggin
Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/block_dev.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) Index: linux-2.6/fs/block_dev.c === --- linux-2.6.orig/fs/block

[patch 17/41] ext3 convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Various fixes and improvements Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> fs/ext3/inode.c | 136 1 file changed, 88 insertions(+), 48 d

[patch 34/41] fuse convert to new aops.

2007-05-25 Thread npiggin
[mszeredi] - don't send zero length write requests - it is not legal for the filesystem to return with zero written bytes Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> fs/fuse/file.c | 48 +--- 1 f

[patch 14/41] implement simple fs aops

2007-05-25 Thread npiggin
Implement new aops for some of the simpler filesystems. Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/configfs/inode.c |4 ++-- fs/hugetlbfs/inode.c | 16 ++-- fs/ramfs/file-mmu.c |4 ++-- fs/ramfs/file-nommu.c |4 ++-- fs/sysfs/inode.c

[patch 16/41] ext2 convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/ext2/dir.c | 56 ++-- fs/ext2/ext2.h |3 +++ fs/ext2/inode.c | 24 +--- 3 files changed, 54 insertions(+), 29 deletions

[patch 30/41] reiserfs use generic_cont_expand_simple

2007-05-25 Thread npiggin
From: Vladimir Saveliev <[EMAIL PROTECTED]> This patch makes reiserfs to use AOP_FLAG_CONT_EXPAND in order to get rid of the special generic_cont_expand routine Signed-off-by: Vladimir Saveliev <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> --- --- fs/reiserfs/inode.c | 1

[patch 08/41] mm: write iovec cleanup

2007-05-25 Thread npiggin
Hide some of the open-coded nr_segs tests into the iovec helpers. This is all to simplify generic_file_buffered_write, because that gets more complex in the next patch. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> mm/filem

[patch 19/41] xfs convert to new aops.

2007-05-25 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/xfs/linux-2.6/xfs_aops.c | 19 --- fs/xfs/linux-2.6/xfs_lrw.c | 35 --- 2 files changed, 24 insertions(+), 30 deletions(-) Index: linux-2.6/fs/xfs/l

[patch 13/41] mm: restore KERNEL_DS optimisations

2007-05-25 Thread npiggin
Restore the KERNEL_DS optimisation, especially helpful to the 2copy write path. This may be a pretty questionable gain in most cases, especially after the legacy 2copy write path is removed, but it doesn't cost much. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-of

[patch 01/41] mm: revert KERNEL_DS buffered write optimisation

2007-05-25 Thread npiggin
Revert the patch from Neil Brown to optimise NFSD writev handling. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Cc: Neil Brown <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> mm/filemap.c | 32 +--- 1 file changed, 13 in

[patch 00/41] Buffered write deadlock fix and new aops for 2.6.22-rc2-mm1

2007-05-25 Thread npiggin
Hi, This is a resync of the new aops patches to 2.6.22-rc2-mm1 Only one more conversion broken this time, so we're doing OK. AFFS compile is broken due to cont_prepare_write disappearing, and me not bringing the conversion patch uptodate (which I won't do again until something happens with this p

[patch 39/41] sysv convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/sysv/dir.c | 45 + fs/sysv/itree.c | 23 +++ 2 files changed, 44 insertions(+), 24 deletions(-) Index: linux-2.6/fs/sysv/itree.c ==

[patch 23/41] adfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/adfs/inode.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) Index: linux-2.6/fs/adfs/inode.c === --- linux-2.6.or

[patch 36/41] jffs2 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/jffs2/file.c | 105 +++- 1 file changed, 66 insertions(+), 39 deletions(-) Index: linux-2.6/fs/jffs2/file.c ==

[patch 31/41] nfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/nfs/file.c | 49 - 1 file changed, 36 insertions(+), 13 deletions(-) Index: linux-2.6/fs/nfs/file.c ===

[patch 22/41] fat convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/fat/inode.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) Index: linux-2.6/fs/fat/inode.c === ---

[patch 21/41] fs: new cont helpers

2007-05-14 Thread npiggin
Rework the generic block "cont" routines to handle the new aops. Supporting cont_prepare_write would take quite a lot of code to support, so remove it instead (and we later convert all filesystems to use it). write_begin gets passed AOP_FLAG_CONT_EXPAND when called from generic_cont_expand, so fil

[patch 25/41] hfsplus convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hfsplus/extents.c | 21 + fs/hfsplus/inode.c | 20 2 files changed, 21 insertions(+), 20 deletions(-) Index: linux-2.6/fs/hfsplus/inode.c

[patch 24/41] hfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hfs/extent.c | 19 --- fs/hfs/inode.c | 20 2 files changed, 20 insertions(+), 19 deletions(-) Index: linux-2.6/fs/hfs/inode.c

[patch 35/41] hostfs convert to new aops.

2007-05-14 Thread npiggin
This also gets rid of a lot of useless read_file stuff. And also optimises the full page write case by marking a !uptodate page uptodate. Cc: Jeff Dike <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hostfs/hostfs_kern.c | 70 +++

[patch 27/41] bfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/bfs/file.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) Index: linux-2.6/fs/bfs/file.c === --- linux-2.6.orig/fs/

[patch 29/41] reiserfs use generic write.

2007-05-14 Thread npiggin
From: Vladimir Saveliev <[EMAIL PROTECTED]> Make reiserfs to write via generic routines. Original reiserfs write optimized for big writes is deadlock rone Signed-off-by: Vladimir Saveliev <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> --- Index: linux-2.6/fs/reiserfs/file.c =

[patch 41/41] jfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/jfs/inode.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) Index: linux-2.6/fs/jfs/inode.c ==

[patch 38/41] udf convert to new aops.

2007-05-14 Thread npiggin
Convert udf to new aops. Also seem to have fixed pagecache corruption in udf_adinicb_commit_write -- page was marked uptodate when it is not. Also, fixed the silly setup where prepare_write was doing a kmap to be used in commit_write: just do kmap_atomic in write_end. Use libfs helpers to make this

[patch 12/41] fs: introduce write_begin, write_end, and perform_write aops

2007-05-14 Thread npiggin
These are intended to replace prepare_write and commit_write with more flexible alternatives that are also able to avoid the buffered write deadlock problems efficiently (which prepare_write is unable to do). Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nic

[patch 40/41] minix convert to new aops.

2007-05-14 Thread npiggin
Cc: Andries Brouwer <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/minix/dir.c | 43 +-- fs/minix/inode.c | 23 +++ 2 files changed, 44 insertions(+), 22 deletions(-) Index: linux-2.6/

[patch 28/41] qnx4 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/qnx4/inode.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) Index: linux-2.6/fs/qnx4/inode.c === --- linu

[patch 30/41] reiserfs convert to new aops.

2007-05-14 Thread npiggin
From: Vladimir Saveliev <[EMAIL PROTECTED]> [EMAIL PROTECTED]: can't quite get rid of prepare_write/commit_write callbacks yet! (xattrs and ioctl uses them), but this is a good start] Signed-off-by: Vladimir Saveliev <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> --- Index:

[patch 33/41] GFS2 convert to new aops.

2007-05-14 Thread npiggin
From: Steven Whitehouse <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]> fs/gfs2/ops_address.c | 209 +- 1 file changed, 125 insertions(+), 84 deletions(-) Index: linux-2.6/fs/gfs2/ops_address.c

[patch 37/41] ufs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/ufs/dir.c | 50 +++--- fs/ufs/inode.c | 23 +++ 2 files changed, 50 insertions(+), 23 deletions(-) Index: linux-2.6/fs/ufs/inode.c

[patch 10/41] mm: buffered write iterator

2007-05-14 Thread npiggin
Add an iterator data structure to operate over an iovec. Add usercopy operators needed by generic_file_buffered_write, and convert that function over. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> include/linux/fs.h | 33

[patch 32/41] smb convert to new aops.

2007-05-14 Thread npiggin
Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/smbfs/file.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) Index: linux-2.6/fs/smbfs/file.c === --- linux-2.6.ori

[patch 34/41] fuse convert to new aops.

2007-05-14 Thread npiggin
[mszeredi] - don't send zero length write requests - it is not legal for the filesystem to return with zero written bytes Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]> fs/fuse/file.c | 48 +--- 1 f

[patch 19/41] ext4 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Convert ext4 to use write_begin()/write_end() methods. Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> fs/ext4/inode.c | 147 +++- 1 file changed, 93 insertions(+), 54 deletions(-) Index: linux

[patch 18/41] ext3 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Various fixes and improvements Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]> fs/ext3/inode.c | 136 1 file changed, 88 insertions(+), 48 d

[patch 16/41] rd convert to new aops.

2007-05-14 Thread npiggin
Also clean up various little things. I've got rid of the comment from akpm, because now that make_page_uptodate is only called from 2 places, it is pretty easy to see that the buffers are in an uptodate state at the time of the call. Actually, it was OK before my patch as well, because the memset

[patch 08/41] mm: write iovec cleanup

2007-05-14 Thread npiggin
Hide some of the open-coded nr_segs tests into the iovec helpers. This is all to simplify generic_file_buffered_write, because that gets more complex in the next patch. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> mm/filem

[patch 20/41] xfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/xfs/linux-2.6/xfs_aops.c | 19 --- fs/xfs/linux-2.6/xfs_lrw.c | 35 --- 2 files changed, 24 insertions(+), 30 deletions(-) Index: linux-2.6/fs/xfs/l

[patch 14/41] implement simple fs aops

2007-05-14 Thread npiggin
Implement new aops for some of the simpler filesystems. Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/configfs/inode.c |4 ++-- fs/hugetlbfs/inode.c | 16 ++-- fs/ramfs/file-mmu.c |4 ++-- fs/ramfs/file-nommu.c |4 ++-- fs/sysfs/inode.c

[patch 26/41] hpfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/hpfs/file.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Index: linux-2.6/fs/hpfs/file.c === --- linux-2

[patch 17/41] ext2 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/ext2/dir.c | 47 +-- fs/ext2/ext2.h |3 +++ fs/ext2/inode.c | 24 +--- 3 files changed, 45 insertions(+), 29 deletions(-) Inde

[patch 07/41] mm: buffered write cleanup

2007-05-14 Thread npiggin
Quite a bit of code is used in maintaining these "cached pages" that are probably pretty unlikely to get used. It would require a narrow race where the page is inserted concurrently while this process is allocating a page in order to create the spare page. Then a multi-page write into an uncached

[patch 13/41] mm: restore KERNEL_DS optimisations

2007-05-14 Thread npiggin
Restore the KERNEL_DS optimisation, especially helpful to the 2copy write path. This may be a pretty questionable gain in most cases, especially after the legacy 2copy write path is removed, but it doesn't cost much. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-of

[patch 15/41] block_dev convert to new aops.

2007-05-14 Thread npiggin
Cc: Linux Filesystems Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> fs/block_dev.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) Index: linux-2.6/fs/block_dev.c === --- linux-2.6.orig/fs/block

[patch 09/41] mm: fix pagecache write deadlocks

2007-05-14 Thread npiggin
Modify the core write() code so that it won't take a pagefault while holding a lock on the pagecache page. There are a number of different deadlocks possible if we try to do such a thing: 1. generic_buffered_write 2. lock_page 3.prepare_write 4. unlock_page+vmtruncate 5. copy_from_

[patch 03/41] Revert 6527c2bdf1f833cc18e8f42bd97973d583e4aa83

2007-05-14 Thread npiggin
From: Andrew Morton <[EMAIL PROTECTED]> This patch fixed the following bug: When prefaulting in the pages in generic_file_buffered_write(), we only faulted in the pages for the firts segment of the iovec. If the second of successive segment described a mmapping of the page into which we're

[patch 04/41] mm: clean up buffered write code

2007-05-14 Thread npiggin
From: Andrew Morton <[EMAIL PROTECTED]> Rename some variables and fix some types. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> mm/filemap.c | 35 ++

[patch 11/41] fs: fix data-loss on error

2007-05-14 Thread npiggin
New buffers against uptodate pages are simply be marked uptodate, while the buffer_new bit remains set. This causes error-case code to zero out parts of those buffers because it thinks they contain stale data: wrong, they are actually uptodate so this is a data loss situation. Fix this by actuall

[patch 06/41] mm: trim more holes

2007-05-14 Thread npiggin
If prepare_write fails with AOP_TRUNCATED_PAGE, or if commit_write fails, then we may have failed the write operation despite prepare_write having instantiated blocks past i_size. Fix this, and consolidate the trimming into one place. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux File

[patch 01/41] mm: revert KERNEL_DS buffered write optimisation

2007-05-14 Thread npiggin
Revert the patch from Neil Brown to optimise NFSD writev handling. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Cc: Neil Brown <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> mm/filemap.c | 32 +--- 1 file changed, 13 in

[patch 05/41] mm: debug write deadlocks

2007-05-14 Thread npiggin
Allow CONFIG_DEBUG_VM to switch off the prefaulting logic, to simulate the difficult race where the page may be unmapped before calling copy_from_user. Makes the race much easier to hit. This is useful for demonstration and testing purposes, but is removed in a subsequent patch. Cc: Linux Memory

[patch 02/41] Revert 81b0c8713385ce1b1b9058e916edcf9561ad76d6

2007-05-14 Thread npiggin
From: Andrew Morton <[EMAIL PROTECTED]> This was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83, which we also revert. Cc: Linux Memory Management <[EMAIL PROTECTED]> Cc: Linux Filesystems Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>

[patch 00/41] Buffered write deadlock fix and new aops for 2.6.21-mm2

2007-05-14 Thread npiggin
-- Here is an update against 2.6.21-mm2. Unfortunately UML broke for me, so test coverage isn't so good as the last time I posted the series. Also, several filesystems had significant clashes. Considering the amount of time it took to get them working, I won't fix them again. They aren't _broken_