15 Aug, 2018

2 commits

  • Pointer orangefs_inode is being assigned but is never used hence it is
    redundant and can be removed.

    Cleans up clang warning:
    warning: variable 'orangefs_inode' set but not used [-Wunused-but-set-variable]

    Signed-off-by: Colin Ian King
    Signed-off-by: Mike Marshall

    Colin Ian King
     
  • Use new return type vm_fault_t for fault handler. For now,
    this is just documenting that the function returns a VM_FAULT
    value rather than an errno. Once all instances are converted,
    vm_fault_t will become a distinct type.

    See the following
    commit 1c8f422059ae ("mm: change return type to vm_fault_t")

    Fixed checkpatch.pl warning.

    Signed-off-by: Souptick Joarder
    Signed-off-by: Mike Marshall

    Souptick Joarder
     

17 Jun, 2018

1 commit

  • Pull documentation fixes from Mauro Carvalho Chehab:
    "This solves a series of broken links for files under Documentation,
    and improves a script meant to detect such broken links (see
    scripts/documentation-file-ref-check).

    The changes on this series are:

    - can.rst: fix a footnote reference;

    - crypto_engine.rst: Fix two parsing warnings;

    - Fix a lot of broken references to Documentation/*;

    - improve the scripts/documentation-file-ref-check script, in order
    to help detecting/fixing broken references, preventing
    false-positives.

    After this patch series, only 33 broken references to doc files are
    detected by scripts/documentation-file-ref-check"

    * tag 'docs-broken-links' of git://linuxtv.org/mchehab/experimental: (26 commits)
    fix a series of Documentation/ broken file name references
    Documentation: rstFlatTable.py: fix a broken reference
    ABI: sysfs-devices-system-cpu: remove a broken reference
    devicetree: fix a series of wrong file references
    devicetree: fix name of pinctrl-bindings.txt
    devicetree: fix some bindings file names
    MAINTAINERS: fix location of DT npcm files
    MAINTAINERS: fix location of some display DT bindings
    kernel-parameters.txt: fix pointers to sound parameters
    bindings: nvmem/zii: Fix location of nvmem.txt
    docs: Fix more broken references
    scripts/documentation-file-ref-check: check tools/*/Documentation
    scripts/documentation-file-ref-check: get rid of false-positives
    scripts/documentation-file-ref-check: hint: dash or underline
    scripts/documentation-file-ref-check: add a fix logic for DT
    scripts/documentation-file-ref-check: accept more wildcards at filenames
    scripts/documentation-file-ref-check: fix help message
    media: max2175: fix location of driver's companion documentation
    media: v4l: fix broken video4linux docs locations
    media: dvb: point to the location of the old README.dvb-usb file
    ...

    Linus Torvalds
     

16 Jun, 2018

2 commits


15 Jun, 2018

2 commits

  • no need to mess with copy_in_user(), etc...

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull inode timestamps conversion to timespec64 from Arnd Bergmann:
    "This is a late set of changes from Deepa Dinamani doing an automated
    treewide conversion of the inode and iattr structures from 'timespec'
    to 'timespec64', to push the conversion from the VFS layer into the
    individual file systems.

    As Deepa writes:

    'The series aims to switch vfs timestamps to use struct timespec64.
    Currently vfs uses struct timespec, which is not y2038 safe.

    The series involves the following:
    1. Add vfs helper functions for supporting struct timepec64
    timestamps.
    2. Cast prints of vfs timestamps to avoid warnings after the switch.
    3. Simplify code using vfs timestamps so that the actual replacement
    becomes easy.
    4. Convert vfs timestamps to use struct timespec64 using a script.
    This is a flag day patch.

    Next steps:
    1. Convert APIs that can handle timespec64, instead of converting
    timestamps at the boundaries.
    2. Update internal data structures to avoid timestamp conversions'

    Thomas Gleixner adds:

    'I think there is no point to drag that out for the next merge
    window. The whole thing needs to be done in one go for the core
    changes which means that you're going to play that catchup game
    forever. Let's get over with it towards the end of the merge window'"

    * tag 'vfs-timespec64' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground:
    pstore: Remove bogus format string definition
    vfs: change inode times to use struct timespec64
    pstore: Convert internal records to timespec64
    udf: Simplify calls to udf_disk_stamp_to_time
    fs: nfs: get rid of memcpys for inode times
    ceph: make inode time prints to be long long
    lustre: Use long long type to print inode time
    fs: add timespec64_truncate()

    Linus Torvalds
     

