1. 01 12月, 2018 1 次提交
  2. 09 5月, 2016 1 次提交
  3. 25 4月, 2015 1 次提交
    • J
      fs/9p: fix readdir() · 8e3c5005
      Johannes Berg 提交于
      Al Viro's IOV changes broke 9p readdir() because the new code
      didn't abort the read when it returned nothing. The original
      code checked if the combined error/length was <= 0 but in the
      new code that accidentally got changed to just an error check.
      
      Add back the return from the function when nothing is read.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Fixes: e1200fe6 ("9p: switch p9_client_read() to passing struct iov_iter *")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8e3c5005
  4. 12 4月, 2015 1 次提交
  5. 09 10月, 2014 1 次提交
  6. 05 6月, 2014 1 次提交
  7. 29 6月, 2013 1 次提交
  8. 11 2月, 2013 1 次提交
    • A
      locking in fs/9p ->readdir() · 7ffdea7e
      Al Viro 提交于
      	... is really excessive.  First of all, ->readdir() is serialized by
      file->f_path.dentry->d_inode->i_mutex; playing with file->f_path.dentry->d_lock
      is not buying you anything.  Moreover, rdir->mutex is pointless for exactly
      the same reason - you'll never see contention on it.
      
      	While we are at it, there's no point in having rdir->buf a pointer -
      you have it point just past the end of rdir, so it might as well be a flex
      array (and no, it's not a gccism).
      
      	Absolutely untested patch follows:
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      7ffdea7e
  9. 06 1月, 2012 1 次提交
    • J
      9p: Reduce object size with CONFIG_NET_9P_DEBUG · 5d385153
      Joe Perches 提交于
      Reduce object size by deduplicating formats.
      
      Use vsprintf extension %pV.
      Rename P9_DPRINTK uses to p9_debug, align arguments.
      Add function for _p9_debug and macro to add __func__.
      Add missing "\n"s to p9_debug uses.
      Remove embedded function names as p9_debug adds it.
      Remove P9_EPRINTK macro and convert use to pr_<level>.
      Add and use pr_fmt and pr_<level>.
      
      $ size fs/9p/built-in.o*
         text	   data	    bss	    dec	    hex	filename
        62133	    984	  16000	  79117	  1350d	fs/9p/built-in.o.new
        67342	    984	  16928	  85254	  14d06	fs/9p/built-in.o.old
      $ size net/9p/built-in.o*
         text	   data	    bss	    dec	    hex	filename
        88792	   4148	  22024	 114964	  1c114	net/9p/built-in.o.new
        94072	   4148	  23232	 121452	  1da6c	net/9p/built-in.o.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      5d385153
  10. 25 10月, 2011 2 次提交
    • A
      net/9p: Convert net/9p protocol dumps to tracepoints · 348b5901
      Aneesh Kumar K.V 提交于
      This helps in more control over debugging.
      root@qemu-img-64:~# ls /pass/123
      ls: cannot access /pass/123: No such file or directory
      root@qemu-img-64:~# cat /sys/kernel/debug/tracing/trace
      # tracer: nop
      #
      #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
      #              | |       |          |         |
                    ls-1536  [001]    70.928584: 9p_protocol_dump: clnt 18446612132784021504 P9_TWALK(tag = 1)
      000: 16 00 00 00 6e 01 00 01 00 00 00 02 00 00 00 01
      010: 00 03 00 31 32 33 00 00 00 ff ff ff ff 00 00 00
      
                    ls-1536  [001]    70.928587: <stack trace>
       => trace_9p_protocol_dump
       => p9pdu_finalize
       => p9_client_rpc
       => p9_client_walk
       => v9fs_vfs_lookup
       => d_alloc_and_lookup
       => walk_component
       => path_lookupat
                    ls-1536  [000]    70.929696: 9p_protocol_dump: clnt 18446612132784021504 P9_RLERROR(tag = 1)
      000: 0b 00 00 00 07 01 00 02 00 00 00 4e 03 00 02 00
      010: 00 00 00 00 03 00 02 00 00 00 00 00 ff 43 00 00
      
                    ls-1536  [000]    70.929697: <stack trace>
       => trace_9p_protocol_dump
       => p9_client_rpc
       => p9_client_walk
       => v9fs_vfs_lookup
       => d_alloc_and_lookup
       => walk_component
       => path_lookupat
       => do_path_lookup
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      348b5901
    • A
      fs/9p: Update zero-copy implementation in 9p · abfa034e
      Aneesh Kumar K.V 提交于
      * remove lot of update to different data structure
      * add a seperate callback for zero copy request.
      * above makes non zero copy code path simpler
      * remove conditionalizing TREAD/TREADDIR/TWRITE in the zero copy path
      * Fix the dotu p9_check_errors with zero copy. Add sufficient doc around
      * Add support for both in and output buffers in zero copy callback
      * pin and unpin pages in the same context
      * use helpers instead of defining page offset and rest of page ourself
      * Fix mem leak in p9_check_errors
      * Remove 'E' and 'F' in p9pdu_vwritef
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      abfa034e
  11. 15 3月, 2011 1 次提交
  12. 28 10月, 2010 2 次提交
  13. 13 9月, 2010 1 次提交
  14. 04 8月, 2010 1 次提交
  15. 03 8月, 2010 1 次提交
    • S
      9p: readdir implementation for 9p2000.L · 7751bdb3
      Sripathi Kodi 提交于
      This patch implements the kernel part of readdir() implementation for 9p2000.L
      
          Change from V3: Instead of inode, server now sends qids for each dirent
      
          SYNOPSIS
      
          size[4] Treaddir tag[2] fid[4] offset[8] count[4]
          size[4] Rreaddir tag[2] count[4] data[count]
      
          DESCRIPTION
      
          The readdir request asks the server to read the directory specified by 'fid'
          at an offset specified by 'offset' and return as many dirent structures as
          possible that fit into count bytes. Each dirent structure is laid out as
          follows.
      
                  qid.type[1]
                    the type of the file (directory, etc.), represented as a bit
                    vector corresponding to the high 8 bits of the file's mode
                    word.
      
                  qid.vers[4]
                    version number for given path
      
                  qid.path[8]
                    the file server's unique identification for the file
      
                  offset[8]
                    offset into the next dirent.
      
                  type[1]
                    type of this directory entry.
      
                  name[256]
                    name of this directory entry.
      
          This patch adds v9fs_dir_readdir_dotl() as the readdir() call for 9p2000.L.
          This function sends P9_TREADDIR command to the server. In response the server
          sends a buffer filled with dirent structures. This is different from the
          existing v9fs_dir_readdir() call which receives stat structures from the server.
          This results in significant speedup of readdir() on large directories.
          For example, doing 'ls >/dev/null' on a directory with 10000 files on my
          laptop takes 1.088 seconds with the existing code, but only takes 0.339 seconds
          with the new readdir.
      Signed-off-by: NSripathi Kodi <sripathik@in.ibm.com>
      Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      7751bdb3
  16. 28 7月, 2010 1 次提交
  17. 22 5月, 2010 1 次提交
  18. 06 4月, 2010 1 次提交
  19. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  20. 13 3月, 2010 1 次提交
  21. 06 3月, 2010 1 次提交
  22. 02 11月, 2009 2 次提交
  23. 18 10月, 2008 3 次提交
  24. 25 8月, 2008 1 次提交
  25. 15 5月, 2008 1 次提交
  26. 15 7月, 2007 1 次提交
  27. 09 5月, 2007 1 次提交
  28. 09 12月, 2006 1 次提交
  29. 04 12月, 2006 1 次提交
  30. 29 3月, 2006 1 次提交
  31. 26 3月, 2006 1 次提交
  32. 17 3月, 2006 1 次提交
  33. 09 1月, 2006 3 次提交