11 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
    fs/9p: iattr_valid flags are kernel internal flags map them to 9p values.
    fs/9p: We should not allocate a new inode when creating hardlines.
    fs/9p: v9fs_stat2inode should update suid/sgid bits.
    9p: Reduce object size with CONFIG_NET_9P_DEBUG
    fs/9p: check schedule_timeout_interruptible return value

    Fix up trivial conflicts in fs/9p/{vfs_inode.c,vfs_inode_dotl.c} due to
    debug messages having changed to use p9_debug() on one hand, and the
    changes for umode_t on the other.

    Linus Torvalds
     

07 Jan, 2012

1 commit


06 Jan, 2012

4 commits

  • Don't do new_inode_from fid in case of hardlink creation. This ensures
    that link count for hardlink files get updated properly. Earlier link count
    was not updated on removing a hardlink with cache mode enabled.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • Create a new helper that update the permission bits and use
    that, instead of opencoding the logic.

    Reported and bisected by: M. Mohan Kumar
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • Reduce object size by deduplicating formats.

    Use vsprintf extension %pV.
    Rename P9_DPRINTK uses to p9_debug, align arguments.
    Add function for _p9_debug and macro to add __func__.
    Add missing "\n"s to p9_debug uses.
    Remove embedded function names as p9_debug adds it.
    Remove P9_EPRINTK macro and convert use to pr_.
    Add and use pr_fmt and pr_.

    $ size fs/9p/built-in.o*
    text data bss dec hex filename
    62133 984 16000 79117 1350d fs/9p/built-in.o.new
    67342 984 16928 85254 14d06 fs/9p/built-in.o.old
    $ size net/9p/built-in.o*
    text data bss dec hex filename
    88792 4148 22024 114964 1c114 net/9p/built-in.o.new
    94072 4148 23232 121452 1da6c net/9p/built-in.o.old

    Signed-off-by: Joe Perches
    Signed-off-by: Eric Van Hensbergen

    Joe Perches
     
  • In v9fs_file_do_lock() we need to check return value of
    schedule_timeout_interruptible() and exit the loop when it
    returns nonzero, otherwise the loop is not really interruptible
    and after the signal, the loop is no longer throttled by
    P9_LOCK_TIMEOUT.

    Signed-off-by: Jim Garlick
    Signed-off-by: Eric Van Hensbergen

    Jim Garlick
     

04 Jan, 2012

6 commits


02 Nov, 2011

1 commit


25 Oct, 2011

4 commits

  • This helps in more control over debugging.
    root@qemu-img-64:~# ls /pass/123
    ls: cannot access /pass/123: No such file or directory
    root@qemu-img-64:~# cat /sys/kernel/debug/tracing/trace
    # tracer: nop
    #
    # TASK-PID CPU# TIMESTAMP FUNCTION
    # | | | | |
    ls-1536 [001] 70.928584: 9p_protocol_dump: clnt 18446612132784021504 P9_TWALK(tag = 1)
    000: 16 00 00 00 6e 01 00 01 00 00 00 02 00 00 00 01
    010: 00 03 00 31 32 33 00 00 00 ff ff ff ff 00 00 00

    ls-1536 [001] 70.928587:
    => trace_9p_protocol_dump
    => p9pdu_finalize
    => p9_client_rpc
    => p9_client_walk
    => v9fs_vfs_lookup
    => d_alloc_and_lookup
    => walk_component
    => path_lookupat
    ls-1536 [000] 70.929696: 9p_protocol_dump: clnt 18446612132784021504 P9_RLERROR(tag = 1)
    000: 0b 00 00 00 07 01 00 02 00 00 00 4e 03 00 02 00
    010: 00 00 00 00 03 00 02 00 00 00 00 00 ff 43 00 00

    ls-1536 [000] 70.929697:
    => trace_9p_protocol_dump
    => p9_client_rpc
    => p9_client_walk
    => v9fs_vfs_lookup
    => d_alloc_and_lookup
    => walk_component
    => path_lookupat
    => do_path_lookup

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • Instead of saying all integer argument option should be listed in the beginning
    move integer parsing to each option type.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • * remove lot of update to different data structure
    * add a seperate callback for zero copy request.
    * above makes non zero copy code path simpler
    * remove conditionalizing TREAD/TREADDIR/TWRITE in the zero copy path
    * Fix the dotu p9_check_errors with zero copy. Add sufficient doc around
    * Add support for both in and output buffers in zero copy callback
    * pin and unpin pages in the same context
    * use helpers instead of defining page offset and rest of page ourself
    * Fix mem leak in p9_check_errors
    * Remove 'E' and 'F' in p9pdu_vwritef

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     

06 Sep, 2011

5 commits


01 Aug, 2011

2 commits


26 Jul, 2011