14 Jun, 2018

1 commit

  • Pull the timespec64 conversion from Deepa Dinamani:
    "The series aims to switch vfs timestamps to use
    struct timespec64. Currently vfs uses struct timespec,
    which is not y2038 safe.

    The flag patch applies cleanly. I've not seen the timestamps
    update logic change often. The series applies cleanly on 4.17-rc6
    and linux-next tip (top commit: next-20180517).

    I'm not sure how to merge this kind of a series with a flag patch.
    We are targeting 4.18 for this.
    Let me know if you have other suggestions.

    The series involves the following:
    1. Add vfs helper functions for supporting struct timepec64 timestamps.
    2. Cast prints of vfs timestamps to avoid warnings after the switch.
    3. Simplify code using vfs timestamps so that the actual
    replacement becomes easy.
    4. Convert vfs timestamps to use struct timespec64 using a script.
    This is a flag day patch.

    I've tried to keep the conversions with the script simple, to
    aid in the reviews. I've kept all the internal filesystem data
    structures and function signatures the same.

    Next steps:
    1. Convert APIs that can handle timespec64, instead of converting
    timestamps at the boundaries.
    2. Update internal data structures to avoid timestamp conversions."

    I've pulled it into a branch based on top of the NFS changes that
    are now in mainline, so I could resolve the non-obvious conflict
    between the two while merging.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

08 Jun, 2018

1 commit

  • Pull orangefs updates from Mike Marshall:
    "Fixes and cleanups:

    - fix some sparse warnings

    - cleanup some code formatting

    - fix up some attribute/meta-data related code"

    * tag 'for-linus-4.18-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
    orangefs: use sparse annotations for holding locks across function calls.
    orangefs: make debug_help_fops static
    orangefs: remove unused function orangefs_get_bufmap_init
    orangefs: specify user pointers when using dev_map_desc and bufmap
    orangefs: formatting cleanups
    orangefs: set i_size on new symlink
    orangefs: report attributes_mask and attributes for statx
    orangefs: make struct orangefs_file_vm_ops static
    orangefs: revamp block sizes

    Linus Torvalds
     

06 Jun, 2018

