Re: [PATCH] [-mm] FS: file name must be unique in the same dir in procfs

2007-09-10 Thread Zhang Rui
On Mon, 2007-09-10 at 15:49 +0800, Andrew Morton wrote: > On Mon, 20 Aug 2007 23:50:05 +0800 Zhang Rui <[EMAIL PROTECTED]> > wrote: > > > Hi, Oliver, > > Thanks for your comments, > > > > On Mon, 2007-08-20 at 18:45 +0800, Oliver Neukum wrote: > > > Am Montag 20 August 2007 schrieb Zhang Rui: > >

[29/41] Fix up reclaim counters

2007-09-10 Thread Christoph Lameter
Compound pages of an arbitrary order may now be on the LRU and may be reclaimed. Adjust the counting in vmscan.c to could the number of base pages. Also change the active and inactive accounting to do the same. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- include/linux/mm_inline.h |

[18/41] Use page_cache_xxx in fs/reiserfs

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/reiserfs Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/reiserfs/file.c| 71 +++-- fs/reiserfs/inode.c | 33 +++--- fs/reiserfs/ioctl.c |2 +- fs/reiserfs/stree.c

[11/41] Use page_cache_xxx in fs/buffer.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/buffer.c. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/buffer.c | 110 +--- 1 file changed, 62 insertions(+), 48 deletions(-) Index: linux-2.6/fs/buffer.c

[28/41] Futex: Fix PAGE SIZE assumption

2007-09-10 Thread Christoph Lameter
Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- kernel/futex.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6/kernel/futex.c === --- linux-2.6.orig/kernel/futex.c 2007-09-05 01:19:50.00

[22/41] compound pages: Add new support functions

2007-09-10 Thread Christoph Lameter
compound_pages(page)-> Determines base pages of a compound page compound_shift(page)-> Determine the page shift of a compound page compound_size(page) -> Determine the size of a compound page Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- include/linux/mm.h | 15

[34/41] Large blocksize support for XFS

2007-09-10 Thread Christoph Lameter
The only change needed to enable Large Block I/O in XFS is to remove the check for a too large blocksize ;-) Signed-off-by: Dave Chinner <[EMAIL PROTECTED]> Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/xfs/xfs_mount.c | 13 - 1 files changed, 0 insertions(+), 13 delet

[31/41] Large Blocksize: Core piece

2007-09-10 Thread Christoph Lameter
Provide an alternate definition for the page_cache_xxx(mapping, ...) functions that can determine the current page size from the mapping and generate the appropriate shifts, sizes and mask for the page cache operations. Add alternate definitions for the page_cache_page_xx(page, ...) function as wel

[37/41] ext2: fix rec_len overflow for 64KB block size

2007-09-10 Thread Christoph Lameter
[2/4] ext2: fix rec_len overflow - prevent rec_len from overflow with 64KB blocksize Signed-off-by: Takashi Sato <[EMAIL PROTECTED]> Signed-off-by: Mingming Cao <[EMAIL PROTECTED]> Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/ext2/dir.c | 46 +

[41/41] Mmap support using pte PAGE_SIZE mappings

2007-09-10 Thread Christoph Lameter
This is realized by mmapping base page size (4k on x86) of the potentially larger page. Mmap semantics are not changed and therefore the large buffers can be handled by userspace as if files consisted of 4k pages (as it is now). The use of large buffersizes can therefore be fully transparent to use

[04/41] Use page_cache_xxx in mm/page-writeback.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/page-writeback.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/page-writeback.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 63512a9..ebe76e3 100644 --- a/mm/page-writeback.c ++

[27/41] Large page order operations, zeroing and flushing

2007-09-10 Thread Christoph Lameter
We may have to zero and flush higher order pages. Implement clear_mapping_page and flush_mapping_page to do that job. Replace the flushing and clearing at some key locations for the pagecache. In some places it is necesssary to determine the page order in use from the page struct since no mapping

[32/41] Readahead changes to support large blocksize.

2007-09-10 Thread Christoph Lameter
Fix up readhead for large I/O operations. Only calculate the readahead until the 2M boundary then fall back to one page. Signed-off-by: Fengguang Wu <[EMAIL PROTECTED]> Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> === --- i

[26/41] compound pages: Allow freeing of compound pages via pagevec

