Re: [PATCH 4/4] fs/unionfs/: Don't duplicate the struct nameidata

2007-01-29 Thread Josef Sipek
On Mon, Jan 29, 2007 at 03:37:43PM -0500, Josef 'Jeff' Sipek wrote: > Josef 'Jeff' Sipek (3): > fs/unionfs/: Remove stale_inode.c > fs/unionfs/: Andrew Morton's comments > fs/unionfs/: Don't duplicate the struct nameidata > > fs/unionfs/branchman.c |4 +- > fs/unionfs/comm

[PATCH 2/4] fs/unionfs/: possible cleanups

2007-01-29 Thread Josef 'Jeff' Sipek
From: Adrian Bunk <[EMAIL PROTECTED]> - unquoted This patch contains the following possible cleanups: - every function should #include the headers containing the prototypes of it's global functions - static functions in C files shouldn't be marked "inline", gcc should know best when to inline

[PATCH 4/4] fs/unionfs/: Don't duplicate the struct nameidata

2007-01-29 Thread Josef 'Jeff' Sipek
The only fields that we have to watch out for are the dentry and vfsmount. Additionally, this makes Unionfs gentler on the stack as nameidata is rather large. Signed-off-by: Josef 'Jeff' Sipek <[EMAIL PROTECTED]> --- fs/unionfs/inode.c | 22 -- 1 files changed, 16 insertions

[PATCH 1/4] fs/unionfs/: Remove stale_inode.c

2007-01-29 Thread Josef 'Jeff' Sipek
The stale inode operations were heavily based on bad inode operations. This patch removes stale_inode.c and converts all users of stale_inode_ops to bad_inode_ops as there seems to be no reason to return ESTALE instead of EIO. This is the more appropriate than porting the bad_inode.c fix (commit b

[PATCH 3/4] fs/unionfs/: Andrew Morton's comments

2007-01-29 Thread Josef 'Jeff' Sipek
- rename {,un}lock_dentry to unionfs_{,un}lock_dentry - few minor coding style fixes - removed prototypes from .c files - replaced dbstart macros etc with static inlines - replaced UNIONFS_D(d)->sem semaphore with a mutex - renamed sioq struct workqueue to superio_workqueue - made unionfs_get_nlink

[PATCH 4/4] fs/unionfs/: Don't duplicate the struct nameidata

2007-01-29 Thread Josef 'Jeff' Sipek
Josef 'Jeff' Sipek (3): fs/unionfs/: Remove stale_inode.c fs/unionfs/: Andrew Morton's comments fs/unionfs/: Don't duplicate the struct nameidata fs/unionfs/branchman.c |4 +- fs/unionfs/commonfops.c | 54 +++--- fs/unionfs/copyup.c | 67 +

[GIT PULL -mm] Unionfs updates/cleanups

2007-01-29 Thread Josef 'Jeff' Sipek
The following patches (also available though the git tree) address a number of code cleanliness issues with Unionfs. You can pull from 'master' branch of git://git.kernel.org/pub/scm/linux/kernel/git/jsipek/unionfs.git to receive the following: Adrian Bunk (1): fs/unionfs/: possible cleanu

[RFC] [PATCH 1/3] ufs2 write: mount as rw

2007-01-29 Thread Evgeniy Dushistov
These series of patches add UFS2 write-support. UFS2 - is default file system for recent versions of FreeBSD. The main differences from UFS1 from write support point of view are: 1)Not all inodes are allocated during formatation of disk. 2)All meta-data(pointer to data blocks) are 64bit(in UFS1 th

[RFC] [PATCH 2/3] ufs2 write: inodes write

2007-01-29 Thread Evgeniy Dushistov
This patch adds into write inode path function to write UFS2 inode, and modifys allocate inode path to allocate and init additional inode chunks. Also some cleanups: - remove not used parameters in some functions - remove i_gen field from ufs_inode_info structure, there is i_generation in inode st

Re: [patch 9/9] mm: fix pagecache write deadlocks

2007-01-29 Thread Nick Piggin
On Mon, Jan 29, 2007 at 11:33:03AM +0100, Nick Piggin wrote: > + } else { > + char *src, *dst; > + src = kmap(src_page); > + dst = kmap(page); > + memcpy(dst + offset, > + src + (

[patch 8/9] mm: generic_file_buffered_write iovec cleanup

2007-01-29 Thread Nick Piggin
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. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/mm/filemap.h ===

[patch 7/9] mm: cleanup pagecache insertion operations

2007-01-29 Thread Nick Piggin
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 p

[patch 9/9] mm: fix pagecache write deadlocks

2007-01-29 Thread Nick Piggin
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_u

[patch 5/9] mm: debug write deadlocks

2007-01-29 Thread Nick Piggin
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. Signed-off-by: Ni

[patch 6/9] mm: be sure to trim blocks

2007-01-29 Thread Nick Piggin
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. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.

[patch 3/9] mm: revert "generic_file_buffered_write(): deadlock on vectored write"

2007-01-29 Thread Nick Piggin
From: Andrew Morton <[EMAIL PROTECTED]> Revert 6527c2bdf1f833cc18e8f42bd97973d583e4aa83 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

[patch 4/9] mm: generic_file_buffered_write cleanup

2007-01-29 Thread Nick Piggin
From: Andrew Morton <[EMAIL PROTECTED]> Clean up buffered write code. Rename some variables and fix some types. Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/mm/filemap.c ==

[patch 2/9] mm: revert "generic_file_buffered_write(): handle zero length iovec segments"

2007-01-29 Thread Nick Piggin
From: Andrew Morton <[EMAIL PROTECTED]> Revert 81b0c8713385ce1b1b9058e916edcf9561ad76d6. This was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83, which we also revert. Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/mm/

[patch 1/9] fs: libfs buffered write leak fix

2007-01-29 Thread Nick Piggin
simple_prepare_write and nobh_prepare_write leak uninitialised kernel data. Fix the former, make a note of the latter. Several other filesystems seem to be iffy here, too. Signed-off-by: Nick Piggin <[EMAIL PROTECTED]> Index: linux-2.6/fs/libfs.c ==

[patch 0/9] buffered write deadlock fix

2007-01-29 Thread Nick Piggin
The following set of patches attempt to fix the buffered write locking problems (and there are a couple of peripheral patches and cleanups there too). Patches against 2.6.20-rc6. I was hoping that 2.6.20-rc6-mm2 would be an easier diff with the fsaio patches gone, but the readahead rewrite clashes