1 commit

  • struct timespec is not y2038 safe. Transition vfs to use
    y2038 safe struct timespec64 instead.

    The change was made with the help of the following cocinelle
    script. This catches about 80% of the changes.
    All the header file and logic changes are included in the
    first 5 rules. The rest are trivial substitutions.
    I avoid changing any of the function signatures or any other
    filesystem specific data structures to keep the patch simple
    for review.

    The script can be a little shorter by combining different cases.
    But, this version was sufficient for my usecase.

    virtual patch

    @ depends on patch @
    identifier now;
    @@
    - struct timespec
    + struct timespec64
    current_time ( ... )
    {
    - struct timespec now = current_kernel_time();
    + struct timespec64 now = current_kernel_time64();
    ...
    - return timespec_trunc(
    + return timespec64_trunc(
    ... );
    }

    @ depends on patch @
    identifier xtime;
    @@
    struct \( iattr \| inode \| kstat \) {
    ...
    - struct timespec xtime;
    + struct timespec64 xtime;
    ...
    }

    @ depends on patch @
    identifier t;
    @@
    struct inode_operations {
    ...
    int (*update_time) (...,
    - struct timespec t,
    + struct timespec64 t,
    ...);
    ...
    }

    @ depends on patch @
    identifier t;
    identifier fn_update_time =~ "update_time$";
    @@
    fn_update_time (...,
    - struct timespec *t,
    + struct timespec64 *t,
    ...) { ... }

    @ depends on patch @
    identifier t;
    @@
    lease_get_mtime( ... ,
    - struct timespec *t
    + struct timespec64 *t
    ) { ... }

    @te depends on patch forall@
    identifier ts;
    local idexpression struct inode *inode_node;
    identifier i_xtime =~ "^i_[acm]time$";
    identifier ia_xtime =~ "^ia_[acm]time$";
    identifier fn_update_time =~ "update_time$";
    identifier fn;
    expression e, E3;
    local idexpression struct inode *node1;
    local idexpression struct inode *node2;
    local idexpression struct iattr *attr1;
    local idexpression struct iattr *attr2;
    local idexpression struct iattr attr;
    identifier i_xtime1 =~ "^i_[acm]time$";
    identifier i_xtime2 =~ "^i_[acm]time$";
    identifier ia_xtime1 =~ "^ia_[acm]time$";
    identifier ia_xtime2 =~ "^ia_[acm]time$";
    @@
    (
    (
    - struct timespec ts;
    + struct timespec64 ts;
    |
    - struct timespec ts = current_time(inode_node);
    + struct timespec64 ts = current_time(inode_node);
    )

    i_xtime, &ts)
    + timespec64_equal(&inode_node->i_xtime, &ts)
    |
    - timespec_equal(&ts, &inode_node->i_xtime)
    + timespec64_equal(&ts, &inode_node->i_xtime)
    |
    - timespec_compare(&inode_node->i_xtime, &ts)
    + timespec64_compare(&inode_node->i_xtime, &ts)
    |
    - timespec_compare(&ts, &inode_node->i_xtime)
    + timespec64_compare(&ts, &inode_node->i_xtime)
    |
    ts = current_time(e)
    |
    fn_update_time(..., &ts,...)
    |
    inode_node->i_xtime = ts
    |
    node1->i_xtime = ts
    |
    ts = inode_node->i_xtime
    |
    ia_xtime ...+> = ts
    |
    ts = attr1->ia_xtime
    |
    ts.tv_sec
    |
    ts.tv_nsec
    |
    btrfs_set_stack_timespec_sec(..., ts.tv_sec)
    |
    btrfs_set_stack_timespec_nsec(..., ts.tv_nsec)
    |
    - ts = timespec64_to_timespec(
    + ts =
    ...
    -)
    |
    - ts = ktime_to_timespec(
    + ts = ktime_to_timespec64(
    ...)
    |
    - ts = E3
    + ts = timespec_to_timespec64(E3)
    |
    - ktime_get_real_ts(&ts)
    + ktime_get_real_ts64(&ts)
    |
    fn(...,
    - ts
    + timespec64_to_timespec(ts)
    ,...)
    )
    ...+>
    (

    )
    |
    - timespec_equal(&node1->i_xtime1, &node2->i_xtime2)
    + timespec64_equal(&node1->i_xtime2, &node2->i_xtime2)
    |
    - timespec_equal(&node1->i_xtime1, &attr2->ia_xtime2)
    + timespec64_equal(&node1->i_xtime2, &attr2->ia_xtime2)
    |
    - timespec_compare(&node1->i_xtime1, &node2->i_xtime2)
    + timespec64_compare(&node1->i_xtime1, &node2->i_xtime2)
    |
    node1->i_xtime1 =
    - timespec_trunc(attr1->ia_xtime1,
    + timespec64_trunc(attr1->ia_xtime1,
    ...)
    |
    - attr1->ia_xtime1 = timespec_trunc(attr2->ia_xtime2,
    + attr1->ia_xtime1 = timespec64_trunc(attr2->ia_xtime2,
    ...)
    |
    - ktime_get_real_ts(&attr1->ia_xtime1)
    + ktime_get_real_ts64(&attr1->ia_xtime1)
    |
    - ktime_get_real_ts(&attr.ia_xtime1)
    + ktime_get_real_ts64(&attr.ia_xtime1)
    )

    @ depends on patch @
    struct inode *node;
    struct iattr *attr;
    identifier fn;
    identifier i_xtime =~ "^i_[acm]time$";
    identifier ia_xtime =~ "^ia_[acm]time$";
    expression e;
    @@
    (
    - fn(node->i_xtime);
    + fn(timespec64_to_timespec(node->i_xtime));
    |
    fn(...,
    - node->i_xtime);
    + timespec64_to_timespec(node->i_xtime));
    |
    - e = fn(attr->ia_xtime);
    + e = fn(timespec64_to_timespec(attr->ia_xtime));
    )

    @ depends on patch forall @
    struct inode *node;
    struct iattr *attr;
    identifier i_xtime =~ "^i_[acm]time$";
    identifier ia_xtime =~ "^ia_[acm]time$";
    identifier fn;
    @@
    {
    + struct timespec ts;
    i_xtime);
    fn (...,
    - &node->i_xtime,
    + &ts,
    ...);
    |
    + ts = timespec64_to_timespec(attr->ia_xtime);
    fn (...,
    - &attr->ia_xtime,
    + &ts,
    ...);
    )
    ...+>
    }

    @ depends on patch forall @
    struct inode *node;
    struct iattr *attr;
    struct kstat *stat;
    identifier ia_xtime =~ "^ia_[acm]time$";
    identifier i_xtime =~ "^i_[acm]time$";
    identifier xtime =~ "^[acm]time$";
    identifier fn, ret;
    @@
    {
    + struct timespec ts;
    i_xtime);
    ret = fn (...,
    - &node->i_xtime,
    + &ts,
    ...);
    |
    + ts = timespec64_to_timespec(node->i_xtime);
    ret = fn (...,
    - &node->i_xtime);
    + &ts);
    |
    + ts = timespec64_to_timespec(attr->ia_xtime);
    ret = fn (...,
    - &attr->ia_xtime,
    + &ts,
    ...);
    |
    + ts = timespec64_to_timespec(attr->ia_xtime);
    ret = fn (...,
    - &attr->ia_xtime);
    + &ts);
    |
    + ts = timespec64_to_timespec(stat->xtime);
    ret = fn (...,
    - &stat->xtime);
    + &ts);
    )
    ...+>
    }

    @ depends on patch @
    struct inode *node;
    struct inode *node2;
    identifier i_xtime1 =~ "^i_[acm]time$";
    identifier i_xtime2 =~ "^i_[acm]time$";
    identifier i_xtime3 =~ "^i_[acm]time$";
    struct iattr *attrp;
    struct iattr *attrp2;
    struct iattr attr ;
    identifier ia_xtime1 =~ "^ia_[acm]time$";
    identifier ia_xtime2 =~ "^ia_[acm]time$";
    struct kstat *stat;
    struct kstat stat1;
    struct timespec64 ts;
    identifier xtime =~ "^[acmb]time$";
    expression e;
    @@
    (
    ( node->i_xtime2 \| attrp->ia_xtime2 \| attr.ia_xtime2 \) = node->i_xtime1 ;
    |
    node->i_xtime2 = \( node2->i_xtime1 \| timespec64_trunc(...) \);
    |
    node->i_xtime2 = node->i_xtime1 = node->i_xtime3 = \(ts \| current_time(...) \);
    |
    node->i_xtime1 = node->i_xtime3 = \(ts \| current_time(...) \);
    |
    stat->xtime = node2->i_xtime1;
    |
    stat1.xtime = node2->i_xtime1;
    |
    ( node->i_xtime2 \| attrp->ia_xtime2 \) = attrp->ia_xtime1 ;
    |
    ( attrp->ia_xtime1 \| attr.ia_xtime1 \) = attrp2->ia_xtime2;
    |
    - e = node->i_xtime1;
    + e = timespec64_to_timespec( node->i_xtime1 );
    |
    - e = attrp->ia_xtime1;
    + e = timespec64_to_timespec( attrp->ia_xtime1 );
    |
    node->i_xtime1 = current_time(...);
    |
    node->i_xtime2 = node->i_xtime1 = node->i_xtime3 =
    - e;
    + timespec_to_timespec64(e);
    |
    node->i_xtime1 = node->i_xtime3 =
    - e;
    + timespec_to_timespec64(e);
    |
    - node->i_xtime1 = e;
    + node->i_xtime1 = timespec_to_timespec64(e);
    )

    Signed-off-by: Deepa Dinamani
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:
    Cc:

    Deepa Dinamani
     