2007-09-10 Thread Christoph Lameter
Allow the freeing of compound pages via pagevec. In release_pages() we currently special case for compound pages in order to be sure to always decrement the page count of the head page and not the tail page. However that redirection to the head page is only necessary for tail pages. So we can actu

[35/41] Reiserfs: Fix up mapping_set_gfp_mask()

2007-09-10 Thread Christoph Lameter
mapping_set_gfp_mask only works on order 0 page cache operations. Reiserfs can use 8k pages (order 1). Replace the mapping_set_gfp_mask with mapping_setup to make this work properly. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/reiserfs/xattr.c |3 ++- 1 files changed, 2 insert

[38/41] ext3: fix rec_len overflow with 64KB block size

2007-09-10 Thread Christoph Lameter
[3/4] ext3: fix rec_len overflow - prevent rec_len from overflow with 64KB blocksize Signed-off-by: Takashi Sato <[EMAIL PROTECTED]> Signed-off-by: Mingming Cao <[EMAIL PROTECTED]> Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/ext3/dir.c | 13 +-- fs/ext3/

[40/41] Do not use f_mapping in simple_prepare_write()

2007-09-10 Thread Christoph Lameter
Seems that simple_prepare_write() may occasionally be called for a page that does not have a mapping yet. Retrieve the page size from the page instead of the mapping. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/libfs.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[36/41] 64k block size support for Ext2/3/4

2007-09-10 Thread Christoph Lameter
The next 4 patches support large block size (up to PAGESIZE, max 64KB) for ext2/3/4, originally from Takashi Sato. http://marc.info/?l=linux-ext4&m=115768873518400&w=2 It's quite simple to support large block size in ext2/3/4, mostly just enlarge the block size limit. But it is NOT possible to ha

[39/41] ext4: fix rec_len overflow for 64KB block size

2007-09-10 Thread Christoph Lameter
[4/4] ext4: fix rec_len overflow - prevent rec_len from overflow with 64KB blocksize Signed-off-by: Takashi Sato <[EMAIL PROTECTED]> Signed-off-by: Mingming Cao <[EMAIL PROTECTED]> --- fs/ext4/dir.c | 11 -- fs/ext4/namei.c | 88

