1. 22 May, 2010 3 commits
  2. 21 May, 2010 2 commits
  3. 05 Apr, 2010 2 commits
  4. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      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.
      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
      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
      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
      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: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  5. 05 Mar, 2010 2 commits
  6. 08 Feb, 2010 1 commit
    • M. Mohan Kumar's avatar
      9p: Include fsync support for 9p client · 7a4439c4
      M. Mohan Kumar authored
      Implement the fsync in the client side by marking stat field values to 'don't touch' so that server may 
      interpret it as a request to guarantee that the contents of the associated file are committed to stable 
      storage before the Rwstat message is returned.
      Without this patch, calling fsync on a 9p file results in "Invalid argument" error. Please check the attached 
      C program.
      Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> 
      Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> 
      Acked-by: default avatarVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
  7. 14 Jan, 2010 1 commit
  8. 02 Nov, 2009 1 commit
    • Martin Stava's avatar
      9p: fix readlink · 2511cd0b
      Martin Stava authored
      I do not know if you've looked on the patch, but unfortunately it is
      incorrect. A suggested better version is in this email (the old
      version didn't work in case the user provided buffer was not long
      enough - it incorrectly appended null byte on a position of last char,
      and thus broke the contract of the readlink method). However, I'm
      still not sure this is 100% correct thing to do, I think readlink is
      supposed to return buffer without last null byte in all cases, but we
      do return last null byte (even the old version).. on the other hand it
      is likely unspecified what is in the remaining part of the buffer, so
      null character may be fine there ;):
      Signed-off-by: default avatarMartin Stava <martin.stava@gmail.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
  9. 23 Sep, 2009 2 commits
  10. 17 Aug, 2009 5 commits
  11. 19 Dec, 2008 2 commits
  12. 13 Nov, 2008 1 commit
  13. 17 Oct, 2008 2 commits
    • Magnus Deininger's avatar
      9p: fix device file handling · 57c7b4e6
      Magnus Deininger authored
      In v9fs_get_inode(), for block, as well as char devices (in theory), 
      the function init_special_inode() is called to set up callback functions 
      for file ops. this function uses the file mode's value to determine whether 
      to use block or char dev functions. In v9fs_inode_from_fid(), the function 
      p9mode2unixmode() is used, but for all devices it initially returns S_IFBLK, 
      then uses v9fs_get_inode() to initialise a new inode, then finally uses 
      v9fs_stat2inode(), which would determine whether the inode is a block or 
      character device. However, at that point init_special_inode() had already 
      decided to use the block device functions, so even if the inode's mode is 
      turned to a character device, the block functions are still used to operate 
      on them. The attached patch simply calls init_special_inode() again for devices 
      after parsing device node data in v9fs_stat2inode() so that the proper functions 
      are used.
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
    • Eric Van Hensbergen's avatar
      9p: rework client code to use new protocol support functions · 51a87c55
      Eric Van Hensbergen authored
      Now that the new protocol functions are in place, this patch switches
      the client code to using the new support code.
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
  14. 24 Sep, 2008 1 commit
  15. 03 Jul, 2008 1 commit
    • Eric Van Hensbergen's avatar
      9p: fix O_APPEND in legacy mode · 2e4bef41
      Eric Van Hensbergen authored
      The legacy protocol's open operation doesn't handle an append operation
      (it is expected that the client take care of it).  We were incorrectly
      passing the extended protocol's flag through even in legacy mode.  This
      was reported in bugzilla report #10689.  This patch fixes the problem
      by disallowing extended protocol open modes from being passed in legacy
      mode and implemented append functionality on the client side by adding
      a seek after the open.
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
  16. 14 May, 2008 1 commit
  17. 07 Feb, 2008 1 commit
  18. 06 Feb, 2008 1 commit
  19. 23 Oct, 2007 1 commit
  20. 17 Oct, 2007 3 commits
    • Latchesar Ionkov's avatar
      9p: attach-per-user · ba17674f
      Latchesar Ionkov authored
      The 9P2000 protocol requires the authentication and permission checks to be
      done in the file server. For that reason every user that accesses the file
      server tree has to authenticate and attach to the server separately.
      Multiple users can share the same connection to the server.
      Currently v9fs does a single attach and executes all I/O operations as a
      single user. This makes using v9fs in multiuser environment unsafe as it
      depends on the client doing the permission checking.
      This patch improves the 9P2000 support by allowing every user to attach
      separately. The patch defines three modes of access (new mount option
      - attach-per-user (access=user) (default mode for 9P2000.u)
       If a user tries to access a file served by v9fs for the first time, v9fs
       sends an attach command to the server (Tattach) specifying the user. If
       the attach succeeds, the user can access the v9fs tree.
       As there is no uname->uid (string->integer) mapping yet, this mode works
       only with the 9P2000.u dialect.
      - allow only one user to access the tree (access=<uid>)
       Only the user with uid can access the v9fs tree. Other users that attempt
       to access it will get EPERM error.
      - do all operations as a single user (access=any) (default for 9P2000)
       V9fs does a single attach and all operations are done as a single user.
       If this mode is selected, the v9fs behavior is identical with the current
      Signed-off-by: default avatarLatchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
    • Latchesar Ionkov's avatar
      9p: rename uid and gid parameters · bd32b82d
      Latchesar Ionkov authored
      Change the names of 'uid' and 'gid' parameters to the more appropriate
      'dfltuid' and 'dfltgid'.  This also sets the default uid/gid to -2
      (aka nfsnobody)
      Signed-off-by: default avatarLatchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
    • Latchesar Ionkov's avatar
      9p: define session flags · 2405669b
      Latchesar Ionkov authored
      Create more general flags field in the v9fs_session_info struct and move the
      'extended' flag as a bit in the flags.
      Signed-off-by: default avatarLatchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
  21. 14 Jul, 2007 2 commits
  22. 21 May, 2007 1 commit
    • Alexey Dobriyan's avatar
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan authored
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      Cross-compile tested on
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      as well as my two usual configs.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  23. 08 May, 2007 1 commit
  24. 24 Apr, 2007 1 commit
  25. 18 Feb, 2007 1 commit
    • Eric Van Hensbergen's avatar
      9p: implement optional loose read cache · e03abc0c
      Eric Van Hensbergen authored
      While cacheing is generally frowned upon in the 9p world, it has its
      place -- particularly in situations where the remote file system is
      exclusive and/or read-only.  The vacfs views of venti content addressable
      store are a real-world instance of such a situation.  To facilitate higher
      performance for these workloads (and eventually use the fscache patches),
      we have enabled a "loose" cache mode which does not attempt to maintain
      any form of consistency on the page-cache or dcache.  This results in over
      two orders of magnitude performance improvement for cacheable block reads
      in the Bonnie benchmark.  The more aggressive use of the dcache also seems
      to improve metadata operational performance.
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>