02 Jun, 2018

9 commits

  • Sparse complained and Al Viro knew what to do...

    Signed-off-by: Mike Marshall

    Mike Marshall
     
  • Signed-off-by: Mike Marshall

    Mike Marshall
     
  • get_bufmap_init is used in the out-of-tree module, but was left in
    the upstream version as an oversight. Tip-of-the-hat to sparse and Al Viro.

    Signed-off-by: Mike Marshall

    Mike Marshall
     
  • Sparse lead me to the dev_map_desc one and Al Viro lead me to the bufmap
    one.

    Signed-off-by: Mike Marshall

    Mike Marshall
     
  • Signed-off-by: Mike Marshall

    Mike Marshall
     
  • As long as a symlink inode remains in-core, the destination (and
    therefore size) will not be re-fetched from the server, as it cannot
    change. The original implementation of the attribute cache assumed that
    setting the expiry time in the past was sufficient to cause a re-fetch
    of all attributes on the next getattr. That does not work in this case.

    The bug manifested itself as follows. When the command sequence

    touch foo; ln -s foo bar; ls -l bar

    is run, the output was

    lrwxrwxrwx. 1 fedora fedora 4906 Apr 24 19:10 bar -> foo

    However, after a re-mount, ls -l bar produces

    lrwxrwxrwx. 1 fedora fedora 3 Apr 24 19:10 bar -> foo

    After this commit, even before a re-mount, the output is

    lrwxrwxrwx. 1 fedora fedora 3 Apr 24 19:10 bar -> foo

    Reported-by: Becky Ligon
    Signed-off-by: Martin Brandenburg
    Fixes: 71680c18c8f2 ("orangefs: Cache getattr results.")
    Cc: stable@vger.kernel.org
    Cc: hubcap@omnibond.com
    Signed-off-by: Mike Marshall

    Martin Brandenburg
     
  • OrangeFS formerly failed to set attributes_mask with the result that
    software could not see immutable and append flags present in the
    filesystem.

    Reported-by: Becky Ligon
    Signed-off-by: Martin Brandenburg
    Fixes: 68a24a6cc4a6 ("orangefs: implement statx")
    Cc: stable@vger.kernel.org
    Cc: hubcap@omnibond.com
    Signed-off-by: Mike Marshall

    Martin Brandenburg
     
  • The struct orangefs_file_vm_ops is local to the source and does not need
    to be in global scope, so make it static.

    Cleans up sparse warning:
    fs/orangefs/file.c:547:35: warning: symbol 'orangefs_file_vm_ops' was not
    declared. Should it be static?

    Signed-off-by: Colin Ian King
    Signed-off-by: Mike Marshall

    Colin Ian King
     
  • Now the superblock block size is PAGE_SIZE. The inode block size is
    PAGE_SIZE for directories and symlinks, but is the server-reported
    block size for regular files.

    The block size in the OrangeFS private inode is now deleted. Stat
    now reports PAGE_SIZE for directories and symlinks and the
    server-reported block size for regular files.

    The user-space visible change is that the block size for directores
    and symlinks and the superblock is now PAGE_SIZE rather than the size of
    the client-core shared memory buffers, which was typically four
    megabytes.

    Reported-by: Becky Ligon
    Signed-off-by: Martin Brandenburg
    Cc: hubcap@omnibond.com
    Cc: walt@omnibond.com
    Signed-off-by: Mike Marshall

    Martin Brandenburg
     

