16 May, 2006

2 commits

  • Multiple races can happen when v9fs is interrupted by a signal and Tflush
    message is sent to the server. After v9fs sends Tflush it doesn't wait
    until it receives Rflush, and possibly the response of the original
    message. This behavior may confuse v9fs what fids are allocated by the
    file server.

    This patch fixes the races and the fid allocation.

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

    Latchesar Ionkov
     
  • v9fs leaks memory if the file server responds with Rerror to a Twalk
    message. The patch fixes the leak.

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

    Latchesar Ionkov
     

11 Apr, 2006

1 commit


29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

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

    Arjan van de Ven
     

26 Mar, 2006

7 commits


24 Mar, 2006

1 commit

  • - mux.c: v9fs_poll_mux() was inline but not static resuling in needless
    object size bloat
    - mux.c: remove all "inline"s: gcc should know best what to inline
    - #if 0 the following unused global functions:
    - 9p.c: v9fs_v9fs_t_flush()
    - conv.c: v9fs_create_tauth()
    - mux.c: v9fs_mux_rpcnb()

    Signed-off-by: Adrian Bunk
    Cc: Eric Van Hensbergen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

23 Mar, 2006

1 commit


22 Mar, 2006

1 commit

  • If a file is not found in v9fs_vfs_lookup, the function creates negative
    dentry, but doesn't assign any dentry ops. This leaves the negative entry
    in the cache (there is no d_delete to mark it for removal). If the file is
    created outside of the mounted v9fs filesystem, the file shows up in the
    directory with weird permissions.

    This patch assigns the default v9fs dentry ops to the negative dentry.

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

    Latchesar Ionkov
     

17 Mar, 2006

1 commit


09 Mar, 2006

1 commit


03 Mar, 2006

3 commits

  • v9fs has been plagued by an over-complicated approach trying to map Linux
    dentry semantics to Plan 9 fid semantics. Our previous approach called for
    aggressive flushing of the dcache resulting in several problems (including
    wierd cwd behavior when running /bin/pwd).

    This patch dramatically simplifies our handling of this fid management. Fids
    will not be clunked as promptly, but the new approach is more functionally
    correct. We now clunk un-open fids only when their dentry ref_count reaches 0
    (and d_delete is called).

    Another simplification is we no longer seek to match fids to the process-id or
    uid of the action initiator. The uid-matching will need to be revisited when
    we fix the security model.

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

    Eric Van Hensbergen
     
  • Lucho's atomic create+open fix had a bug in the super block initialization
    causing all mounts to fail. He was freeing an fcall too early. This patch
    fixes that oversight.

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

    Eric Van Hensbergen
     
  • In order to assure atomic create+open v9fs stores the open fid produced by
    v9fs_vfs_create in the dentry, from where v9fs_file_open retrieves it and
    associates it with the open file.

    This patch modifies v9fs to use nameidata.intent.open values to do the atomic
    create+open.

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

    Latchesar Ionkov
     

21 Feb, 2006

1 commit


04 Feb, 2006

3 commits

  • When v9fs_mux_rpc sends a 9P message, it may be put in the queue of unsent
    request. If the user process receives a signal, v9fs_mux_rpc sets the
    request error to ERREQFLUSH and assigns NULL to request's send message. If
    the message was still in the unsent queue, v9fs_write_work would produce an
    oops while processing it.

    The patch makes sure that requests that are being flushed are moved to the
    pending requests queue safely.

    If a request is being flushed, don't remove it from the list of pending
    requests even if it receives a reply before the flush is acknoledged. The
    request will be removed during from the Rflush handler (v9fs_mux_flush_cb).

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

    Latchesar Ionkov
     
  • v9fs_put_str used to store pointer to the source string, instead of the
    cbuf copy. This patch corrects it.

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

    Latchesar Ionkov
     
  • Two symlink fixes, v9fs_readlink didn't copy the last character of the
    symlink name, v9fs_vfs_follow_link incorrectly called strlen of newly
    allocated buffer instead of PATH_MAX.

    Signed-off-by: Latchesar Ionkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Latchesar Ionkov
     

19 Jan, 2006

