25 Aug, 2008

1 commit


03 Jul, 2008

1 commit

  • 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: Eric Van Hensbergen

    Eric Van Hensbergen
     

15 May, 2008

4 commits

  • There was some cleanup issues during early mount which would trigger
    a kernel bug for certain types of failure. This patch reorganizes the
    cleanup to get rid of the bad behavior.

    This also merges the 9pnet and 9pnet_fd modules for the purpose of
    configuration and initialization. Keeping the fd transport separate
    from the core 9pnet code seemed like a good idea at the time, but in
    practice has caused more harm and confusion than good.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • …that this function can fail, return an int, diagnose other option-parsing failures, and adjust the sole caller: (v9fs_session_init): Handle kstrdup failure. Propagate any new v9fs_parse_options failure "up".

    Signed-off-by: Jim Meyering <meyering@redhat.com>
    Cc: Ron Minnich <rminnich@sandia.gov>
    Cc: Latchesar Ionkov <lucho@ionkov.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Eric Van Hensbergen <ericvh@gmail.com>

    Jim Meyering
     
  • The kernel-doc comments of much of the 9p system have been in disarray since
    reorganization. This patch fixes those problems, adds additional documentation
    and a template book which collects the 9p information.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • match_strcpy() is a somewhat creepy function: the caller needs to make sure
    that the destination buffer is big enough, and when he screws up or
    forgets, match_strcpy() happily overruns the buffer.

    There's exactly one customer: v9fs_parse_options(). I believe it currently
    can't overflow its buffer, but that's not exactly obvious.

    The source string is a substing of the mount options. The kernel silently
    truncates those to PAGE_SIZE bytes, including the terminating zero. See
    compat_sys_mount() and do_mount().

    The destination buffer is obtained from __getname(), which allocates from
    name_cachep, which is initialized by vfs_caches_init() for size PATH_MAX.

    We're safe as long as PATH_MAX
    Cc: Latchesar Ionkov
    Cc: Jim Meyering
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Eric Van Hensbergen

    Markus Armbruster
     

25 Apr, 2008

1 commit


19 Apr, 2008

1 commit


08 Feb, 2008

1 commit


07 Feb, 2008

4 commits

  • This merges the mux.c (including the connection interface) with trans_fd
    in preparation for transport API changes. Ultimately, trans_fd will need
    to be rewritten to clean it up and simplify the implementation, but this
    reorganization is viewed as the first step.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • v9fs was allowing writable mmap which could lead to kernel BUG() cases.
    This sets the mmap function to generic_file_readonly_mmap which (correctly)
    returns an error to applications which open mmap for writing.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • GDM gets unhappy if /var/gdm doesn't have the sticky bit set. This patch adds
    support for the sticky bit in much the same way setuid/setgid is supported.

    With this patch, I can launch X from a v9fs rootfs (although I quickly run out
    of fds in the server once gnome starts up).

    Signed-off-by: Anthony Liguori
    Acked-by: Eric Van Hensbergen

    Anthony Liguori
     
  • When a new user attached at a directory other than the root, he would end
    up in the parent directory of the cwd. This was due to a logic error in
    the code which attaches the user at the mount point and walks back to the
    cwd. This patch fixes that.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     

06 Nov, 2007

2 commits


24 Oct, 2007

2 commits


18 Oct, 2007

6 commits

  • This patch moves transport dynamic registration and matching to the net
    module to prevent a bad Kconfig dependency between the net and fs 9p modules.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • Loose mode in 9p utilizes the page cache without respecting coherency with
    the server. Any writes previously invaldiated the entire mapping for a file.
    This patch softens the behavior to only invalidate the region of the actual
    write.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • 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
    'access'):

    - 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=)
    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
    one.

    Signed-off-by: Latchesar Ionkov
    Signed-off-by: Eric Van Hensbergen

    Latchesar Ionkov
     
  • 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: Latchesar Ionkov
    Signed-off-by: Eric Van Hensbergen

    Latchesar Ionkov
     
  • 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: Latchesar Ionkov
    Signed-off-by: Eric Van Hensbergen

    Latchesar Ionkov
     
  • This patch abstracts out the interfaces to underlying transports so that
    new transports can be added as modules. This should also allow kernel
    configuration of transports without ifdef-hell.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     

10 Oct, 2007

1 commit


23 Aug, 2007

1 commit


17 Jul, 2007

1 commit


15 Jul, 2007

3 commits

  • During reorganization, the mount time debug option was removed in favor
    of module-load-time parameters. However, the mount time option is still
    a useful for feature during debug and for user-fault isolation when the
    module is compiled into the kernel.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • This patch expands the impact of the loose cache mode to allow for cached
    metadata increasing the performance of directory listings and other metadata
    read operations.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • This patchset moves non-filesystem interfaces of v9fs from fs/9p to net/9p.
    It moves the transport, packet marshalling and connection layers to net/9p
    leaving only the VFS related files in fs/9p. This work is being done in
    preparation for in-kernel 9p servers as well as alternate 9p clients (other
    than VFS).

    Signed-off-by: Latchesar Ionkov
    Signed-off-by: Eric Van Hensbergen

    Latchesar Ionkov
     

22 May, 2007

1 commit

  • 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
    arm
    i386 i386-up i386-defconfig i386-allnoconfig
    ia64 ia64-up
    m68k
    mips
    parisc parisc-up
    powerpc powerpc-up
    s390 s390-up
    sparc sparc-up
    sparc64 sparc64-up
    um-x86_64
    x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

    as well as my two usual configs.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

09 May, 2007

1 commit


24 Apr, 2007

1 commit

  • v9fs_insert uses v9fs_fid_lookup (which also locks the fid) to get the
    primary fid associated with the dentry and destroys the v9fs_fid struct
    after removing the file. If another process called v9fs_fid_lookup on the
    same dentry, it may wait undefinitely for the fid's lock (as the struct is
    freed).

    This patch changes v9fs_remove to use a cloned fid, so the primary fid is
    not locked and freed.

    Signed-off-by: Latchesar Ionkov
    Cc: Eric Van Hensbergen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Latchesar Ionkov
     

27 Mar, 2007

1 commit


19 Feb, 2007

2 commits

  • 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: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • Since the kthread api does not bump the reference count on
    processes that tracked it is not safe allow user space to
    kill the threads, as I still retain a pointer to the task_struct.

    Signed-off-by: Eric W. Biederman
    Acked-by: Eric Van Hensbergen

    Eric W. Biederman
     

13 Feb, 2007

2 commits

  • This patch is inspired by Arjan's "Patch series to mark struct
    file_operations and struct inode_operations const".

    Compile tested with gcc & sparse.

    Signed-off-by: Josef 'Jeff' Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     
  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

12 Feb, 2007

1 commit


10 Feb, 2007

1 commit


27 Jan, 2007

1 commit