Skip to content
Permalink
Anand-Jain/btr…

Commits on Nov 15, 2017

  1. btrfs: handle dynamically reappearing missing device

    If the device is not present at the time of (-o degrade) mount
    the mount context will create a dummy missing struct btrfs_device.
    Later this device may reappear after the FS is mounted. So this
    patch handles that case by going through the open_device steps
    which this device missed and finally adds to the device alloc list.
    
    So now with this patch, to bring back the missing device user can run,
    
       btrfs dev scan <path-of-missing-device>
    
    Signed-off-by: Anand Jain <anand.jain@oracle.com>
    asj authored and fengguang committed Nov 15, 2017

Commits on Aug 22, 2017

  1. squashfs: Add zstd support

    Add zstd compression and decompression support to SquashFS. zstd is a
    great fit for SquashFS because it can compress at ratios approaching xz,
    while decompressing twice as fast as zlib. For SquashFS in particular,
    it can decompress as fast as lzo and lz4. It also has the flexibility
    to turn down the compression ratio for faster compression times.
    
    The compression benchmark is run on the file tree from the SquashFS archive
    found in ubuntu-16.10-desktop-amd64.iso [1]. It uses `mksquashfs` with the
    default block size (128 KB) and and various compression algorithms/levels.
    xz and zstd are also benchmarked with 256 KB blocks. The decompression
    benchmark times how long it takes to `tar` the file tree into `/dev/null`.
    See the benchmark file in the upstream zstd source repository located under
    `contrib/linux-kernel/squashfs-benchmark.sh` [2] for details.
    
    I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.
    The VM is running on a MacBook Pro with a 3.1 GHz Intel Core i7 processor,
    16 GB of RAM, and a SSD.
    
    | Method         | Ratio | Compression MB/s | Decompression MB/s |
    |----------------|-------|------------------|--------------------|
    | gzip           |  2.92 |               15 |                128 |
    | lzo            |  2.64 |              9.5 |                217 |
    | lz4            |  2.12 |               94 |                218 |
    | xz             |  3.43 |              5.5 |                 35 |
    | xz 256 KB      |  3.53 |              5.4 |                 40 |
    | zstd 1         |  2.71 |               96 |                210 |
    | zstd 5         |  2.93 |               69 |                198 |
    | zstd 10        |  3.01 |               41 |                225 |
    | zstd 15        |  3.13 |             11.4 |                224 |
    | zstd 16 256 KB |  3.24 |              8.1 |                210 |
    
    This patch was written by Sean Purcell <me@seanp.xyz>, but I will be
    taking over the submission process.
    
    [1] http://releases.ubuntu.com/16.10/
    [2] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/squashfs-benchmark.sh
    
    zstd source repository: https://github.com/facebook/zstd
    
    Signed-off-by: Sean Purcell <me@seanp.xyz>
    Signed-off-by: Nick Terrell <terrelln@fb.com>
    Signed-off-by: Chris Mason <clm@fb.com>
    Acked-by: Phillip Lougher <phillip@squashfs.org.uk>
    iburinoc authored and masoncl committed Aug 22, 2017

