1. 02 Aug, 2010 4 commits
    • Sripathi Kodi's avatar
      9p: readdir implementation for 9p2000.L · 7751bdb3
      Sripathi Kodi authored
      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: default avatarSripathi Kodi <sripathik@in.ibm.com>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      7751bdb3
    • M. Mohan Kumar's avatar
      9p: Make use of iounit for read/write · 97e8442b
      M. Mohan Kumar authored
      Change the v9fs_file_readn function to limit the maximum transfer size
      based on the iounit or msize.
      
      Also remove the redundant check for limiting the transfer size in
      v9fs_file_write. This check is done by p9_client_write.
      Signed-off-by: default avatarM. Mohan Kumar <mohan@in.ibm.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      97e8442b
    • Dan Carpenter's avatar
      9p: strlen() doesn't count the terminator · cff6b8a9
      Dan Carpenter authored
      This is an off by one bug because strlen() doesn't count the NULL
      terminator.  We strcpy() addr into a fixed length array of size
      UNIX_PATH_MAX later on.
      
      The addr variable is the name of the device being mounted.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      cff6b8a9
    • Fang Wenqi's avatar
      virtio_9p.h needs <linux/types.h> · b126468e
      Fang Wenqi authored
      Found with makes headers_check:
      include/linux/virtio_9p.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>
      Signed-off-by: default avatarFang Wenqi <antonf@turbolinux.com.cn>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      b126468e
  2. 01 Aug, 2010 2 commits
  3. 31 Jul, 2010 5 commits
  4. 30 Jul, 2010 8 commits
  5. 29 Jul, 2010 20 commits
  6. 28 Jul, 2010 1 commit