19 Feb, 2015

1 commit

  • Pull MTD updates from Brian Norris:
    "NAND:

    - Add new Hisilicon NAND driver for Hip04
    - Add default reboot handler, to ensure all outstanding erase
    transactions complete in time
    - jz4740: convert to use GPIO descriptor API
    - Atmel: add support for sama5d4
    - Change default bitflip threshold to 75% of correction strength
    - Miscellaneous cleanups and bugfixes

    SPI NOR:

    - Freescale QuadSPI:
    - Fix a few probe() and remove() issues
    - Add a MAINTAINERS entry for this driver
    - Tweak transfer size to increase read performance
    - Add suspend/resume support
    - Add Micron quad I/O support
    - ST FSM SPI: miscellaneous fixes

    JFFS2:

    - gracefully handle corrupted 'offset' field found on flash

    Other:

    - bcm47xxpart: add tweaks for a few new devices
    - mtdconcat: set return lengths properly for mtd_write_oob()
    - map_ram: enable use with mtdoops
    - maps: support fallback to ROM/UBI for write-protected NOR flash"

    * tag 'for-linus-20150216' of git://git.infradead.org/linux-mtd: (46 commits)
    mtd: hisilicon: && vs & typo
    jffs2: fix handling of corrupted summary length
    mtd: hisilicon: add device tree binding documentation
    mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc
    mtd: avoid registering reboot notifier twice
    mtd: concat: set the return lengths properly
    mtd: kconfig: replace PPC_OF with PPC
    mtd: denali: remove unnecessary stubs
    mtd: nand: remove redundant local variable
    MAINTAINERS: add maintainer entry for FREESCALE QUAD SPI driver
    mtd: fsl-quadspi: improve read performance by increase AHB transfer size
    mtd: fsl-quadspi: Remove unnecessary 'map_failed' label
    mtd: fsl-quadspi: Remove unneeded success/error messages
    mtd: fsl-quadspi: Fix the error paths
    mtd: nand: omap: drop condition with no effect
    mtd: nand: jz4740: Convert to GPIO descriptor API
    mtd: nand: Request strength instead of bytes for soft BCH
    mtd: nand: default bitflip-reporting threshold to 75% of correction strength
    mtd: atmel_nand: introduce a new compatible string for sama5d4 chip
    mtd: atmel_nand: return max bitflips in all sectors in pmecc_correction()
    ...

    Linus Torvalds
     

18 Feb, 2015