[15/41] Use page_cache_xxx in ext2

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx functions in fs/ext2/* Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/ext2/dir.c | 40 +++- 1 files changed, 23 insertions(+), 17 deletions(-) diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 2bf49d7..d72926f 100644 --- a/fs/e

[33/41] Large blocksize support in ramfs

2007-09-10 Thread Christoph Lameter
The simplest file system to use for large blocksize support is ramfs. Note that ramfs does not use the lower layers (buffer I/O etc) so this case is useful for initial testing of changes to large buffer size support if one just wants to exercise the higher layers. The patch adds the ability to sp

[25/41] compound pages: Allow use of get_page_unless_zero with compound pages

2007-09-10 Thread Christoph Lameter
This is needed by slab defragmentation. The refcount of a page head may be incremented to ensure that a compound page will not go away under us. It also may be needed for defragmentation of higher order pages. The moving of compound pages may require the establishment of a reference before the use

[30/41] Add VM_BUG_ONs to check for correct page order

2007-09-10 Thread Christoph Lameter
Before allowing different page orders it may be wise to get some checkpoints in at various places. Checkpoints will help debugging whenever a wrong order page shows up in a mapping. Helps when converting new filesystems to utilize larger pages. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>

[24/41] compound pages: Use new compound vmstat functions in SLUB

2007-09-10 Thread Christoph Lameter
Use the new dec/inc functions to simplify SLUB's accounting of pages. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/slub.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 04151da..34655f4 100644 --- a/mm/slub.c +++ b/m

[23/41] compound pages: vmstat support

2007-09-10 Thread Christoph Lameter
Add support for compound pages so that inc__state() and dec_xxx_state() will increment the ZVCs by the number of base pages of the compound page. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- include/linux/vmstat.h |5 ++--- mm/vmstat.c| 18 +- 2

[21/41] compound pages: Better PageHead/PageTail handling

2007-09-10 Thread Christoph Lameter
Looking at the handling of compound pages we see that the fact that a page is part of a higher order page is not that interesting. The differentiation is mainly for head pages and tail pages of higher order pages. Head pages keep the page state and it is usually sufficient to pass a pointer to a he

[01/41] Pagecache zeroing: zero_user_segment, zero_user_segments and zero_user

2007-09-10 Thread Christoph Lameter
Simplify page cache zeroing of segments of pages through 3 functions zero_user_segments(page, start1, end1, start2, end2) Zeros two segments of the page. It takes the position where to start and end the zeroing which avoids length calculations. zero_user_segment(page, start, end)

[14/41] Use page_cache_xxx in fs/splice.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/splice.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/splice.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index c010a72..7910f32 100644 --- a/fs/splice.c +++ b/fs/splice.c @

[08/41] Use page_cache_xxx in mm/migrate.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/migrate.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/migrate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 37c73b9..4949927 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -195,7 +195,7 @@ st

[20/41] Use page_cache_xxx in drivers/block/rd.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in drivers/block/rd.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- drivers/block/rd.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 65150b5..e148b3b 100644 --- a/drivers/block/rd.c +++ b

[06/41] Use page_cache_xxx in mm/rmap.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/rmap.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/rmap.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 41ac397..d6a1771 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -188,9 +188,14 @@ static v

[00/41] Large Blocksize Support V7 (adds memmap support)

2007-09-10 Thread Christoph Lameter
This patchset modifies the Linux kernel so that larger block sizes than page size can be supported. Larger block sizes are handled by using compound pages of an arbitrary order for the page cache instead of single pages with order 0. - Support is added in a way that limits the changes to existing

[19/41] Use page_cache_xxx for fs/xfs

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx for fs/xfs Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/xfs/linux-2.6/xfs_aops.c | 55 ++ fs/xfs/linux-2.6/xfs_lrw.c |6 ++-- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_aops

[02/41] Define functions for page cache handling

2007-09-10 Thread Christoph Lameter
We use the macros PAGE_CACHE_SIZE PAGE_CACHE_SHIFT PAGE_CACHE_MASK and PAGE_CACHE_ALIGN in various places in the kernel. Many times common operations like calculating the offset or the index are coded using shifts and adds. This patch provides inline functions to get the calculations accomplished w

[12/41] Use page_cache_xxx in mm/mpage.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/mpage.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/mpage.c | 28 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index a5e1385..2843ed7 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -13

[16/41] Use page_cache_xxx in fs/ext3

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/ext3 Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/ext3/dir.c |3 ++- fs/ext3/inode.c | 34 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c index c00723a..a65b5a7 10064

[07/41] Use page_cache_xxx in mm/filemap_xip.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/filemap_xip.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/filemap_xip.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index ba6892d..5237e53 100644 --- a/mm/filemap

[10/41] Use page_cache_xxx in fs/sync

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/sync. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/sync.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/sync.c b/fs/sync.c index 7cd005e..f30d7eb 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -260,8 +260,8 @@ int do_sync_map

[17/41] Use page_cache_xxx in fs/ext4

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/ext4 Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/ext4/dir.c |3 ++- fs/ext4/inode.c | 31 --- 2 files changed, 18 insertions(+), 16 deletions(-) Index: linux-2.6/fs/ext4/dir.c ===

[03/41] Use page_cache_xxx functions in mm/filemap.c

2007-09-10 Thread Christoph Lameter
Conver the uses of PAGE_CACHE_xxx to use page_cache_xxx instead. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/filemap.c | 56 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c inde

[13/41] Use page_cache_xxx in mm/fadvise.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/fadvise.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/fadvise.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/fadvise.c b/mm/fadvise.c index 0df4c89..804c2a9 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -79,8 +79,8 @

[09/41] Use page_cache_xxx in fs/libfs.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in fs/libfs.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/libfs.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index 53b3dc5..e90f894 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -16,7 +16,8 @@ int si

[05/41] Use page_cache_xxx in mm/truncate.c

2007-09-10 Thread Christoph Lameter
Use page_cache_xxx in mm/truncate.c Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- mm/truncate.c | 35 ++- 1 files changed, 18 insertions(+), 17 deletions(-) diff --git a/mm/truncate.c b/mm/truncate.c index bf8068d..8c3d32e 100644 --- a/mm/truncate.c +

Re: [NFS] [PATH 08/19] jfs: new export ops

2007-09-10 Thread J. Bruce Fields
On Thu, Aug 30, 2007 at 03:16:32PM +0200, Christoph Hellwig wrote: > Trivial switch over to the new generic helpers. > - result = ERR_PTR(-ESTALE); > - goto out_iput; > + iput(inode); > + return ERR_PTR(-ESTALE); For some reason you're introducing a

[PATCH 7/7] CIFS: ignore mode change if it's just for clearing setuid/setgid bits

2007-09-10 Thread Jeff Layton
If the ATTR_KILL_S*ID bits are set then any mode change is only for clearing the setuid/setgid bits. For CIFS, skip the mode change and let the server handle it. Signed-off-by: Jeff Layton <[EMAIL PROTECTED]> --- fs/cifs/inode.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff

[PATCH 6/7] NFS: if ATTR_KILL_S*ID bits are set, then skip mode change

2007-09-10 Thread Jeff Layton
If the ATTR_KILL_S*ID bits are set then any mode change is only for clearing the setuid/setgid bits. For NFS skip the mode change and let the server handle it. Signed-off-by: Jeff Layton <[EMAIL PROTECTED]> --- fs/nfs/inode.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --g

[PATCH 5/7] VFS: make notify_change pass ATTR_KILL_S*ID to setattr operations

2007-09-10 Thread Jeff Layton
Make notify_change not clear the ATTR_KILL_S*ID bits in the ia_vaid that gets passed to the setattr inode operation. This allows the filesystems to reinterpret whether this mode change is simply intended to clear the setuid/setgid bits. This means that notify_change should never be called with bot

[PATCH 4/7] unionfs: fix unionfs_create and unionfs_setattr to handle ATTR_KILL_S*ID

2007-09-10 Thread Jeff Layton
Don't allow either function to trip the BUG() in notify_change. For unionfs_setattr, clear ATTR_MODE if the either ATTR_KILL_S*ID is set. unionfs_create is setting the mode explicitly already. Don't set ATTR_KILL_S*ID. Just fix up the mode to have the same effect. Also, move locking the i_mutex t

[PATCH 2/7] knfsd: only set ATTR_KILL_S*ID if ATTR_MODE isn't being explicitly set

2007-09-10 Thread Jeff Layton
It's theoretically possible for a single SETATTR call to come in that sets the mode and the uid/gid. In that case, assume the mode is correct and don't set the ATTR_KILL_S*ID bits. Doing so would trip the BUG() in notify_change. Signed-off-by: Jeff Layton <[EMAIL PROTECTED]> --- fs/nfsd/vfs.c |

[PATCH 3/7] reiserfs: turn of ATTR_KILL_S*ID at beginning of reiserfs_setattr

2007-09-10 Thread Jeff Layton
reiserfs_setattr can call notify_change recursively using the same iattr struct. This could cause it to trip the BUG() in notify_change. Fix reiserfs to clear those bits near the beginning of the function. Signed-off-by: Jeff Layton <[EMAIL PROTECTED]> --- fs/reiserfs/inode.c |6 +- 1 fil

[PATCH 1/7] ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID

2007-09-10 Thread Jeff Layton
Make sure ecryptfs doesn't trip the BUG() in notify_change. This also allows the lower filesystem to interpret these bits in their own way. Signed-off-by: Jeff Layton <[EMAIL PROTECTED]> --- fs/ecryptfs/inode.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/ecr

[PATCH 0/7] fix setuid/setgid clearing in networked filesystems (take 6)

2007-09-10 Thread Jeff Layton
When an unprivileged process attempts to modify a file that has the setuid or setgid bits set, the VFS will attempt to clear these bits. The VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid mask, and then call notify_change to clear these bits and set the mode accordingly. Wi

Re: ReiserFS: clm-2100: nesting info a different FS

2007-09-10 Thread Chris Mason
On Thu, 6 Sep 2007 17:31:53 +0300 "Marti Raudsepp" <[EMAIL PROTECTED]> wrote: > Hi, > > My dmesg output contains a lot of warning messages from reiserfs and > I'm wondering if this is anything important: > ReiserFS: dm-0: warning: clm-2100: nesting info a different FS > > I'm running Hardened Ge

Re: [PATCH] [-mm] FS: file name must be unique in the same dir in procfs

2007-09-10 Thread Andrew Morton
On Mon, 20 Aug 2007 23:50:05 +0800 Zhang Rui <[EMAIL PROTECTED]> wrote: > Hi, Oliver, > Thanks for your comments, > > On Mon, 2007-08-20 at 18:45 +0800, Oliver Neukum wrote: > > Am Montag 20 August 2007 schrieb Zhang Rui: > > > Files name must be unique in the same directory. > > > > > > Bug is r