Commits on Aug 15, 2017

  1. crypto: Add zstd support

    Adds zstd support to crypto and scompress. Only supports the default
    level.
    
    Signed-off-by: Nick Terrell <terrelln@fb.com>
    Signed-off-by: Chris Mason <clm@fb.com>
    terrelln authored and masoncl committed Aug 15, 2017
  2. btrfs: Add zstd support

    Add zstd compression and decompression support to BtrFS. zstd at its
    fastest level compresses almost as well as zlib, while offering much
    faster compression and decompression, approaching lzo speeds.
    
    I benchmarked btrfs with zstd compression against no compression, lzo
    compression, and zlib compression. I benchmarked two scenarios. Copying
    a set of files to btrfs, and then reading the files. Copying a tarball
    to btrfs, extracting it to btrfs, and then reading the extracted files.
    After every operation, I call `sync` and include the sync time.
    Between every pair of operations I unmount and remount the filesystem
    to avoid caching. The benchmark files can be found in the upstream
    zstd source repository under
    `contrib/linux-kernel/{btrfs-benchmark.sh,btrfs-extract-benchmark.sh}`
    [1] [2].
    
    I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.
    The VM is running on a MacBook Pro with a 3.1 GHz Intel Core i7 processor,
    16 GB of RAM, and a SSD.
    
    The first compression benchmark is copying 10 copies of the unzipped
    Silesia corpus [3] into a BtrFS filesystem mounted with
    `-o compress-force=Method`. The decompression benchmark times how long
    it takes to `tar` all 10 copies into `/dev/null`. The compression ratio is
    measured by comparing the output of `df` and `du`. See the benchmark file
    [1] for details. I benchmarked multiple zstd compression levels, although
    the patch uses zstd level 1.
    
    | Method  | Ratio | Compression MB/s | Decompression speed |
    |---------|-------|------------------|---------------------|
    | None    |  0.99 |              504 |                 686 |
    | lzo     |  1.66 |              398 |                 442 |
    | zlib    |  2.58 |               65 |                 241 |
    | zstd 1  |  2.57 |              260 |                 383 |
    | zstd 3  |  2.71 |              174 |                 408 |
    | zstd 6  |  2.87 |               70 |                 398 |
    | zstd 9  |  2.92 |               43 |                 406 |
    | zstd 12 |  2.93 |               21 |                 408 |
    | zstd 15 |  3.01 |               11 |                 354 |
    
    The next benchmark first copies `linux-4.11.6.tar` [4] to btrfs. Then it
    measures the compression ratio, extracts the tar, and deletes the tar.
    Then it measures the compression ratio again, and `tar`s the extracted
    files into `/dev/null`. See the benchmark file [2] for details.
    
    | Method | Tar Ratio | Extract Ratio | Copy (s) | Extract (s)| Read (s) |
    |--------|-----------|---------------|----------|------------|----------|
    | None   |      0.97 |          0.78 |    0.981 |      5.501 |    8.807 |
    | lzo    |      2.06 |          1.38 |    1.631 |      8.458 |    8.585 |
    | zlib   |      3.40 |          1.86 |    7.750 |     21.544 |   11.744 |
    | zstd 1 |      3.57 |          1.85 |    2.579 |     11.479 |    9.389 |
    
    [1] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/btrfs-benchmark.sh
    [2] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/btrfs-extract-benchmark.sh
    [3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
    [4] https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.11.6.tar.xz
    
    zstd source repository: https://github.com/facebook/zstd
    
    Signed-off-by: Nick Terrell <terrelln@fb.com>
    Signed-off-by: Chris Mason <clm@fb.com>
    terrelln authored and masoncl committed Aug 15, 2017
  3. lib: Add zstd modules

    Add zstd compression and decompression kernel modules.
    zstd offers a wide varity of compression speed and quality trade-offs.
    It can compress at speeds approaching lz4, and quality approaching lzma.
    zstd decompressions at speeds more than twice as fast as zlib, and
    decompression speed remains roughly the same across all compression levels.
    
    The code was ported from the upstream zstd source repository. The
    `linux/zstd.h` header was modified to match linux kernel style.
    The cross-platform and allocation code was stripped out. Instead zstd
    requires the caller to pass a preallocated workspace. The source files
    were clang-formatted [1] to match the Linux Kernel style as much as
    possible. Otherwise, the code was unmodified. We would like to avoid
    as much further manual modification to the source code as possible, so it
    will be easier to keep the kernel zstd up to date.
    
    I benchmarked zstd compression as a special character device. I ran zstd
    and zlib compression at several levels, as well as performing no
    compression, which measure the time spent copying the data to kernel space.
    Data is passed to the compresser 4096 B at a time. The benchmark file is
    located in the upstream zstd source repository under
    `contrib/linux-kernel/zstd_compress_test.c` [2].
    
    I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.
    The VM is running on a MacBook Pro with a 3.1 GHz Intel Core i7 processor,
    16 GB of RAM, and a SSD. I benchmarked using `silesia.tar` [3], which is
    211,988,480 B large. Run the following commands for the benchmark:
    
        sudo modprobe zstd_compress_test
        sudo mknod zstd_compress_test c 245 0
        sudo cp silesia.tar zstd_compress_test
    
    The time is reported by the time of the userland `cp`.
    The MB/s is computed with
    
        1,536,217,008 B / time(buffer size, hash)
    
    which includes the time to copy from userland.
    The Adjusted MB/s is computed with
    
        1,536,217,088 B / (time(buffer size, hash) - time(buffer size, none)).
    
    The memory reported is the amount of memory the compressor requests.
    
    | Method   | Size (B) | Time (s) | Ratio | MB/s    | Adj MB/s | Mem (MB) |
    |----------|----------|----------|-------|---------|----------|----------|
    | none     | 11988480 |    0.100 |     1 | 2119.88 |        - |        - |
    | zstd -1  | 73645762 |    1.044 | 2.878 |  203.05 |   224.56 |     1.23 |
    | zstd -3  | 66988878 |    1.761 | 3.165 |  120.38 |   127.63 |     2.47 |
    | zstd -5  | 65001259 |    2.563 | 3.261 |   82.71 |    86.07 |     2.86 |
    | zstd -10 | 60165346 |   13.242 | 3.523 |   16.01 |    16.13 |    13.22 |
    | zstd -15 | 58009756 |   47.601 | 3.654 |    4.45 |     4.46 |    21.61 |
    | zstd -19 | 54014593 |  102.835 | 3.925 |    2.06 |     2.06 |    60.15 |
    | zlib -1  | 77260026 |    2.895 | 2.744 |   73.23 |    75.85 |     0.27 |
    | zlib -3  | 72972206 |    4.116 | 2.905 |   51.50 |    52.79 |     0.27 |
    | zlib -6  | 68190360 |    9.633 | 3.109 |   22.01 |    22.24 |     0.27 |
    | zlib -9  | 67613382 |   22.554 | 3.135 |    9.40 |     9.44 |     0.27 |
    
    I benchmarked zstd decompression using the same method on the same machine.
    The benchmark file is located in the upstream zstd repo under
    `contrib/linux-kernel/zstd_decompress_test.c` [4]. The memory reported is
    the amount of memory required to decompress data compressed with the given
    compression level. If you know the maximum size of your input, you can
    reduce the memory usage of decompression irrespective of the compression
    level.
    
    | Method   | Time (s) | MB/s    | Adjusted MB/s | Memory (MB) |
    |----------|----------|---------|---------------|-------------|
    | none     |    0.025 | 8479.54 |             - |           - |
    | zstd -1  |    0.358 |  592.15 |        636.60 |        0.84 |
    | zstd -3  |    0.396 |  535.32 |        571.40 |        1.46 |
    | zstd -5  |    0.396 |  535.32 |        571.40 |        1.46 |
    | zstd -10 |    0.374 |  566.81 |        607.42 |        2.51 |
    | zstd -15 |    0.379 |  559.34 |        598.84 |        4.61 |
    | zstd -19 |    0.412 |  514.54 |        547.77 |        8.80 |
    | zlib -1  |    0.940 |  225.52 |        231.68 |        0.04 |
    | zlib -3  |    0.883 |  240.08 |        247.07 |        0.04 |
    | zlib -6  |    0.844 |  251.17 |        258.84 |        0.04 |
    | zlib -9  |    0.837 |  253.27 |        287.64 |        0.04 |
    
    Tested in userland using the test-suite in the zstd repo under
    `contrib/linux-kernel/test/UserlandTest.cpp` [5] by mocking the kernel
    functions. Fuzz tested using libfuzzer [6] with the fuzz harnesses under
    `contrib/linux-kernel/test/{RoundTripCrash.c,DecompressCrash.c}` [7] [8]
    with ASAN, UBSAN, and MSAN. Additionaly, it was tested while testing the
    BtrFS and SquashFS patches coming next.
    
    [1] https://clang.llvm.org/docs/ClangFormat.html
    [2] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/zstd_compress_test.c
    [3] http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
    [4] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/zstd_decompress_test.c
    [5] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/test/UserlandTest.cpp
    [6] http://llvm.org/docs/LibFuzzer.html
    [7] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/test/RoundTripCrash.c
    [8] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/test/DecompressCrash.c
    
    zstd source repository: https://github.com/facebook/zstd
    
    Signed-off-by: Nick Terrell <terrelln@fb.com>
    Signed-off-by: Chris Mason <clm@fb.com>
    terrelln authored and masoncl committed Aug 15, 2017
  4. lib: Add xxhash module

    Adds xxhash kernel module with xxh32 and xxh64 hashes. xxhash is an
    extremely fast non-cryptographic hash algorithm for checksumming.
    The zstd compression and decompression modules added in the next patch
    require xxhash. I extracted it out from zstd since it is useful on its
    own. I copied the code from the upstream XXHash source repository and
    translated it into kernel style. I ran benchmarks and tests in the kernel
    and tests in userland.
    
    I benchmarked xxhash as a special character device. I ran in four modes,
    no-op, xxh32, xxh64, and crc32. The no-op mode simply copies the data to
    kernel space and ignores it. The xxh32, xxh64, and crc32 modes compute
    hashes on the copied data. I also ran it with four different buffer sizes.
    The benchmark file is located in the upstream zstd source repository under
    `contrib/linux-kernel/xxhash_test.c` [1].
    
    I ran the benchmarks on a Ubuntu 14.04 VM with 2 cores and 4 GiB of RAM.
    The VM is running on a MacBook Pro with a 3.1 GHz Intel Core i7 processor,
    16 GB of RAM, and a SSD. I benchmarked using the file `filesystem.squashfs`
    from `ubuntu-16.10-desktop-amd64.iso`, which is 1,536,217,088 B large.
    Run the following commands for the benchmark:
    
        modprobe xxhash_test
        mknod xxhash_test c 245 0
        time cp filesystem.squashfs xxhash_test
    
    The time is reported by the time of the userland `cp`.
    The GB/s is computed with
    
        1,536,217,008 B / time(buffer size, hash)
    
    which includes the time to copy from userland.
    The Normalized GB/s is computed with
    
        1,536,217,088 B / (time(buffer size, hash) - time(buffer size, none)).
    
    | Buffer Size (B) | Hash  | Time (s) | GB/s | Adjusted GB/s |
    |-----------------|-------|----------|------|---------------|
    |            1024 | none  |    0.408 | 3.77 |             - |
    |            1024 | xxh32 |    0.649 | 2.37 |          6.37 |
    |            1024 | xxh64 |    0.542 | 2.83 |         11.46 |
    |            1024 | crc32 |    1.290 | 1.19 |          1.74 |
    |            4096 | none  |    0.380 | 4.04 |             - |
    |            4096 | xxh32 |    0.645 | 2.38 |          5.79 |
    |            4096 | xxh64 |    0.500 | 3.07 |         12.80 |
    |            4096 | crc32 |    1.168 | 1.32 |          1.95 |
    |            8192 | none  |    0.351 | 4.38 |             - |
    |            8192 | xxh32 |    0.614 | 2.50 |          5.84 |
    |            8192 | xxh64 |    0.464 | 3.31 |         13.60 |
    |            8192 | crc32 |    1.163 | 1.32 |          1.89 |
    |           16384 | none  |    0.346 | 4.43 |             - |
    |           16384 | xxh32 |    0.590 | 2.60 |          6.30 |
    |           16384 | xxh64 |    0.466 | 3.30 |         12.80 |
    |           16384 | crc32 |    1.183 | 1.30 |          1.84 |
    
    Tested in userland using the test-suite in the zstd repo under
    `contrib/linux-kernel/test/XXHashUserlandTest.cpp` [2] by mocking the
    kernel functions. A line in each branch of every function in `xxhash.c`
    was commented out to ensure that the test-suite fails. Additionally
    tested while testing zstd and with SMHasher [3].
    
    [1] https://phabricator.intern.facebook.com/P57526246
    [2] https://github.com/facebook/zstd/blob/dev/contrib/linux-kernel/test/XXHashUserlandTest.cpp
    [3] https://github.com/aappleby/smhasher
    
    zstd source repository: https://github.com/facebook/zstd
    XXHash source repository: https://github.com/cyan4973/xxhash
    
    Signed-off-by: Nick Terrell <terrelln@fb.com>
    Signed-off-by: Chris Mason <clm@fb.com>
    terrelln authored and masoncl committed Aug 15, 2017

Commits on Aug 13, 2017

  1. Linux 4.13-rc5

    torvalds committed Aug 13, 2017
  2. Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upst…

    …ream-linus
    
    Pull MIPS fixes from Ralf Baechle:
     "Another round of MIPS fixes:
    
       - compressed boot: Ignore a generated .c file
    
       - VDSO: Fix a register clobber list
    
       - DECstation: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
    
       - Octeon: Fix recent cleanups that cleaned away a bit too much thus
         breaking the arch side of the EDAC and USB drivers.
    
       - uasm: Fix duplicate const in "const struct foo const bar[]" which
         GCC 7.1 no longer accepts.
    
       - Fix race on setting and getting cpu_online_mask
    
       - Fix preemption issue. To do so cleanly introduce macro to get the
         size of L3 cache line.
    
       - Revert include cleanup that sometimes results in build error
    
       - MicroMIPS uses bit 0 of the PC to indicate microMIPS mode. Make
         sure this bit is set for kernel entry as well.
    
       - Prevent configuring the kernel for both microMIPS and MT. There are
         no such CPUs currently and thus the combination is unsupported and
         results in build errors.
    
      This has been sitting in linux-next for a few days and has survived
      automated testing by Imagination's test farm. No known regressions
      pending except a number of issues that crept up due to lots of people
      switching to GCC 7.1"
    
    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
      MIPS: Set ISA bit in entry-y for microMIPS kernels
      MIPS: Prevent building MT support for microMIPS kernels
      MIPS: PCI: Fix smp_processor_id() in preemptible
      MIPS: Introduce cpu_tcache_line_size
      MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
      MIPS: VDSO: Fix clobber lists in fallback code paths
      Revert "MIPS: Don't unnecessarily include kmalloc.h into <asm/cache.h>."
      MIPS: OCTEON: Fix USB platform code breakage.
      MIPS: Octeon: Fix broken EDAC driver.
      MIPS: gitignore: ignore generated .c files
      MIPS: Fix race on setting and getting cpu_online_mask
      MIPS: mm: remove duplicate "const" qualifier on insn_table
    torvalds committed Aug 13, 2017
  3. Merge tag 'driver-core-4.13-rc5' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/gregkh/driver-core
    
    Pull driver core fixes from Greg KH:
     "Here are three firmware core fixes for 4.13-rc5.
    
      All three of these fix reported issues and have been floating around
      for a few weeks. They have been in linux-next with no reported
      problems"
    
    * tag 'driver-core-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
      firmware: avoid invalid fallback aborts by using killable wait
      firmware: fix batched requests - send wake up on failure on direct lookups
      firmware: fix batched requests - wake all waiters
    torvalds committed Aug 13, 2017
  4. Merge tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/gregkh/char-misc
    
    Pull char/misc fixes from Greg KH:
     "Here are two patches for 4.13-rc5.
    
      One is a fix for a reported thunderbolt issue, and the other a fix for
      an MEI driver issue. Both have been in linux-next with no reported
      issues"
    
    * tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
      thunderbolt: Do not enumerate more ports from DROM than the controller has
      mei: exclude device from suspend direct complete optimization
    torvalds committed Aug 13, 2017
  5. Merge tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/tty
    
    Pull tty/serial fixes from Greg KH:
     "Here are two tty serial driver fixes for 4.13-rc5. One is a revert of
      a -rc1 patch that turned out to not be a good idea, and the other is a
      fix for the pl011 serial driver.
    
      Both have been in linux-next with no reported issues"
    
    * tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
      Revert "serial: Delete dead code for CIR serial ports"
      tty: pl011: fix initialization order of QDF2400 E44
    torvalds committed Aug 13, 2017
  6. Merge tag 'staging-4.13-rc5' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/gregkh/staging
    
    Pull staging/iio fixes from Greg KH:
     "Here are some Staging and IIO driver fixes for 4.13-rc5.
    
      Nothing major, just a number of small fixes for reported issues. All
      of these have been in linux-next for a while now with no reported
      issues. Full details are in the shortlog"
    
    * tag 'staging-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
      staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING
      iio: aspeed-adc: wait for initial sequence.
      iio: accel: bmc150: Always restore device to normal mode after suspend-resume
      staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
      iio: adc: axp288: Fix the GPADC pin reading often wrongly returning 0
      iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
      iio: accel: st_accel: add SPI-3wire support
      iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications"
      iio: adc: sun4i-gpadc-iio: fix unbalanced irq enable/disable
      iio: pressure: st_pressure_core: disable multiread by default for LPS22HB
      iio: light: tsl2563: use correct event code
    torvalds committed Aug 13, 2017
  7. Merge tag 'usb-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB fixes from Greg KH:
     "Here are a number of small USB driver fixes and new device ids for
      4.13-rc5. There is the usual gadget driver fixes, some new quirks for
      "messy" hardware, and some new device ids.
    
      All have been in linux-next with no reported issues"
    
    * tag 'usb-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
      USB: serial: pl2303: add new ATEN device id
      usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
      USB: Check for dropped connection before switching to full speed
      usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
      usb: renesas_usbhs: gadget: fix unused-but-set-variable warning
      usb: renesas_usbhs: Fix UGCTRL2 value for R-Car Gen3
      usb: phy: phy-msm-usb: Fix usage of devm_regulator_bulk_get()
      usb: gadget: udc: renesas_usb3: Fix usb_gadget_giveback_request() calling
      usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets
      USB: serial: option: add D-Link DWM-222 device ID
      usb: musb: fix tx fifo flush handling again
      usb: core: unlink urbs from the tail of the endpoint's urb_list
      usb-storage: fix deadlock involving host lock and scsi_done
      uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
      USB: hcd: Mark secondary HCD as dead if the primary one died
      USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
    torvalds committed Aug 13, 2017

Commits on Aug 12, 2017

  1. Merge tag 'for-linus-20170812' of git://git.infradead.org/linux-mtd

    Pull another MTD fix from Brian Norris:
     "An mtdblock regression occurred in -rc1 (all writes were broken!), in
      the process of some block subsystem refactoring. Noticed and fixed
      last week, but I'm a little slow on the uptake"
    
    * tag 'for-linus-20170812' of git://git.infradead.org/linux-mtd:
      mtd: blkdevs: Fix mtd block write failure
    torvalds committed Aug 12, 2017
  2. mtd: blkdevs: Fix mtd block write failure

    All the MTD block write requests are failing with
    following error messages
    
        mkfs.ext4  /dev/mtdblock0
    
        print_req_error: I/O error, dev mtdblock0, sector 0
        Buffer I/O error on dev mtdblock0, logical block 0,
        lost async page write
    
    The control is going to default case after block write request
    because of missing return.
    
    Fixes: commit 2a842ac ("block: introduce new block status code type")
    Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Abhishek Sahu authored and computersforpeace committed Aug 12, 2017
  3. Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

    Pull SCSI target fixes from Nicholas Bellinger:
     "The highlights include:
    
       - Fix iscsi-target payload memory leak during
         ISCSI_FLAG_TEXT_CONTINUE (Varun Prakash)
    
       - Fix tcm_qla2xxx incorrect use of tcm_qla2xxx_free_cmd during ABORT
         (Pascal de Bruijn + Himanshu Madhani + nab)
    
       - Fix iscsi-target long-standing issue with parallel delete of a
         single network portal across multiple target instances (Gary Guo +
         nab)
    
       - Fix target dynamic se_node GPF during uncached shutdown regression
         (Justin Maggard + nab)"
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
      target: Fix node_acl demo-mode + uncached dynamic shutdown regression
      iscsi-target: Fix iscsi_np reset hung task during parallel delete
      qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)
      cxgbit: fix sg_nents calculation
      iscsi-target: fix invalid flags in text response
      iscsi-target: fix memory leak in iscsit_setup_text_cmd()
      cxgbit: add missing __kfree_skb()
      tcmu: free old string on reconfig
      tcmu: Fix possible to/from address overflow when doing the memcpy
    torvalds committed Aug 12, 2017
  4. Merge tag 'for-linus-4.13b-rc5-tag' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/xen/tip
    
    Pull xen fixes from Juergen Gross:
     "Some fixes for Xen:
    
       - a fix for a regression introduced in 4.13 for a Xen HVM-guest
         configured with KASLR
    
       - a fix for a possible deadlock in the xenbus driver when booting the
         system
    
       - a fix for lost interrupts in Xen guests"
    
    * tag 'for-linus-4.13b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
      xen/events: Fix interrupt lost during irq_disable and irq_enable
      xen: avoid deadlock in xenbus
      xen: fix hvm guest with kaslr enabled
      xen: split up xen_hvm_init_shared_info()
      x86: provide an init_mem_mapping hypervisor hook
    torvalds committed Aug 12, 2017