27 commits

  • Pull nfsd bugfixes from Bruce Fields:
    "These are fixes for two bugs introduced during the merge window"

    * 'for-3.20' of git://linux-nfs.org/~bfields/linux:
    nfsd4: fix v3-less build
    nfsd: fix comparison in fh_fsid_match()

    Linus Torvalds
     
  • Pull lazytime mount option support from Al Viro:
    "Lazytime stuff from tytso"

    * 'lazytime' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    ext4: add optimization for the lazytime mount option
    vfs: add find_inode_nowait() function
    vfs: add support for a lazytime mount option

    Linus Torvalds
     
  • Pull iov_iter updates from Al Viro:
    "More iov_iter work - missing counterpart of iov_iter_init() for
    bvec-backed ones and vfs_read_iter()/vfs_write_iter() - wrappers for
    sync calls of ->read_iter()/->write_iter()"

    * 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: add vfs_iter_{read,write} helpers
    new helper: iov_iter_bvec()

    Linus Torvalds
     
  • Pull getname/putname updates from Al Viro:
    "Rework of getname/getname_kernel/etc., mostly from Paul Moore. Gets
    rid of quite a pile of kludges between namei and audit..."

    * 'getname2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    audit: replace getname()/putname() hacks with reference counters
    audit: fix filename matching in __audit_inode() and __audit_inode_child()
    audit: enable filename recording via getname_kernel()
    simpler calling conventions for filename_mountpoint()
    fs: create proper filename objects using getname_kernel()
    fs: rework getname_kernel to handle up to PATH_MAX sized filenames
    cut down the number of do_path_lookup() callers

    Linus Torvalds
     
  • Pull debugfs patches from Al Viro:
    "debugfs patches, mostly to make it possible for something like tracefs
    to be transparently automounted on given directory in debugfs.

    New primitive in there is debugfs_create_automount(name, parent, func,
    arg), which creates a directory and makes its ->d_automount() return
    func(arg). Another missing primitive was debugfs_create_file_size() -
    open-coded in quite a few places. Dave's patch adds it and converts
    the open-code instances to calling it"

    * 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    debugfs: Provide a file creation function that also takes an initial size
    new primitive: debugfs_create_automount()
    debugfs: split end_creating() into success and failure cases
    debugfs: take mode-dependent parts of debugfs_get_inode() into callers
    fold debugfs_mknod() into callers
    fold debugfs_create() into caller
    fold debugfs_mkdir() into caller
    debugfs_mknod(): get rid useless arguments
    fold debugfs_link() into caller
    debugfs: kill __create_file()
    debugfs: split the beginning and the end of __create_file() off
    debugfs_{mkdir,create,link}(): get rid of redundant argument

    Linus Torvalds
     
  • Pull misc VFS updates from Al Viro:
    "This cycle a lot of stuff sits on topical branches, so I'll be sending
    more or less one pull request per branch.

    This is the first pile; more to follow in a few. In this one are
    several misc commits from early in the cycle (before I went for
    separate branches), plus the rework of mntput/dput ordering on umount,
    switching to use of fs_pin instead of convoluted games in
    namespace_unlock()"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    switch the IO-triggering parts of umount to fs_pin
    new fs_pin killing logics
    allow attaching fs_pin to a group not associated with some superblock
    get rid of the second argument of acct_kill()
    take count and rcu_head out of fs_pin
    dcache: let the dentry count go down to zero without taking d_lock
    pull bumping refcount into ->kill()
    kill pin_put()
    mode_t whack-a-mole: chelsio
    file->f_path.dentry is pinned down for as long as the file is open...
    get rid of lustre_dump_dentry()
    gut proc_register() a bit
    kill d_validate()
    ncpfs: get rid of d_validate() nonsense
    selinuxfs: don't open-code d_genocide()

    Linus Torvalds
     
  • Merge yet more updates from Andrew Morton:

    - a pile of minor fs fixes and cleanups

    - kexec updates

    - random misc fixes in various places: vmcore, rbtree, eventfd, ipc, seccomp.

    - a series of python-based kgdb helper scripts

    * emailed patches from Andrew Morton : (58 commits)
    seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO
    samples/seccomp: improve label helper
    ipc,sem: use current->state helpers
    scripts/gdb: disable pagination while printing from breakpoint handler
    scripts/gdb: define maintainer
    scripts/gdb: convert CpuList to generator function
    scripts/gdb: convert ModuleList to generator function
    scripts/gdb: use a generator instead of iterator for task list
    scripts/gdb: ignore byte-compiled python files
    scripts/gdb: port to python3 / gdb7.7
    scripts/gdb: add basic documentation
    scripts/gdb: add lx-lsmod command
    scripts/gdb: add class to iterate over CPU masks
    scripts/gdb: add lx_current convenience function
    scripts/gdb: add internal helper and convenience function for per-cpu lookup
    scripts/gdb: add get_gdbserver_type helper
    scripts/gdb: add internal helper and convenience function to retrieve thread_info
    scripts/gdb: add is_target_arch helper
    scripts/gdb: add helper and convenience function to look up tasks
    scripts/gdb: add task iteration class
    ...

    Linus Torvalds
     
  • Fix checkpatch error:

    ERROR: switch and case should be at the same indent

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • affs_symlink_inode_operations was already declared extern in affs.h

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • return is not needed at the end of function.

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • else is unnecessary after return -ENAMETOOLONG

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • 30 was used all over the place to compare name length against
    AFFS maximum name length.

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • - Some min() were used with different types.

    - Create a new variable in __affs_hash_dentry() to process
    affs_check_name()/min() return

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Call mutex_destroy() on superblock mutex in affs_kill_sb() otherwise mutex
    debugging code isn't able to detect that mutex is used after being freed.
    (thanks to Jan Kara for complete definition).

    Signed-off-by: Fabian Frederick
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Use the same fallback to normal IO in case of write
    operations beyond EOF as fat direct IO. This patch fixes

    fsx file -d -Z -r 4096 -w 4096

    Report:
    129(129 mod 256): TRUNCATE DOWN from 0x3ff01 to 0xb3f6
    130(130 mod 256): WRITE 0x22000 thru 0x2dfff (0xc000 bytes) HOLE

    Thanks to Jan for helping me on this problem.

    The ideal solution suggested by Jan Kara would be to use
    cont_write_begin() but affs direct_IO shouldn't be used a lot anyway...

    Signed-off-by: Fabian Frederick
    Reviewed-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • - "inode.i_ino" is "unsigned long",
    - "loff_t" is always "unsigned long long",
    - "sector_t" should be cast to "unsigned long long" for printing,
    - "u32" should not be cast to "unsigned int" for printing.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • The spinlock in eventfd_poll is trying to protect the count of events so
    it can decide if it should return POLLIN, POLLERR, or POLLOUT. But,
    because of the way we drop the lock after calling poll_wait, and drop it
    again before returning, we have the same pile of races with the lock as
    we do with a single read of ctx->count().

    This replaces the lock with a read barrier and single read.

    eventfd_write does a single bump of ctx->count, so this should not add
    new races with adding events. eventfd_read is similar, it will do a
    single decrement with the lock held, and so we're making the race with
    concurrent readers slightly larger.

    This spinlock is the top CPU user in kernel code during one of our
    workloads. Removing it gives us a ~2% boost.

    [arnd@arndb.de: avoid unused variable warning]
    [dan.carpenter@oracle.com: type bug in eventfd_poll()]
    Signed-off-by: Chris Mason
    Cc: Davide Libenzi
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Mason
     
  • When updating PT_NOTE header size (ie. p_memsz), an overflow issue
    happens with the following bogus note entry:

    n_namesz = 0xFFFFFFFF
    n_descsz = 0x0
    n_type = 0x0

    This kind of note entry should be dropped during updating p_memsz. But
    because n_namesz is 32bit, after (n_namesz + 3) & (~3), it's overflow to
    0x0, the note entry size looks sane and reserved.

    When userspace (eg. crash utility) is trying to access such bogus note,
    it could lead to an unexpected behavior (eg. crash utility segment fault
    because it's reading bogus address).

    The source of bogus note hasn't been identified yet. At least we could
    drop the bogus note so user space wouldn't be surprised.

    Signed-off-by: WANG Chao
    Cc: Dave Anderson
    Cc: Baoquan He
    Cc: Randy Wright
    Cc: Vivek Goyal
    Cc: Paul Gortmaker
    Cc: Fabian Frederick
    Cc: Vitaly Kuznetsov
    Cc: Rashika Kheria
    Cc: Greg Pearson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Chao
     
  • Use the MSDOS_SB macro to get msdos_sb_info, instead of coding it
    directly.

    Signed-off-by: Fred Chou
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fred Chou
     
  • Fix sparse warning:

    fs/reiserfs/inode.c:2769:19: warning: Using plain integer as NULL pointer

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Let locking subsystem decide on mutex management. As reported by Andrew
    Morton this patch fixes a bug:

    : lock_ufs() is assuming that on non-preempt uniprocessor, the calling
    : code will run atomically up to the matching unlock_ufs().
    :
    : But that isn't true. The very first site I looked at (ufs_frag_map)
    : does sb_bread() under lock_ufs(). And sb_bread() will call schedule(),
    : very commonly.
    :
    : The ->mutex_owner stuff is a bit hacky but should work OK.

    Signed-off-by: Fabian Frederick
    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Fix the following coccinelle warning:

    fs/ufs/super.c:1418:7-28: WARNING: casting value returned by memory allocation function to (struct ufs_inode_info *) is useless.

    Signed-off-by: Fabian Frederick
    Cc: Evgeniy Dushistov
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • - Move operation structures to avoid forward declarations.

    - Fix some checkpatch warnings:

    WARNING: Missing a blank line after declarations
    + struct inode *host_inode = file_inode(host_file);
    + mutex_lock(&host_inode->i_mutex);

    ERROR: that open brace { should be on the previous line
    +const struct dentry_operations coda_dentry_operations =
    +{

    ERROR: that open brace { should be on the previous line
    +const struct inode_operations coda_dir_inode_operations =
    +{

    Signed-off-by: Fabian Frederick
    Cc: Jan Harkes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Fix the following coccinelle warning:

    fs/befs/linuxvfs.c:278:14-36: WARNING: casting value returned by memory allocation function to (struct befs_inode_info *) is useless.

    [akpm@linux-foundation.org: avoid 80-col ugliness]
    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Pull parisc update from Helge Deller:
    "The major change in here is the removal of the old HP-UX compat code
    which should have made it possible to load and execute 32-bit HP-UX
    binaries on PA-RISC Linux. Since it was never functional and since
    nobody cares about old 32-bit HPUX binaries any longer, it's now time
    to free up 3200 lines of kernel code (CONFIG_HPUX and
    CONFIG_BINFMT_SOM).

    Other than that we wire up the execveat() syscall, fix sparse errors
    and have some whitespace cleanups"

    * 'parisc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    fs/binfmt_som: Drop kernel support for HP-UX SOM binaries
    parisc: Remove unused function
    parisc: macro whitespace fixes
    parisc/uaccess: fix sparse errors
    parisc: hpux - Remove HPUX syscall numbers
    parisc: hpux - Remove hpux gateway page
    parisc: hpux - Delete files in hpux subdirectory
    parisc: hpux - Do not compile hpux subdirectory
    parisc: hpux - Drop support for HP-UX binaries
    parisc: Add error checks when building up signal trampoline handler
    parisc: Wire up execveat syscall

    Linus Torvalds
     
  • Provide a file creation function that also takes an initial size so that the
    caller doesn't have to set i_size, thus meaning that we don't have to call
    deal with ->d_inode in the callers.

    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells
     

17 Feb, 2015

12 commits

  • The parisc arch has been the only user of HP-UX SOM binaries.

    Support for HP-UX executables was never finished and since we now drop support
    for the HP-UX compat layer anyway, it does not makes sense to keep the
    BINFMT_SOM support.

    Cc: linux-fsdevel@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Signed-off-by: Helge Deller

    Helge Deller
     
  • Brian Norris
     
  • Intruduce a bit OCFS2_FEATURE_RO_COMPAT_APPEND_DIO and check it in
    write flow. If the bit is not set, fall back to the old way.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • If one node has crashed with orphan entry leftover, another node which do
    append O_DIRECT write to the same file will override the
    i_dio_orphaned_slot. Then the old entry won't be cleaned forever. If
    this case happens, we let it wait for orphan recovery first.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Complte the rest request thourgh buffer io after direct write performed.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Now we can do direct io and do not fallback to buffered IO any more in
    case of append O_DIRECT write.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Joel Becker
    Cc: Junxiao Bi
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Allow blocks allocation in ocfs2_direct_IO_get_blocks.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Junxiao Bi
    Cc: Joel Becker
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Implement ocfs2_direct_IO_write. Add the inode to orphan dir first, and
    then delete it once append O_DIRECT finished.

    This is to make sure block allocation and inode size are consistent.

    [akpm@linux-foundation.org: fix it for "block: Add discard flag to blkdev_issue_zeroout() function"]
    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Junxiao Bi
    Cc: Joel Becker
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Define two orphan recovery types, which indicates if need truncate file or
    not.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Junxiao Bi
    Cc: Joel Becker
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Add functions to add inode to orphan dir and remove inode in orphan dir.
    Here we do not call ocfs2_prepare_orphan_dir and ocfs2_orphan_add
    directly. Because append O_DIRECT will add inode to orphan two and may
    result in more than one orphan entry for the same inode.

    [akpm@linux-foundation.org: avoid dynamic stack allocation]
    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Junxiao Bi
    Cc: Joel Becker
    Cc: Mark Fasheh
    Cc: Xuejiufei
    Cc: alex chen
    Cc: Fengguang Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • Currently in case of append O_DIRECT write (block not allocated yet),
    ocfs2 will fall back to buffered I/O. This has some disadvantages.
    Firstly, it is not the behavior as expected. Secondly, it will consume
    huge page cache, e.g. in mass backup scenario. Thirdly, modern
    filesystems such as ext4 support this feature.

    In this patch set, the direct I/O write doesn't fallback to buffer I/O
    write any more because the allocate blocks are enabled in direct I/O now.

    This patch (of 9):

    Prepare some interfaces which will be used in append O_DIRECT write.

    Signed-off-by: Joseph Qi
    Cc: Weiwei Wang
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Xuejiufei
    Cc: Junxiao Bi
    Cc: alex chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joseph Qi
     
  • The DAX code accesses the underlying storage through the kernel's linear
    mapping, which may not be cache-coherent with user mappings on ARM, MIPS
    or SPARC. Temporarily disable the DAX code until this problem is
    resolved.

    The original XIP code also had this problem, but it was never noticed.

    Signed-off-by: Matthew Wilcox
    Cc: Andreas Dilger
    Cc: Boaz Harrosh
    Cc: Christoph Hellwig
    Cc: Dave Chinner
    Cc: Jan Kara
    Cc: Jens Axboe
    Cc: Kirill A. Shutemov
    Cc: Mathieu Desnoyers
    Cc: Randy Dunlap
    Cc: Ross Zwisler
    Cc: Theodore Ts'o
    Cc: Ralf Baechle
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox