25 Oct, 2016

1 commit

  • Instead use d_fsdata which is the same size. Hoping to get rid of d_time,
    which is used by very few filesystems by this time.

    Signed-off-by: Miklos Szeredi
    Reviewed-by: Martin Brandenburg
    Signed-off-by: Mike Marshall

    Miklos Szeredi
     

29 Sep, 2016

1 commit

  • Pull in an OrangeFS branch containing miscellaneous improvements.

    - clean up debugfs globals
    - remove dead code in sysfs
    - reorganize duplicated sysfs attribute structs
    - consolidate sysfs show and store functions
    - remove duplicated sysfs_ops structures
    - describe organization of sysfs
    - make devreq_mutex static
    - g_orangefs_stats -> orangefs_stats for consistency
    - rename most remaining global variables

    Martin Brandenburg
     

16 Aug, 2016

3 commits


15 Aug, 2016

1 commit

  • Mostly this is moving code into orangefs-debugfs.c so that globals turn
    into static globals.

    Then gossip_debug_mask is renamed orangefs_gossip_debug_mask but keeps
    global visibility, so it can be used from a macro.

    Signed-off-by: Martin Brandenburg

    Martin Brandenburg
     

13 Aug, 2016

1 commit

  • This is a new userspace operation, which will be done if the client-core
    version is greater than or equal to 2.9.6. This will provide a way to
    implement optional features and to determine which features are
    supported by the client-core. If the client-core version is older than
    2.9.6, no optional features are supported and the op will not be done.

    The intent is to allow protocol extensions without relying on the
    client-core's current behavior of ignoring what it doesn't understand.

    Signed-off-by: Martin Brandenburg

    Martin Brandenburg
     

10 Aug, 2016

1 commit


03 Aug, 2016

2 commits


29 Jul, 2016

1 commit

  • Pull vfs updates from Al Viro:
    "Assorted cleanups and fixes.

    Probably the most interesting part long-term is ->d_init() - that will
    have a bunch of followups in (at least) ceph and lustre, but we'll
    need to sort the barrier-related rules before it can get used for
    really non-trivial stuff.

    Another fun thing is the merge of ->d_iput() callers (dentry_iput()
    and dentry_unlink_inode()) and a bunch of ->d_compare() ones (all
    except the one in __d_lookup_lru())"

    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
    fs/dcache.c: avoid soft-lockup in dput()
    vfs: new d_init method
    vfs: Update lookup_dcache() comment
    bdev: get rid of ->bd_inodes
    Remove last traces of ->sync_page
    new helper: d_same_name()
    dentry_cmp(): use lockless_dereference() instead of smp_read_barrier_depends()
    vfs: clean up documentation
    vfs: document ->d_real()
    vfs: merge .d_select_inode() into .d_real()
    unify dentry_iput() and dentry_unlink_inode()
    binfmt_misc: ->s_root is not going anywhere
    drop redundant ->owner initializations
    ufs: get rid of redundant checks
    orangefs: constify inode_operations
    missed comment updates from ->direct_IO() prototype change
    file_inode(f)->i_mapping is f->f_mapping
    trim fsnotify hooks a bit
    9p: new helper - v9fs_parent_fid()
    debugfs: ->d_parent is never NULL or negative
    ...

    Linus Torvalds
     

06 Jul, 2016

3 commits

  • In orangefs_inode_getxattr(), an fsuid is written to dmesg. The kuid is
    converted to a userspace uid via from_kuid(current_user_ns(), [...]), but
    since dmesg is global, init_user_ns should be used here instead.

    In copy_attributes_from_inode(), op_alloc() and fill_default_sys_attrs(),
    upcall structures are populated with uids/gids that have been mapped into
    the caller's namespace. However, those upcall structures are read by
    another process (the userspace filesystem driver), and that process might
    be running in another namespace. This effectively lets any user spoof its
    uid and gid as seen by the userspace filesystem driver.

    To fix the second issue, I just construct the opcall structures with
    init_user_ns uids/gids and require the filesystem server to run in the
    init namespace. Since orangefs is full of global state anyway (as the error
    message in DUMP_DEVICE_ERROR explains, there can only be one userspace
    orangefs filesystem driver at once), that shouldn't be a problem.

    [
    Why does orangefs even exist in the kernel if everything does upcalls into
    userspace? What does orangefs do that couldn't be done with the FUSE
    interface? If there is no good answer to those questions, I'd prefer to see
    orangefs kicked out of the kernel. Can that be done for something that
    shipped in a release?

    According to commit f7ab093f74bf ("Orangefs: kernel client part 1"), they
    even already have a FUSE daemon, and the only rational reason (apart from
    "but most of our users report preferring to use our kernel module instead")
    given for not wanting to use FUSE is one "in-the-works" feature that could
    probably be integated into FUSE instead.
    ]

    This patch has been compile-tested.

    Signed-off-by: Jann Horn
    Signed-off-by: Mike Marshall

    Jann Horn
     
  • Mike,

    On Fri, Jun 3, 2016 at 9:44 PM, Mike Marshall wrote:
    > We use the return value in this one line you changed, our userspace code gets
    > ill when we send it (-ENOMEM +1) as a key length...

    ah, my mistake. Here's a fixed version.

    Thanks,
    Andreas

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Mike Marshall

    Andreas Gruenbacher
     
  • The ORANGEFS_XATTR_INDEX_ defines are unused; the ORANGEFS_XATTR_NAME_
    defines only obfuscate the code.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Mike Marshall

    Andreas Gruenbacher
     

