1. 09 8月, 2008 1 次提交
    • A
      [NFSD] uninline nfsd4_op_name() · f1c7f79b
      Adrian Bunk 提交于
      There doesn't seem to be a compelling reason why nfsd4_op_name() is
      marked as "inline":
      
      It's only used in a dprintk(), and as long as it has only one caller
      non-ancient gcc versions anyway inline it automatically.
      
      This patch fixes the following compile error with gcc 3.4:
      
        ...
          CC      fs/nfsd/nfs4proc.o
        nfs4proc.c: In function `nfsd4_proc_compound':
        nfs4proc.c:854: sorry, unimplemented: inlining failed in call to
        nfs4proc.c:897: sorry, unimplemented: called from here
        make[3]: *** [fs/nfsd/nfs4proc.o] Error 1
      Reported-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      [ Also made it "const char *"  - Linus]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f1c7f79b
  2. 06 8月, 2008 3 次提交
  3. 05 8月, 2008 3 次提交
  4. 03 8月, 2008 2 次提交
  5. 01 8月, 2008 23 次提交
  6. 31 7月, 2008 4 次提交
    • L
      romfs_readpage: don't report errors for pages beyond i_size · 0056e65f
      Linus Torvalds 提交于
      We zero-fill them like we are supposed to, and that's all fine.  It's
      only an error if the 'romfs_copyfrom()' routine isn't able to fill the
      data that is supposed to be there.
      
      Most of the patch is really just re-organizing the code a bit, and using
      separate variables for the error value and for how much of the page we
      actually filled from the filesystem.
      Reported-and-tested-by: NChris Fester <cfester@wms.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Matt Waddel <matt.waddel@freescale.com>
      Cc: Greg Ungerer <gerg@snapgear.com>
      Signed-of-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0056e65f
    • T
      fs/buffer.c: uninline __remove_assoc_queue() · dbacefc9
      Thomas Petazzoni 提交于
      Uninline the __remove_assoc_queue() function in fs/buffer.c, called at too
      many places and too long to really be inlined.  Size results:
      
         text	   data	    bss	    dec	    hex	filename
      1134606	 118840	 212992	1466438	 166046	vmlinux.old
      1134303	 118840	 212992	1466135	 165f17	vmlinux
         -303       0       0    -303    -12F +/-
      
      This patch is part of the Linux Tiny project and has been originally
      written by Matt Mackall <mpm@selenic.com>.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Matt Mackall <mpm@selenic.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dbacefc9
    • H
      omfs: sparse annotations · d406f66d
      Harvey Harrison 提交于
      Missing cpu_to_be64 on some constant assignments.
      fs/omfs/dir.c:107:16: warning: incorrect type in assignment (different base types)
      fs/omfs/dir.c:107:16:    expected restricted __be64 [usertype] i_sibling
      fs/omfs/dir.c:107:16:    got unsigned long long
      fs/omfs/file.c:33:13: warning: incorrect type in assignment (different base types)
      fs/omfs/file.c:33:13:    expected restricted __be64 [usertype] e_next
      fs/omfs/file.c:33:13:    got unsigned long long
      fs/omfs/file.c:36:24: warning: incorrect type in assignment (different base types)
      fs/omfs/file.c:36:24:    expected restricted __be64 [usertype] e_cluster
      fs/omfs/file.c:36:24:    got unsigned long long
      fs/omfs/file.c:37:23: warning: incorrect type in assignment (different base types)
      fs/omfs/file.c:37:23:    expected restricted __be64 [usertype] e_blocks
      fs/omfs/file.c:37:23:    got unsigned long long
      
      fs/omfs/bitmap.c:74:18: warning: incorrect type in argument 2 (different signedness)
      fs/omfs/bitmap.c:74:18:    expected unsigned long volatile *addr
      fs/omfs/bitmap.c:74:18:    got long *<noident>
      fs/omfs/bitmap.c:77:20: warning: incorrect type in argument 2 (different signedness)
      fs/omfs/bitmap.c:77:20:    expected unsigned long volatile *addr
      fs/omfs/bitmap.c:77:20:    got long *<noident>
      fs/omfs/bitmap.c:112:17: warning: incorrect type in argument 2 (different signedness)
      fs/omfs/bitmap.c:112:17:    expected unsigned long volatile *addr
      fs/omfs/bitmap.c:112:17:    got long *<noident>
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Acked-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d406f66d
    • A
      VFS: increase pseudo-filesystem block size to PAGE_SIZE · 3971e1a9
      Alex Nixon 提交于
      This commit:
      
          commit ba52de12
          Author: Theodore Ts'o <tytso@mit.edu>
          Date:   Wed Sep 27 01:50:49 2006 -0700
      
              [PATCH] inode-diet: Eliminate i_blksize from the inode structure
      
      caused the block size used by pseudo-filesystems to decrease from
      PAGE_SIZE to 1024 leading to a doubling of the number of context switches
      during a kernbench run.
      Signed-off-by: NAlex Nixon <Alex.Nixon@citrix.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3971e1a9
  7. 29 7月, 2008 4 次提交
    • E
      eCryptfs: use page_alloc not kmalloc to get a page of memory · 7fcba054
      Eric Sandeen 提交于
      With SLUB debugging turned on in 2.6.26, I was getting memory corruption
      when testing eCryptfs.  The root cause turned out to be that eCryptfs was
      doing kmalloc(PAGE_CACHE_SIZE); virt_to_page() and treating that as a nice
      page-aligned chunk of memory.  But at least with SLUB debugging on, this
      is not always true, and the page we get from virt_to_page does not
      necessarily match the PAGE_CACHE_SIZE worth of memory we got from kmalloc.
      
      My simple testcase was 2 loops doing "rm -f fileX; cp /tmp/fileX ." for 2
      different multi-megabyte files.  With this change I no longer see the
      corruption.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Acked-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Acked-by: NRik van Riel <riel@redhat.com>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7fcba054
    • Y
      bio-integrity: remove EXPORT_SYMBOL for bio_integrity_init_slab() · e3b6e806
      Yoichi Yuasa 提交于
      I got section mismatch message about bio_integrity_init_slab().
      
      WARNING: fs/built-in.o(__ksymtab+0xb60): Section mismatch in reference from the variable __ksymtab_bio_integrity_init_slab to the function .init.text:bio_integrity_init_slab()
      
      The symbol bio_integrity_init_slab is exported and annotated __init Fix
      this by removing the __init annotation of bio_integrity_init_slab or drop
      the export.
      
      It only call from init_bio().  The EXPORT_SYMBOL() can be removed.
      Signed-off-by: NYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e3b6e806
    • H
      vfs: pagecache usage optimization for pagesize!=blocksize · 8ab22b9a
      Hisashi Hifumi 提交于
      When we read some part of a file through pagecache, if there is a
      pagecache of corresponding index but this page is not uptodate, read IO
      is issued and this page will be uptodate.
      
      I think this is good for pagesize == blocksize environment but there is
      room for improvement on pagesize != blocksize environment.  Because in
      this case a page can have multiple buffers and even if a page is not
      uptodate, some buffers can be uptodate.
      
      So I suggest that when all buffers which correspond to a part of a file
      that we want to read are uptodate, use this pagecache and copy data from
      this pagecache to user buffer even if a page is not uptodate.  This can
      reduce read IO and improve system throughput.
      
      I wrote a benchmark program and got result number with this program.
      
      This benchmark do:
      
        1: mount and open a test file.
      
        2: create a 512MB file.
      
        3: close a file and umount.
      
        4: mount and again open a test file.
      
        5: pwrite randomly 300000 times on a test file.  offset is aligned
           by IO size(1024bytes).
      
        6: measure time of preading randomly 100000 times on a test file.
      
      The result was:
      	2.6.26
              330 sec
      
      	2.6.26-patched
              226 sec
      
      Arch:i386
      Filesystem:ext3
      Blocksize:1024 bytes
      Memory: 1GB
      
      On ext3/4, a file is written through buffer/block.  So random read/write
      mixed workloads or random read after random write workloads are optimized
      with this patch under pagesize != blocksize environment.  This test result
      showed this.
      
      The benchmark program is as follows:
      
      #include <stdio.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      #include <unistd.h>
      #include <time.h>
      #include <stdlib.h>
      #include <string.h>
      #include <sys/mount.h>
      
      #define LEN 1024
      #define LOOP 1024*512 /* 512MB */
      
      main(void)
      {
      	unsigned long i, offset, filesize;
      	int fd;
      	char buf[LEN];
      	time_t t1, t2;
      
      	if (mount("/dev/sda1", "/root/test1/", "ext3", 0, 0) < 0) {
      		perror("cannot mount\n");
      		exit(1);
      	}
      	memset(buf, 0, LEN);
      	fd = open("/root/test1/testfile", O_CREAT|O_RDWR|O_TRUNC);
      	if (fd < 0) {
      		perror("cannot open file\n");
      		exit(1);
      	}
      	for (i = 0; i < LOOP; i++)
      		write(fd, buf, LEN);
      	close(fd);
      	if (umount("/root/test1/") < 0) {
      		perror("cannot umount\n");
      		exit(1);
      	}
      	if (mount("/dev/sda1", "/root/test1/", "ext3", 0, 0) < 0) {
      		perror("cannot mount\n");
      		exit(1);
      	}
      	fd = open("/root/test1/testfile", O_RDWR);
      	if (fd < 0) {
      		perror("cannot open file\n");
      		exit(1);
      	}
      
      	filesize = LEN * LOOP;
      	for (i = 0; i < 300000; i++){
      		offset = (random() % filesize) & (~(LEN - 1));
      		pwrite(fd, buf, LEN, offset);
      	}
      	printf("start test\n");
      	time(&t1);
      	for (i = 0; i < 100000; i++){
      		offset = (random() % filesize) & (~(LEN - 1));
      		pread(fd, buf, LEN, offset);
      	}
      	time(&t2);
      	printf("%ld sec\n", t2-t1);
      	close(fd);
      	if (umount("/root/test1/") < 0) {
      		perror("cannot umount\n");
      		exit(1);
      	}
      }
      Signed-off-by: NHisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8ab22b9a
    • H
      exec: include pagemap.h again to fix build · ca5b172b
      Hugh Dickins 提交于
      Fix compilation errors on avr32 and without CONFIG_SWAP, introduced by
      ba92a43d ("exec: remove some includes")
      
        In file included from include/asm/tlb.h:24,
                         from fs/exec.c:55:
        include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
        include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
        include/asm-generic/tlb.h: In function 'tlb_remove_page':
        include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
        make[1]: *** [fs/exec.o] Error 1
      
      This straightforward part-revert is nobody's favourite patch to address
      the underlying tlb.h needs swap.h needs pagemap.h (but sparc won't like
      that) mess; but appropriate to fix the build now before any overhaul.
      Reported-by: NYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Reported-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Tested-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca5b172b