23 May, 2018

1 commit


12 May, 2018

1 commit

  • For anything NFS-exported we do _not_ want to unlock new inode
    before it has grown an alias; original set of fixes got the
    ordering right, but missed the nasty complication in case of
    lockdep being enabled - unlock_new_inode() does
    lockdep_annotate_inode_mutex_key(inode)
    which can only be done before anyone gets a chance to touch
    ->i_mutex. Unfortunately, flipping the order and doing
    unlock_new_inode() before d_instantiate() opens a window when
    mkdir can race with open-by-fhandle on a guessed fhandle, leading
    to multiple aliases for a directory inode and all the breakage
    that follows from that.

    Correct solution: a new primitive (d_instantiate_new())
    combining these two in the right order - lockdep annotate, then
    d_instantiate(), then the rest of unlock_new_inode(). All
    combinations of d_instantiate() with unlock_new_inode() should
    be converted to that.

    Cc: stable@kernel.org # 2.6.29 and later
    Tested-by: Mike Marshall
    Reviewed-by: Andreas Dilger
    Signed-off-by: Al Viro

    Al Viro
     

16 Apr, 2018

1 commit


10 Apr, 2018

1 commit

  • Pull orangefs updates from Mike Marshall:
    "Fixes and cleanups:

    - Documentation cleanups

    - removal of unused code

    - make some structs static

    - implement Orangefs vm_operations fault callout

    - eliminate two single-use functions and put their cleaned up code in
    line.

    - replace a vmalloc/memset instance with vzalloc

    - fix a race condition bug in wait code"

    * tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
    Orangefs: documentation updates
    orangefs: document package install and xfstests procedure
    orangefs: remove unused code
    orangefs: make several *_operations structs static
    orangefs: implement vm_ops->fault
    orangefs: open code short single-use functions
    orangefs: replace vmalloc and memset with vzalloc
    orangefs: bug fix for a race condition when getting a slot

    Linus Torvalds
     