1 commit

  • v9fs mmap support was originally removed from v9fs at Al Viro's request,
    but recently there have been requests from folks who want readpage
    functionality (primarily to enable execution of files mounted via 9P).
    This patch adds readpage support (but not writepage which contained most of
    the objectionable code). It passes fsx-linux (and other regressions) so it
    should be relatively safe.

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

    Eric Van Hensbergen
     

15 Jan, 2006

1 commit


11 Jan, 2006

1 commit


10 Jan, 2006

1 commit


09 Jan, 2006

6 commits

  • - remove unnecessary -ENOMEM assignments
    - return correct value when buf_check_size for second time in a buffer
    - handle failures when create_workqueue and kthread_create are called
    - use kzalloc instead of kmalloc/memset 0
    - v9fs_str_copy and v9fs_str_compare were buggy, were used only in one
    place, correct the logic and move it to the place it is used.

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

    Latchesar Ionkov
     
  • Performance enhancement reducing the number of copies in the data and
    stat paths.

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

    Latchesar Ionkov
     
  • v9fs_create doesn't manage correctly the fids when it is called to create a
    directory.. The fid created by the create 9P call (newfid) and the one
    created by walking to already created file (wfidno) are not used
    consistently.

    This patch cleans up the usage of newfid and wfidno.

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

    Latchesar Ionkov
     
  • New multiplexer implementation. Decreases the number of kernel threads
    required. Better handling when the user process receives a signal.

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

    Latchesar Ionkov
     
  • If a 9pfs server crashes, v9fs_fd_close() is called. Subsequently, in
    cleaning up by performing a umount() on the FS that was provided by this
    server v9fs_fd_close() is called again, and uses the old, freed valus of
    trans->priv. This patch ensures that trans->priv can be freed only once,
    otherwise this function bails early.

    Signed-off-by: Michal Ostrowski
    Signed-off-by: Eric Van Hensbergen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Van Hensbergen
     
  • This patch add EXPORT_SYMBOL(filemap_write_and_wait) and use it.

    See mm/filemap.c:

    And changes the filemap_write_and_wait() and filemap_write_and_wait_range().

    Current filemap_write_and_wait() doesn't wait if filemap_fdatawrite()
    returns error. However, even if filemap_fdatawrite() returned an
    error, it may have submitted the partially data pages to the device.
    (e.g. in the case of -ENOSPC)

    Andrew Morton writes,

    If filemap_fdatawrite() returns an error, this might be due to some
    I/O problem: dead disk, unplugged cable, etc. Given the generally
    crappy quality of the kernel's handling of such exceptions, there's a
    good chance that the filemap_fdatawait() will get stuck in D state
    forever.

    So, this patch doesn't wait if filemap_fdatawrite() returns the -EIO.

    Trond, could you please review the nfs part? Especially I'm not sure,
    nfs must use the "filemap_fdatawrite(inode->i_mapping) == 0", or not.

    Acked-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    OGAWA Hirofumi
     

04 Jan, 2006

1 commit


29 Nov, 2005

1 commit


09 Nov, 2005

1 commit

  • This patch removes almost all inclusions of linux/version.h. The 3
    #defines are unused in most of the touched files.

    A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
    unfortunatly in linux/version.h.

    There are also lots of #ifdef for long obsolete kernels, this was not
    touched. In a few places, the linux/version.h include was move to where
    the LINUX_VERSION_CODE was used.

    quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

    search pattern:
    /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

    Signed-off-by: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     

07 Nov, 2005

3 commits

  • This is the fs/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in fs/.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Fix more include file problems that surfaced since I submitted the previous
    fix-missing-includes.patch. This should now allow not to include sched.h
    from module.h, which is done by a followup patch.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     
  • Data allocated with "__getname()" should always be free'd with "__putname()"
    because of the AUDITSYSCALL code.

    Signed-off-by: Davi Arnaut
    Cc:
    Cc: Eric Van Hensbergen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davi Arnaut
     

12 Oct, 2005

1 commit

  • v9fs_file_read and v9fs_file_write use kmalloc to allocate buffers as big
    as the data buffer received as parameter. kmalloc cannot be used to
    allocate buffers bigger than 128K, so reading/writing data in chunks bigger
    than 128k fails.

    This patch reorganizes v9fs_file_read and v9fs_file_write to allocate only
    buffers as big as the maximum data that can be sent in one 9P message.

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

    Latchesar Ionkov