tmp_suning_uos_patched/fs/9p
Sripathi Kodi 7751bdb3a0 9p: readdir implementation for 9p2000.L
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: Sripathi Kodi <sripathik@in.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-08-02 14:25:07 -05:00
..
cache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cache.h 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
fid.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs 2010-04-05 13:42:54 -07:00
fid.h 9p: Documentation updates 2008-05-14 19:23:25 -05:00
Kconfig 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
Makefile 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
v9fs_vfs.h 9p: VFS switches for 9p2000.L: VFS switches 2010-05-21 16:44:33 -05:00
v9fs.c 9p: add bdi backing to mount session 2010-04-22 11:42:00 +02:00
v9fs.h 9p: add bdi backing to mount session 2010-04-22 11:42:00 +02:00
vfs_addr.c 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
vfs_dentry.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vfs_dir.c 9p: readdir implementation for 9p2000.L 2010-08-02 14:25:07 -05:00
vfs_file.c 9p: Make use of iounit for read/write 2010-08-02 14:25:06 -05:00
vfs_inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs 2010-05-24 07:41:13 -07:00
vfs_super.c 9p: add 9P2000.L statfs operation 2010-05-21 16:44:33 -05:00