07 Apr, 2018

1 commit

  • Pull misc vfs updates from Al Viro:
    "Assorted stuff, including Christoph's I_DIRTY patches"

    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: move I_DIRTY_INODE to fs.h
    ubifs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call
    ntfs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call
    gfs2: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) calls
    fs: fold open_check_o_direct into do_dentry_open
    vfs: Replace stray non-ASCII homoglyph characters with their ASCII equivalents
    vfs: make sure struct filename->iname is word-aligned
    get rid of pointless includes of fs_struct.h
    [poll] annotate SAA6588_CMD_POLL users

    Linus Torvalds
     

04 Apr, 2018

3 commits

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

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

    Martin Brandenburg
     
  • Must retrieve size before running filemap_fault so the kernel has
    an up-to-date size.

    This should have been caught by xfstests generic/246, but it was masked
    by orangefs_new_inode, which set i_size to PAGE_SIZE. When nothing
    caused a getattr prior to a pagefault, i_size was still PAGE_SIZE.
    Since xfstests only read 10 bytes, it did not catch this bug.

    When orangefs_new_inode was modified to perform a getattr instead,
    i_size was set to zero, as it was a newly created file. Then
    orangefs_file_write_iter did NOT set i_size. Instead it invalidated the
    attribute cache, which should have caused the next caller to retrieve
    i_size. But the fault handler did not know it was supposed to retrieve
    i_size. So during xfstests, i_size was still zero, and filemap_fault
    returned VM_FAULT_SIGBUS.

    Fixes xfstests generic/452.

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

    Martin Brandenburg
     

02 Apr, 2018

3 commits

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

    Martin Brandenburg
     
  • Use vzalloc instead of the vmalloc, memset combo

    Signed-off-by: Colin Ian King
    Signed-off-by: Mike Marshall

    Colin Ian King
     
  • When a slot becomes free, call wake_up_locked regardless of the number
    of slots available.

    Without this patch, wake_up_locked is only called when going from no
    free slots to one. This means that there is a chance a waiting task
    will not be woken up. In many cases, the system will bounce between 0
    and 1 free slots, and the waiting tasks will be woken up. But if there
    is still a waiting task and another slot becomes available before the
    number of free slots reaches zero, that waiting task may never be woken
    up since the number of free slots may never reach zero again.

    The bug behavior is easy to reproduce with the following script,
    where /mnt/orangefs is an OrangeFS file system.

    for i in {1..100}; do
    for j in {1..20}; do
    dd if=/dev/zero of=/mnt/orangefs/tmp$j bs=32768 count=32 &
    done
    wait
    done

    Signed-off-by: David Reynolds
    Reviewed-by: Martin Brandenburg
    Signed-off-by: Mike Marshall

    David Reynolds
     