30 May, 2016

1 commit


03 May, 2016

1 commit


26 Mar, 2016

2 commits

  • * switch orangefs_remount() to taking ORANGEFS_SB(sb) instead of sb
    * remove from the list _before_ orangefs_unmount() - request_mutex
    in the latter will make sure that nothing observed in the loop in
    ORANGEFS_DEV_REMOUNT_ALL handling will get freed until the end
    of loop
    * on removal, keep the forward pointer and zero the back one. That
    way we can drop and regain the spinlock in the loop body (again,
    ORANGEFS_DEV_REMOUNT_ALL one) and still be able to get to the
    rest of the list.

    Signed-off-by: Al Viro
    Signed-off-by: Mike Marshall

    Al Viro
     
  • a) open files can't have NULL inodes
    b) it's SEEK_END, not ORANGEFS_SEEK_END; no need to get cute.
    c) make_bad_inode() on lseek()?

    Signed-off-by: Al Viro
    Signed-off-by: Mike Marshall

    Al Viro
     

24 Mar, 2016

5 commits


10 Mar, 2016

1 commit


26 Feb, 2016

2 commits

  • orangefs contains a helper function to calculate the difference
    between two timeval structures. We are trying to remove all
    instances of timespec from the kernel, and this one is not
    used at all, so let's remove it now.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Mike Marshall

    Arnd Bergmann
     
  • The new orangefs code uses a helper function to read a time field to
    its private structures from struct iattr. This will conflict with the
    move to 64-bit timestamps in the kernel and is generally not necessary.

    This replaces the conversion with a simple cast to time64_t that shows
    what is going on. As the orangefs-internal representation already uses
    64-bit timestamps, there should be no ambiguity to negative values,
    and the cast ensures that we treat them as times before 1970 on both
    32-bit and 64-bit architectures, rather than times after 2038. This
    patch keeps that behavior.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Mike Marshall

    Arnd Bergmann
     

25 Feb, 2016

4 commits


20 Feb, 2016

6 commits


05 Feb, 2016

2 commits

  • Thus d_revalidate is not obliged to check on as much, which will
    eventually lead the way to hammering the filesystem servers much less.

    Signed-off-by: Martin Brandenburg
    Signed-off-by: Mike Marshall

    Martin Brandenburg
     
  • A couple of caches were no longer needed:

    - iov_iter improvements to orangefs_devreq_write_iter eliminated
    the need for the dev_req_cache.

    - removal (months ago) of the old AIO code eliminated the need
    for the kiocb_cache.

    Also, deobfuscation of use of GFP_KERNEL when calling kmem_cache_(z)alloc
    for remaining caches.

    Signed-off-by: Mike Marshall

    Mike Marshall
     

29 Jan, 2016

1 commit

  • Previously, it would update a live inode. This was fixed, but it did not
    ever check that the inode attributes in the dcache are correct. This
    checks all inode attributes and rejects any that are not correct, which
    causes a lookup and thus a new getattr.

    Perhaps inode_operations->permission should replace or augment some of
    this.

    There is no actual caching, and this does a rather excessive amount of
    network operations back to the filesystem server.

    Signed-off-by: Martin Brandenburg
    Signed-off-by: Mike Marshall

    Martin Brandenburg
     

24 Jan, 2016

1 commit

  • fold orangefs_op_initialize() in there, don't bother locking something
    nobody else could've seen yet, use kmem_cache_zalloc() instead of
    explicit memset()...

    Signed-off-by: Al Viro
    Signed-off-by: Mike Marshall

    Al Viro