Commits on Aug 11, 2017

  1. Merge tag 'nfs-for-4.13-5' of git://git.linux-nfs.org/projects/anna/l…

    …inux-nfs
    
    Pull NFS client fixes from Anna Schumaker:
     "A few more NFS client bugfixes from me for rc5.
    
      Dros has a stable fix for flexfiles to prevent leaking the
      nfs4_ff_ds_version arrays when freeing a layout, Trond fixed a
      potential recovery loop situation with the TEST_STATEID operation, and
      Christoph fixed up the pNFS blocklayout Kconfig options to prevent
      unsafe use with kernels that don't have large block device support.
      Summary:
    
      Stable fix:
       - fix leaking nfs4_ff_ds_version array
    
      Other fixes:
       - improve TEST_STATEID OLD_STATEID handling to prevent recovery loop
    
       - require 64-bit sector_t for pNFS blocklayout to prevent 32-bit
         compile errors"
    
    * tag 'nfs-for-4.13-5' of git://git.linux-nfs.org/projects/anna/linux-nfs:
      pnfs/blocklayout: require 64-bit sector_t
      NFSv4: Ignore NFS4ERR_OLD_STATEID in nfs41_check_open_stateid()
      nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
    torvalds committed Aug 11, 2017
  2. Merge branch 'for-linus' of git://git.kernel.dk/linux-block

    Pull block fixes from Jens Axboe:
     "A set of fixes that should go into this series. This contains:
    
       - Fix from Bart for blk-mq requeue queue running, preventing a
         continued loop of run/restart.
    
       - Fix for a bio/blk-integrity issue, in two parts. One from
         Christoph, fixing where verification happens, and one from Milan,
         for a NULL profile.
    
       - NVMe pull request, most of the changes being for nvme-fc, but also
         a few trivial core/pci fixes"
    
    * 'for-linus' of git://git.kernel.dk/linux-block:
      nvme: fix directive command numd calculation
      nvme: fix nvme reset command timeout handling
      nvme-pci: fix CMB sysfs file removal in reset path
      lpfc: support nvmet_fc defer_rcv callback
      nvmet_fc: add defer_req callback for deferment of cmd buffer return
      nvme: strip trailing 0-bytes in wwid_show
      block: Make blk_mq_delay_kick_requeue_list() rerun the queue at a quiet time
      bio-integrity: only verify integrity on the lowest stacked driver
      bio-integrity: Fix regression if profile verify_fn is NULL
    torvalds committed Aug 11, 2017
  3. Merge tag 'mmc-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/ulfh/mmc
    
    Pull MMC fixes from Ulf Hansson:
     "MMC core:
    
       - fix lockdep splat when removing mmc_block module
    
       - fix the logic for setting eMMC HS400ES signal voltage
    
      MMC host:
    
       - omap_hsmmc: add CMD23 capability to fix -EIO errors"
    
    * tag 'mmc-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
      mmc: block: fix lockdep splat when removing mmc_block module
      mmc: mmc: correct the logic for setting HS400ES signal voltage
      mmc: host: omap_hsmmc: Add CMD23 capability to omap_hsmmc driver
    torvalds committed Aug 11, 2017
  4. Merge tag 'fbdev-v4.13-rc5' of git://github.com/bzolnier/linux

    Pull fbdev fixes from Bartlomiej Zolnierkiewicz:
    
     - allow user to disable write combined mapping in efifb driver (Dave
       Airlie)
    
     - fix use after free bugs on driver removal in imxfb driver (Dan
       Carpenter)
    
     - fix unused variable warning in omapfb driver (Arnd Bergmann)
    
    * tag 'fbdev-v4.13-rc5' of git://github.com/bzolnier/linux:
      efifb: allow user to disable write combined mapping.
      fbdev: omapfb: remove unused variable
      video: fbdev: imxfb: use after free in imxfb_remove()
    torvalds committed Aug 11, 2017
  5. Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/mszeredi/fuse
    
    Pull fuse fixes from Miklos Szeredi:
     "Fix a few bugs in fuse"
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
      fuse: set mapping error in writepage_locked when it fails
      fuse: Dont call set_page_dirty_lock() for ITER_BVEC pages for async_dio
      fuse: initialize the flock flag in fuse_file on allocation
    torvalds committed Aug 11, 2017
  6. Merge tag 'iommu-fixes-v4.13-rc4' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/joro/iommu
    
    Pull IOMMU fix from Joerg Roedel:
     "Fix a NULL-pointer dereference in arm_smmu_add_device"
    
    * tag 'iommu-fixes-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
      iommu/arm-smmu: fix null-pointer dereference in arm_smmu_add_device
    torvalds committed Aug 11, 2017
  7. pnfs/blocklayout: require 64-bit sector_t

    The blocklayout code does not compile cleanly for a 32-bit sector_t,
    and also has no reliable checks for devices sizes, which makes it
    unsafe to use with a kernel that doesn't support large block devices.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reported-by: Arnd Bergmann <arnd@arndb.de>
    Fixes: 5c83746 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
    Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
    Christoph Hellwig Anna Schumaker
    Christoph Hellwig authored and Anna Schumaker committed Aug 11, 2017
  8. Merge tag 'powerpc-4.13-6' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/powerpc/linux
    
    Pull powerpc fixes from Michael Ellerman:
     "All fixes for code that went in this cycle.
    
       - a revert of an optimisation to the syscall exit path, which could
         lead to an oops on either older machines or machines with > 1TB of
         memory
    
       - disable some deep idle states if the firmware configuration for
         them fails
    
       - re-enable HARD/SOFT lockup detectors in defconfigs after a Kconfig
         change
    
       - six fairly small patches fixing bugs in our new watchdog code
    
      Thanks to: Gautham R Shenoy, Nicholas Piggin"
    
    * tag 'powerpc-4.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
      powerpc/watchdog: add locking around init/exit functions
      powerpc/watchdog: Fix marking of stuck CPUs
      powerpc/watchdog: Fix final-check recovered case
      powerpc/watchdog: Moderate touch_nmi_watchdog overhead
      powerpc/watchdog: Improve watchdog lock primitive
      powerpc: NMI IPI improve lock primitive
      powerpc/configs: Re-enable HARD/SOFT lockup detectors
      powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails
      Revert "powerpc/64: Avoid restore_math call if possible in syscall exit"
    torvalds committed Aug 11, 2017
  9. iommu/arm-smmu: fix null-pointer dereference in arm_smmu_add_device

    Commit c54451a "iommu/arm-smmu: Fix the error path in arm_smmu_add_device"
    removed fwspec assignment in legacy_binding path as redundant which is
    wrong. It needs to be updated after fwspec initialisation in
    arm_smmu_register_legacy_master() as it is dereferenced later. Without
    this there is a NULL-pointer dereference panic during boot on some hosts.
    
    Signed-off-by: Artem Savkov <asavkov@redhat.com>
    Reviewed-by: Robin Murphy <robin.murphy@arm.com>
    Acked-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    sm00th authored and joergroedel committed Aug 11, 2017
  10. xen/events: Fix interrupt lost during irq_disable and irq_enable

    Here is a device has xen-pirq-MSI interrupt. Dom0 might lost interrupt
    during driver irq_disable/irq_enable. Here is the scenario,
     1. irq_disable -> disable_dynirq -> mask_evtchn(irq channel)
     2. dev interrupt raised by HW and Xen mark its evtchn as pending
     3. irq_enable -> startup_pirq -> eoi_pirq ->
        clear_evtchn(channel of irq) -> clear pending status
     4. consume_one_event process the irq event without pending bit assert
        which result in interrupt lost once
     5. No HW interrupt raising anymore.
    
    Now use enable_dynirq for enable_pirq of xen_pirq_chip to remove
    eoi_pirq when irq_enable.
    
    Signed-off-by: Liu Shuo <shuo.a.liu@intel.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    shuox authored and jgross1 committed Aug 11, 2017
  11. xen: avoid deadlock in xenbus

    When starting the xenwatch thread a theoretical deadlock situation is
    possible:
    
    xs_init() contains:
    
        task = kthread_run(xenwatch_thread, NULL, "xenwatch");
        if (IS_ERR(task))
            return PTR_ERR(task);
        xenwatch_pid = task->pid;
    
    And xenwatch_thread() does:
    
        mutex_lock(&xenwatch_mutex);
        ...
        event->handle->callback();
        ...
        mutex_unlock(&xenwatch_mutex);
    
    The callback could call unregister_xenbus_watch() which does:
    
        ...
        if (current->pid != xenwatch_pid)
            mutex_lock(&xenwatch_mutex);
        ...
    
    In case a watch is firing before xenwatch_pid could be set and the
    callback of that watch unregisters a watch, then a self-deadlock would
    occur.
    
    Avoid this by setting xenwatch_pid in xenwatch_thread().
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    jgross1 committed Aug 11, 2017
  12. Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus

    Pull NVMe fixes from Christoph:
    
    "A few more small fixes - the fc/lpfc update is the biggest by far."
    axboe committed Aug 11, 2017
  13. xen: fix hvm guest with kaslr enabled

    A Xen HVM guest running with KASLR enabled will die rather soon today
    because the shared info page mapping is using va() too early. This was
    introduced by commit a5d5f32 ("xen:
    allocate page for shared info page from low memory").
    
    In order to fix this use early_memremap() to get a temporary virtual
    address for shared info until va() can be used safely.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    jgross1 committed Aug 11, 2017
  14. xen: split up xen_hvm_init_shared_info()

    Instead of calling xen_hvm_init_shared_info() on boot and resume split
    it up into a boot time function searching for the pfn to use and a
    mapping function doing the hypervisor mapping call.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    jgross1 committed Aug 11, 2017
  15. x86: provide an init_mem_mapping hypervisor hook

    Provide a hook in hypervisor_x86 called after setting up initial
    memory mapping.
    
    This is needed e.g. by Xen HVM guests to map the hypervisor shared
    info page.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    jgross1 committed Aug 11, 2017
  16. fuse: set mapping error in writepage_locked when it fails

    This ensures that we see errors on fsync when writeback fails.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    jtlayton authored and Miklos Szeredi committed Aug 11, 2017
  17. Merge tag 'drm-fixes-for-v4.13-rc5' of git://people.freedesktop.org/~…

    …airlied/linux
    
    Pull drm fixes from Dave Airlie:
     "Nothing too earth shattering here, it just seems like lots of little
      things all over the place.
    
      msm has probably the larger amount of changes, but they all seem fine,
      otherwise, some rockchip, i915, etnaviv and exynos fixes, along with
      one nouveau regression fix for some older GPUs"
    
    * tag 'drm-fixes-for-v4.13-rc5' of git://people.freedesktop.org/~airlied/linux: (35 commits)
      drm/nouveau/disp/nv04: avoid creation of output paths
      drm: make DRM_STM default n
      drm/exynos: forbid creating framebuffers from too small GEM buffers
      drm/etnaviv: Fix off-by-one error in reloc checking
      drm/i915: fix backlight invert for non-zero minimum brightness
      drm/i915/shrinker: Wrap need_resched() inside preempt-disable
      drm/i915/perf: fix flex eu registers programming
      drm/i915: Fix out-of-bounds array access in bdw_load_gamma_lut
      drm/i915/gvt: Change the max length of mmio_reg_rw from 4 to 8
      drm/i915/gvt: Initialize MMIO Block with HW state
      drm/rockchip: vop: report error when check resource error
      drm/rockchip: vop: round_up pitches to word align
      drm/rockchip: vop: fix NV12 video display error
      drm/rockchip: vop: fix iommu page fault when resume
      drm/i915/gvt: clean workload queue if error happened
      drm/i915/gvt: change resetting to resetting_eng
      drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations
      drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM
      drm/msm/adreno: Prevent unclocked access when retrieving timestamps
      drm/msm: Remove __user from __u64 data types
      ...
    torvalds committed Aug 11, 2017

Commits on Aug 10, 2017

  1. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "21 fixes"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
      userfaultfd: replace ENOSPC with ESRCH in case mm has gone during copy/zeropage
      zram: rework copy of compressor name in comp_algorithm_store()
      rmap: do not call mmu_notifier_invalidate_page() under ptl
      mm: fix list corruptions on shmem shrinklist
      mm/balloon_compaction.c: don't zero ballooned pages
      MAINTAINERS: copy virtio on balloon_compaction.c
      mm: fix KSM data corruption
      mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem
      mm: make tlb_flush_pending global
      mm: refactor TLB gathering API
      Revert "mm: numa: defer TLB flush for THP migration as long as possible"
      mm: migrate: fix barriers around tlb_flush_pending
      mm: migrate: prevent racy access to tlb_flush_pending
      fault-inject: fix wrong should_fail() decision in task context
      test_kmod: fix small memory leak on filesystem tests
      test_kmod: fix the lock in register_test_dev_kmod()
      test_kmod: fix bug which allows negative values on two config options
      test_kmod: fix spelling mistake: "EMTPY" -> "EMPTY"
      userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
      mm: ratelimit PFNs busy info message
      ...
    torvalds committed Aug 10, 2017
Older
You can’t perform that action at this time.