27 Mar, 2018

1 commit


23 Feb, 2018

1 commit


12 Feb, 2018

1 commit

  • This is the mindless scripted replacement of kernel use of POLL*
    variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
    L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
    for f in $L; do sed -i "-es/^\([^\"]*\)\(\\)/\\1E\\2/" $f; done
    done

    with de-mangling cleanups yet to come.

    NOTE! On almost all architectures, the EPOLL* constants have the same
    values as the POLL* constants do. But they keyword here is "almost".
    For various bad reasons they aren't the same, and epoll() doesn't
    actually work quite correctly in some cases due to this on Sparc et al.

    The next patch from Al will sort out the final differences, and we
    should be all done.

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

    Linus Torvalds
     

09 Feb, 2018

1 commit

  • Pull orangefs updates from Mike Marshall:
    "Mostly cleanups, but three bug fixes:

    - don't pass garbage return codes back up the call chain (Mike
    Marshall)

    - fix stale inode test (Martin Brandenburg)

    - fix off-by-one errors (Xiongfeng Wang)

    Also add Martin as a reviewer in the Maintainers file"

    * tag 'for-linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
    orangefs: reverse sense of is-inode-stale test in d_revalidate
    orangefs: simplify orangefs_inode_is_stale
    Orangefs: don't propogate whacky error codes
    orangefs: use correct string length
    orangefs: make orangefs_make_bad_inode static
    orangefs: remove ORANGEFS_KERNEL_DEBUG
    orangefs: remove gossip_ldebug and gossip_lerr
    orangefs: make orangefs_client_debug_init static
    MAINTAINERS: update orangefs list and add myself as reviewer

    Linus Torvalds
     

07 Feb, 2018

6 commits

  • If a dentry is deleted, then a dentry is recreated with the same handle
    but a different type (i.e. it was a file and now it's a symlink), then
    its a different inode. The check was backwards, so d_revalidate would
    not have noticed.

    Due to the design of the OrangeFS server, this is rather unlikely.

    It's also possible for the dentry to be deleted and recreated with the
    same type. This would be undetectable. It's a bit of a ship of
    Theseus.

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

    Martin Brandenburg
     
  • Check whether this is a new inode at location of call.

    Raises the question of what to do with an unknown inode type. Old code
    would've marked the inode bad and returned ESTALE.

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

    Martin Brandenburg
     
  • When we get an error return code from userspace (the client-core)
    we check to make sure it is a valid code.

    This patch maps the whacky return code to -EINVAL instead of
    propagating garbage back up the call chain potentially resulting
    in a hard-to-find train-wreck.

    The client-core doesn't have any business returning whacky return
    codes, but if it does, we don't want the kernel to crash as a result.

    Signed-off-by: Mike Marshall

    Mike Marshall
     
  • gcc-8 reports

    fs/orangefs/dcache.c: In function 'orangefs_d_revalidate':
    ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
    bound 256 equals destination size [-Wstringop-truncation]

    fs/orangefs/namei.c: In function 'orangefs_rename':
    ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
    bound 256 equals destination size [-Wstringop-truncation]

    fs/orangefs/super.c: In function 'orangefs_mount':
    ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
    bound 256 equals destination size [-Wstringop-truncation]

    We need one less byte or call strlcpy() to make it a nul-terminated
    string.

    Signed-off-by: Xiongfeng Wang
    Signed-off-by: Mike Marshall

    Xiongfeng Wang
     
  • Signed-off-by: Martin Brandenburg
    Signed-off-by: Mike Marshall

    Martin Brandenburg
     
  • It wasn't possible to enable it, and it would've had very little effect.

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

    Martin Brandenburg