7 commits

  • Commit 4e34e719e457 ("fs: take the ACL checks to common code") removed
    the use of the 'acl' variable in v9fs_iop_get_acl(), but left the
    variable definition around. Remove it to get rid of the warning:

    fs/9p/acl.c: In function ‘v9fs_iop_get_acl’:
    fs/9p/acl.c:101:20: warning: unused variable ‘acl’

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    fs: take the ACL checks to common code
    bury posix_acl_..._masq() variants
    kill boilerplates around posix_acl_create_masq()
    generic_acl: no need to clone acl just to push it to set_cached_acl()
    kill boilerplate around posix_acl_chmod_masq()
    reiserfs: cache negative ACLs for v1 stat format
    xfs: cache negative ACLs if there is no attribute fork
    9p: do no return 0 from ->check_acl without actually checking
    vfs: move ACL cache lookup into generic code
    CIFS: Fix oops while mounting with prefixpath
    xfs: Fix wrong return value of xfs_file_aio_write
    fix devtmpfs race
    caam: don't pass bogus S_IFCHR to debugfs_create_...()
    get rid of create_proc_entry() abuses - proc_mkdir() is there for purpose
    asus-wmi: ->is_visible() can't return negative
    fix jffs2 ACLs on big-endian with 16bit mode_t
    9p: close ACL leaks
    ocfs2_init_acl(): fix a leak
    VFS : mount lock scalability for internal mounts

    Linus Torvalds
     
  • Replace the ->check_acl method with a ->get_acl method that simply reads an
    ACL from disk after having a cache miss. This means we can replace the ACL
    checking boilerplate code with a single implementation in namei.c.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • new helper: posix_acl_create(&acl, gfp, mode_p). Replaces acl with
    modified clone, on failure releases acl and replaces with NULL.
    Returns 0 or -ve on error. All callers of posix_acl_create_masq()
    switched.

    Signed-off-by: Al Viro

    Al Viro
     
  • new helper: posix_acl_chmod(&acl, gfp, mode). Replaces acl with modified
    clone or with NULL if that has failed; returns 0 or -ve on error. All
    callers of posix_acl_chmod_masq() switched to that - they'd been doing
    exactly the same thing.

    Signed-off-by: Al Viro

    Al Viro
     
  • If we do not want to use ACLs we at least need to perform normal Unix
    permission checks. From the comment I'm not quite sure that's what
    is intended, but if 0p wants to do permission checks entirely on the
    server it needs to do so in ->permission, not in ->check_acl.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • This moves logic for checking the cached ACL values from low-level
    filesystems into generic code. The end result is a streamlined ACL
    check that doesn't need to load the inode->i_op->check_acl pointer at
    all for the common cached case.

    The filesystems also don't need to check for a non-blocking RCU walk
    case in their acl_check() functions, because that is all handled at a
    VFS layer.

    Signed-off-by: Linus Torvalds
    Signed-off-by: Al Viro

    Linus Torvalds
     

24 Jul, 2011

1 commit


23 Jul, 2011

6 commits

  • unlinkat - Remove a directory entry

    size[4] Tunlinkat tag[2] dirfid[4] name[s] flag[4]
    size[4] Runlinkat tag[2]

    older Tremove have the below request format

    size[4] Tremove tag[2] fid[4]

    The remove message is used to remove a directory entry either file or directory
    The remove opreation is actually a directory opertation and should ideally have
    dirfid, if not we cannot represent the fid on server with anything other than
    name. We will have to derive the directory name from fid in the Tremove request.

    NOTE: The operation doesn't clunk the unlink fid.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • renameat - change name of file or directory

    size[4] Trenameat tag[2] olddirfid[4] oldname[s] newdirfid[4] newname[s]
    size[4] Rrenameat tag[2]

    older Trename have the below request format

    size[4] Trename tag[2] fid[4] newdirfid[4] name[s]

    The rename message is used to change the name of a file, possibly moving it
    to a new directory. The rename opreation is actually a directory opertation
    and should ideally have olddirfid, if not we cannot represent the fid on server
    with anything other than name. We will have to derive the old directory name
    from fid in the Trename request.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • This make sure we don't end up reusing the unlinked inode object.
    The ideal way is to use inode i_generation. But i_generation is
    not available in userspace always.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • Without this fix, if any invalid mount options/args are passed while mouting
    the 9p fs, no error (-EINVAL) is returned and default arg value is assigned.

    This fix returns -EINVAL when an invalid arguement is found while parsing
    mount options.

    Signed-off-by: Prem Karat
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Prem Karat
     
  • This make sure we don't use wrong inode from the inode hash. The inode number
    of the file deleted is reused by the next file system object created
    and if we only use inode number for inode hash lookup we could end up
    with wrong struct inode.

    Also compare inode generation number. Not all Linux file system provide
    st_gen in userspace. So it could be 0;

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     
  • Now that VFS does the right thing remove the work around.

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Eric Van Hensbergen

    Aneesh Kumar K.V
     

21 Jul, 2011

1 commit

  • Btrfs needs to be able to control how filemap_write_and_wait_range() is called
    in fsync to make it less of a painful operation, so push down taking i_mutex and
    the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some
    file systems can drop taking the i_mutex altogether it seems, like ext3 and
    ocfs2. For correctness sake I just pushed everything down in all cases to make
    sure that we keep the current behavior the same for everybody, and then each
    individual fs maintainer can make up their mind about what to do from there.
    Thanks,

    Acked-by: Jan Kara
    Signed-off-by: Josef Bacik
    Signed-off-by: Al Viro

    Josef Bacik
     

20 Jul, 2011

1 commit