15 Oct, 2019

1 commit

  • Fix kernel-doc warning in fs/direct-io.c:

    fs/direct-io.c:258: warning: Excess function parameter 'offset' description in 'dio_complete'

    Also, don't mark this function as having kernel-doc notation since it is
    not exported.

    Link: http://lkml.kernel.org/r/97908511-4328-4a56-17fe-f43a1d7aa470@infradead.org
    Fixes: 6d544bb4d901 ("dio: centralize completion in dio_complete()")
    Signed-off-by: Randy Dunlap
    Cc: Zach Brown
    Cc: Alexander Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

29 Jun, 2019

1 commit


21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
    initial scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

30 Apr, 2019

1 commit


15 Feb, 2019

1 commit

  • This patch introduces one extra iterator variable to bio_for_each_segment_all(),
    then we can allow bio_for_each_segment_all() to iterate over multi-page bvec.

    Given it is just one mechannical & simple change on all bio_for_each_segment_all()
    users, this patch does tree-wide change in one single patch, so that we can
    avoid to use a temporary helper for this conversion.

    Reviewed-by: Omar Sandoval
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Ming Lei
    Signed-off-by: Jens Axboe

    Ming Lei
     

22 Jan, 2019

1 commit

  • On a DIO_SKIP_HOLES filesystem, the ->get_block() method is currently
    not allowed to create blocks for an empty inode. This confusion comes
    from trying to bit shift a negative number, so check the size of the
    inode first.

    The problem is most visible for hfsplus, because the fallback to
    buffered I/O doesn't happen and the write fails with EIO. This is in
    part the fault of the module, because it gives a wrong return value on
    ->get_block(); that will be fixed in a separate patch.

    Reviewed-by: Jeff Moyer
    Reviewed-by: Jan Kara
    Signed-off-by: Ernesto A. Fernández
    Signed-off-by: Jens Axboe

    Ernesto A. Fernández
     

05 Dec, 2018

1 commit

  • Pull in v4.20-rc5, solving a conflict we'll otherwise get in aio.c and
    also getting the merge fix that went into mainline that users are
    hitting testing for-4.21/block and/or for-next.

    * tag 'v4.20-rc5': (664 commits)
    Linux 4.20-rc5
    PCI: Fix incorrect value returned from pcie_get_speed_cap()
    MAINTAINERS: Update linux-mips mailing list address
    ocfs2: fix potential use after free
    mm/khugepaged: fix the xas_create_range() error path
    mm/khugepaged: collapse_shmem() do not crash on Compound
    mm/khugepaged: collapse_shmem() without freezing new_page
    mm/khugepaged: minor reorderings in collapse_shmem()
    mm/khugepaged: collapse_shmem() remember to clear holes
    mm/khugepaged: fix crashes due to misaccounted holes
    mm/khugepaged: collapse_shmem() stop if punched or truncated
    mm/huge_memory: fix lockdep complaint on 32-bit i_size_read()
    mm/huge_memory: splitting set mapping+index before unfreeze
    mm/huge_memory: rename freeze_page() to unmap_page()
    initramfs: clean old path before creating a hardlink
    kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace
    psi: make disabling/enabling easier for vendor kernels
    proc: fixup map_files test on arm
    debugobjects: avoid recursive calls with kmemleak
    userfaultfd: shmem: UFFDIO_COPY: set the page dirty if VM_WRITE is not set
    ...

    Jens Axboe
     

30 Nov, 2018

1 commit

  • commit e259221763a40403d5bb232209998e8c45804ab8 ("fs: simplify the
    generic_write_sync prototype") reworked callers of generic_write_sync(),
    and ended up dropping the error return for the directio path. Prior to
    that commit, in dio_complete(), an error would be bubbled up the stack,
    but after that commit, errors passed on to dio_complete were eaten up.

    This was reported on the list earlier, and a fix was proposed in
    https://lore.kernel.org/lkml/20160921141539.GA17898@infradead.org/, but
    never followed up with. We recently hit this bug in our testing where
    fencing io errors, which were previously erroring out with EIO, were
    being returned as success operations after this commit.

    The fix proposed on the list earlier was a little short -- it would have
    still called generic_write_sync() in case `ret` already contained an
    error. This fix ensures generic_write_sync() is only called when there's
    no pending error in the write. Additionally, transferred is replaced
    with ret to bring this code in line with other callers.

    Fixes: e259221763a4 ("fs: simplify the generic_write_sync prototype")
    Reported-by: Ravi Nankani
    Signed-off-by: Maximilian Heyne
    Reviewed-by: Christoph Hellwig
    CC: Torsten Mehlan
    CC: Uwe Dannowski
    CC: Amit Shah
    CC: David Woodhouse
    CC: stable@vger.kernel.org
    Signed-off-by: Jens Axboe

    Maximilian Heyne
     

26 Nov, 2018

1 commit

  • blk_poll() has always kept spinning until it found an IO. This is
    fine for SYNC polling, since we need to find one request we have
    pending, but in preparation for ASYNC polling it can be beneficial
    to just check if we have any entries available or not.

    Existing callers are converted to pass in 'spin == true', to retain
    the old behavior.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

08 Nov, 2018

1 commit

  • We use IOCB_HIPRI to poll for IO in the caller instead of scheduling.
    This information is not available for (or after) IO submission. The
    driver may make different queue choices based on the type of IO, so
    make the fact that we will poll for this IO known to the lower layers
    as well.

    Reviewed-by: Hannes Reinecke
    Reviewed-by: Keith Busch
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Jens Axboe

    Jens Axboe
     

24 Oct, 2018

1 commit

  • Use accessor functions to access an iterator's type and direction. This
    allows for the possibility of using some other method of determining the
    type of iterator than if-chains with bitwise-AND conditions.

    Signed-off-by: David Howells

    David Howells
     

14 May, 2018

1 commit


07 Apr, 2018

1 commit

  • Merge updates from Andrew Morton:

    - a few misc things

    - ocfs2 updates

    - the v9fs maintainers have been missing for a long time. I've taken
    over v9fs patch slinging.

    - most of MM

    * emailed patches from Andrew Morton : (116 commits)
    mm,oom_reaper: check for MMF_OOM_SKIP before complaining
    mm/ksm: fix interaction with THP
    mm/memblock.c: cast constant ULLONG_MAX to phys_addr_t
    headers: untangle kmemleak.h from mm.h
    include/linux/mmdebug.h: make VM_WARN* non-rvals
    mm/page_isolation.c: make start_isolate_page_range() fail if already isolated
    mm: change return type to vm_fault_t
    mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes
    mm, page_alloc: wakeup kcompactd even if kswapd cannot free more memory
    kernel/fork.c: detect early free of a live mm
    mm: make counting of list_lru_one::nr_items lockless
    mm/swap_state.c: make bool enable_vma_readahead and swap_vma_readahead() static
    block_invalidatepage(): only release page if the full page was invalidated
    mm: kernel-doc: add missing parameter descriptions
    mm/swap.c: remove @cold parameter description for release_pages()
    mm/nommu: remove description of alloc_vm_area
    zram: drop max_zpage_size and use zs_huge_class_size()
    zsmalloc: introduce zs_huge_class_size()
    mm: fix races between swapoff and flush dcache
    fs/direct-io.c: minor cleanups in do_blockdev_direct_IO
    ...

    Linus Torvalds
     

06 Apr, 2018

1 commit

  • We already get the block counts and calculate the end block at the
    beginning of the function. Let's use the local variables for
    consistency and readability. No functional changes

    [akpm@linux-foundation.org: constify the locals to prevent future slipups]
    Link: http://lkml.kernel.org/r/1519638870-17756-1-git-send-email-nborisov@suse.com
    Signed-off-by: Nikolay Borisov
    Reviewed-by: Jeff Moyer
    Cc: Al Viro
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nikolay Borisov
     

13 Mar, 2018

2 commits

  • This flag was added by fe0f07d08ee3 ("direct-io: only inc/deci
    inode->i_dio_count for file systems") as means to optimise the atomic
    modificaiton of the variable for blockdevices. However with the advent
    of 542ff7bf18c6 ("block: new direct I/O implementation") it became
    unused. So let's remove it.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Nikolay Borisov
    Signed-off-by: Jens Axboe

    Nikolay Borisov
     
  • This flag was added by 6039257378e4 ("direct-io: add flag to allow aio
    writes beyond i_size") to support XFS. However, with the rework of
    XFS' DIO's path to use iomap in acdda3aae146 ("xfs: use iomap_dio_rw")
    it became redundant. So let's remove it.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Nikolay Borisov
    Signed-off-by: Jens Axboe

    Nikolay Borisov
     

27 Feb, 2018

1 commit

  • Commit e864f39569f4 "fs: add RWF_DSYNC aand RWF_SYNC" added additional
    way for direct IO to become synchronous and thus trigger fsync from the
    IO completion handler. Then commit 9830f4be159b "fs: Use RWF_* flags for
    AIO operations" allowed these flags to be set for AIO as well. However
    that commit forgot to update the condition checking whether the IO
    completion handling should be defered to a workqueue and thus AIO DIO
    with RWF_[D]SYNC set will call fsync() from IRQ context resulting in
    sleep in atomic.

    Fix the problem by checking directly iocb flags (the same way as it is
    done in dio_complete()) instead of checking all conditions that could
    lead to IO being synchronous.

    CC: Christoph Hellwig
    CC: Goldwyn Rodrigues
    CC: stable@vger.kernel.org
    Reported-by: Mark Rutland
    Tested-by: Mark Rutland
    Fixes: 9830f4be159b29399d107bffb99e0132bc5aedd4
    Signed-off-by: Jan Kara
    Signed-off-by: Jens Axboe

    Jan Kara
     

09 Jan, 2018

1 commit

  • If two programs simultaneously try to write to the same part of a file
    via direct IO and buffered IO, there's a chance that the post-diowrite
    pagecache invalidation will fail on the dirty page. When this happens,
    the dio write succeeded, which means that the page cache is no longer
    coherent with the disk!

    Programs are not supposed to mix IO types and this is a clear case of
    data corruption, so store an EIO which will be reflected to userspace
    during the next fsync. Replace the WARN_ON with a ratelimited pr_crit
    so that the developers have /some/ kind of breadcrumb to track down the
    offending program(s) and file(s) involved.

    Signed-off-by: Darrick J. Wong
    Reviewed-by: Liu Bo

    Darrick J. Wong
     

15 Nov, 2017

1 commit

  • Pull core block layer updates from Jens Axboe:
    "This is the main pull request for block storage for 4.15-rc1.

    Nothing out of the ordinary in here, and no API changes or anything
    like that. Just various new features for drivers, core changes, etc.
    In particular, this pull request contains:

    - A patch series from Bart, closing the whole on blk/scsi-mq queue
    quescing.

    - A series from Christoph, building towards hidden gendisks (for
    multipath) and ability to move bio chains around.

    - NVMe
    - Support for native multipath for NVMe (Christoph).
    - Userspace notifications for AENs (Keith).
    - Command side-effects support (Keith).
    - SGL support (Chaitanya Kulkarni)
    - FC fixes and improvements (James Smart)
    - Lots of fixes and tweaks (Various)

    - bcache
    - New maintainer (Michael Lyle)
    - Writeback control improvements (Michael)
    - Various fixes (Coly, Elena, Eric, Liang, et al)

    - lightnvm updates, mostly centered around the pblk interface
    (Javier, Hans, and Rakesh).

    - Removal of unused bio/bvec kmap atomic interfaces (me, Christoph)

    - Writeback series that fix the much discussed hundreds of millions
    of sync-all units. This goes all the way, as discussed previously
    (me).

    - Fix for missing wakeup on writeback timer adjustments (Yafang
    Shao).

    - Fix laptop mode on blk-mq (me).

    - {mq,name} tupple lookup for IO schedulers, allowing us to have
    alias names. This means you can use 'deadline' on both !mq and on
    mq (where it's called mq-deadline). (me).

    - blktrace race fix, oopsing on sg load (me).

    - blk-mq optimizations (me).

    - Obscure waitqueue race fix for kyber (Omar).

    - NBD fixes (Josef).

    - Disable writeback throttling by default on bfq, like we do on cfq
    (Luca Miccio).

    - Series from Ming that enable us to treat flush requests on blk-mq
    like any other request. This is a really nice cleanup.

    - Series from Ming that improves merging on blk-mq with schedulers,
    getting us closer to flipping the switch on scsi-mq again.

    - BFQ updates (Paolo).

    - blk-mq atomic flags memory ordering fixes (Peter Z).

    - Loop cgroup support (Shaohua).

    - Lots of minor fixes from lots of different folks, both for core and
    driver code"

    * 'for-4.15/block' of git://git.kernel.dk/linux-block: (294 commits)
    nvme: fix visibility of "uuid" ns attribute
    blk-mq: fixup some comment typos and lengths
    ide: ide-atapi: fix compile error with defining macro DEBUG
    blk-mq: improve tag waiting setup for non-shared tags
    brd: remove unused brd_mutex
    blk-mq: only run the hardware queue if IO is pending
    block: avoid null pointer dereference on null disk
    fs: guard_bio_eod() needs to consider partitions
    xtensa/simdisk: fix compile error
    nvme: expose subsys attribute to sysfs
    nvme: create 'slaves' and 'holders' entries for hidden controllers
    block: create 'slaves' and 'holders' entries for hidden gendisks
    nvme: also expose the namespace identification sysfs files for mpath nodes
    nvme: implement multipath access to nvme subsystems
    nvme: track shared namespaces
    nvme: introduce a nvme_ns_ids structure
    nvme: track subsystems
    block, nvme: Introduce blk_mq_req_flags_t
    block, scsi: Make SCSI quiesce and resume work reliably
    block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag
    ...

    Linus Torvalds
     

04 Nov, 2017

1 commit


25 Oct, 2017

1 commit

  • …READ_ONCE()/WRITE_ONCE()

    Please do not apply this to mainline directly, instead please re-run the
    coccinelle script shown below and apply its output.

    For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
    preference to ACCESS_ONCE(), and new code is expected to use one of the
    former. So far, there's been no reason to change most existing uses of
    ACCESS_ONCE(), as these aren't harmful, and changing them results in
    churn.

    However, for some features, the read/write distinction is critical to
    correct operation. To distinguish these cases, separate read/write
    accessors must be used. This patch migrates (most) remaining
    ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
    coccinelle script:

    ----
    // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
    // WRITE_ONCE()

    // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch

    virtual patch

    @ depends on patch @
    expression E1, E2;
    @@

    - ACCESS_ONCE(E1) = E2
    + WRITE_ONCE(E1, E2)

    @ depends on patch @
    expression E;
    @@

    - ACCESS_ONCE(E)
    + READ_ONCE(E)
    ----

    Signed-off-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: davem@davemloft.net
    Cc: linux-arch@vger.kernel.org
    Cc: mpe@ellerman.id.au
    Cc: shuah@kernel.org
    Cc: snitzer@redhat.com
    Cc: thor.thayer@linux.intel.com
    Cc: tj@kernel.org
    Cc: viro@zeniv.linux.org.uk
    Cc: will.deacon@arm.com
    Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Mark Rutland
     

19 Oct, 2017

2 commits

  • Pull xfs fixes from Darrick Wong:

    - fix some more CONFIG_XFS_RT related build problems

    - fix data loss when writeback at eof races eofblocks gc and loses

    - invalidate page cache after fs finishes a dio write

    - remove dirty page state when invalidating pages so releasepage does
    the right thing when handed a dirty page

    * tag 'xfs-4.14-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
    xfs: move two more RT specific functions into CONFIG_XFS_RT
    xfs: trim writepage mapping to within eof
    fs: invalidate page cache after end_io() in dio completion
    xfs: cancel dirty pages on invalidation

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:
    "Three small fixes:

    - A fix for skd, it was using kfree() to free a structure allocate
    with kmem_cache_alloc().

    - Stable fix for nbd, fixing a regression using the normal ioctl
    based tools.

    - Fix for a previous fix in this series, that fixed up
    inconsistencies between buffered and direct IO"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    fs: Avoid invalidation in interrupt context in dio_complete()
    nbd: don't set the device size until we're connected
    skd: Use kmem_cache_free

    Linus Torvalds
     

17 Oct, 2017

2 commits

  • Currently we try to defer completion of async DIO to the process context
    in case there are any mapped pages associated with the inode so that we
    can invalidate the pages when the IO completes. However the check is racy
    and the pages can be mapped afterwards. If this happens we might end up
    calling invalidate_inode_pages2_range() in dio_complete() in interrupt
    context which could sleep. This can be reproduced by generic/451.

    Fix this by passing the information whether we can or can't invalidate
    to the dio_complete(). Thanks Eryu Guan for reporting this and Jan Kara
    for suggesting a fix.

    Fixes: 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO")
    Reported-by: Eryu Guan
    Reviewed-by: Jan Kara
    Tested-by: Eryu Guan
    Signed-off-by: Lukas Czerner
    Signed-off-by: Jens Axboe

    Lukas Czerner
     
  • Commit 332391a9935d ("fs: Fix page cache inconsistency when mixing
    buffered and AIO DIO") moved page cache invalidation from
    iomap_dio_rw() to iomap_dio_complete() for iomap based direct write
    path, but before the dio->end_io() call, and it re-introdued the bug
    fixed by commit c771c14baa33 ("iomap: invalidate page caches should
    be after iomap_dio_complete() in direct write").

    I found this because fstests generic/418 started failing on XFS with
    v4.14-rc3 kernel, which is the regression test for this specific
    bug.

    So similarly, fix it by moving dio->end_io() (which does the
    unwritten extent conversion) before page cache invalidation, to make
    sure next buffer read reads the final real allocations not unwritten
    extents. I also add some comments about why should end_io() go first
    in case we get it wrong again in the future.

    Note that, there's no such problem in the non-iomap based direct
    write path, because we didn't remove the page cache invalidation
    after the ->direct_IO() in generic_file_direct_write() call, but I
    decided to fix dio_complete() too so we don't leave a landmine
    there, also be consistent with iomap_dio_complete().

    Fixes: 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO")
    Signed-off-by: Eryu Guan
    Reviewed-by: Darrick J. Wong
    Signed-off-by: Darrick J. Wong
    Reviewed-by: Jan Kara
    Reviewed-by: Lukas Czerner

    Eryu Guan
     

11 Oct, 2017

1 commit

  • In the code added to function submit_page_section by commit b1058b981,
    sdio->bio can currently be NULL when calling dio_bio_submit. This then
    leads to a NULL pointer access in dio_bio_submit, so check for a NULL
    bio in submit_page_section before trying to submit it instead.

    Fixes xfstest generic/250 on gfs2.

    Cc: stable@vger.kernel.org # v3.10+
    Signed-off-by: Andreas Gruenbacher
    Reviewed-by: Jan Kara
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     

25 Sep, 2017

1 commit

  • Currently when mixing buffered reads and asynchronous direct writes it
    is possible to end up with the situation where we have stale data in the
    page cache while the new data is already written to disk. This is
    permanent until the affected pages are flushed away. Despite the fact
    that mixing buffered and direct IO is ill-advised it does pose a thread
    for a data integrity, is unexpected and should be fixed.

    Fix this by deferring completion of asynchronous direct writes to a
    process context in the case that there are mapped pages to be found in
    the inode. Later before the completion in dio_complete() invalidate
    the pages in question. This ensures that after the completion the pages
    in the written area are either unmapped, or populated with up-to-date
    data. Also do the same for the iomap case which uses
    iomap_dio_complete() instead.

    This has a side effect of deferring the completion to a process context
    for every AIO DIO that happens on inode that has pages mapped. However
    since the consensus is that this is ill-advised practice the performance
    implication should not be a problem.

    This was based on proposal from Jeff Moyer, thanks!

    Reviewed-by: Jan Kara
    Reviewed-by: Darrick J. Wong
    Reviewed-by: Jeff Moyer
    Signed-off-by: Lukas Czerner
    Signed-off-by: Jens Axboe

    Lukas Czerner
     

24 Aug, 2017

1 commit

  • This way we don't need a block_device structure to submit I/O. The
    block_device has different life time rules from the gendisk and
    request_queue and is usually only available when the block device node
    is open. Other callers need to explicitly create one (e.g. the lightnvm
    passthrough code, or the new nvme multipathing code).

    For the actual I/O path all that we need is the gendisk, which exists
    once per block device. But given that the block layer also does
    partition remapping we additionally need a partition index, which is
    used for said remapping in generic_make_request.

    Note that all the block drivers generally want request_queue or
    sometimes the gendisk, so this removes a layer of indirection all
    over the stack.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

28 Jun, 2017

1 commit


20 Jun, 2017

1 commit

  • A new bio operation flag REQ_NOWAIT is introduced to identify bio's
    orignating from iocb with IOCB_NOWAIT. This flag indicates
    to return immediately if a request cannot be made instead
    of retrying.

    Stacked devices such as md (the ones with make_request_fn hooks)
    currently are not supported because it may block for housekeeping.
    For example, an md can have a part of the device suspended.
    For this reason, only request based devices are supported.
    In the future, this feature will be expanded to stacked devices
    by teaching them how to handle the REQ_NOWAIT flags.

    Reviewed-by: Christoph Hellwig
    Reviewed-by: Jens Axboe
    Signed-off-by: Goldwyn Rodrigues
    Signed-off-by: Jens Axboe

    Goldwyn Rodrigues
     

09 Jun, 2017

3 commits


28 Feb, 2017

1 commit

  • Replace all 1 << inode->i_blkbits and (1 << inode->i_blkbits) in fs
    branch.

    This patch also fixes multiple checkpatch warnings: WARNING: Prefer
    'unsigned int' to bare use of 'unsigned'

    Thanks to Andrew Morton for suggesting more appropriate function instead
    of macro.

    [geliangtang@gmail.com: truncate: use i_blocksize()]
    Link: http://lkml.kernel.org/r/9c8b2cd83c8f5653805d43debde9fa8817e02fc4.1484895804.git.geliangtang@gmail.com
    Link: http://lkml.kernel.org/r/1481319905-10126-1-git-send-email-fabf@skynet.be
    Signed-off-by: Fabian Frederick
    Signed-off-by: Geliang Tang
    Cc: Alexander Viro
    Cc: Ross Zwisler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     

11 Jan, 2017

1 commit

  • The code currently uses sdio->blkbits to compute the number of blocks to
    be cleaned. However sdio->blkbits is derived from the logical block size
    of the underlying block device (Refer to the definition of
    do_blockdev_direct_IO()). Due to this, generic/299 test would rarely
    fail when executed on an ext4 filesystem with 64k as the block size and
    when using a virtio based disk (having 512 byte as the logical block
    size) inside a kvm guest.

    This commit fixes the bug by using inode->i_blkbits to compute the
    number of blocks to be cleaned.

    Signed-off-by: Chandan Rajendra
    Reviewed-by: Christoph Hellwig

    Fixed up by Jeff Moyer to only use/evaluate inode->i_blkbits once,
    to avoid issues with block size changes with IO in flight.

    Signed-off-by: Jens Axboe

    Chandan Rajendra
     

15 Dec, 2016

2 commits

  • Pull xfs updates from Dave Chinner:
    "There is quite a varied bunch of stuff in this update, and some of it
    you will have already merged through the ext4 tree which imported the
    dax-4.10-iomap-pmd topic branch from the XFS tree.

    There is also a new direct IO implementation that uses the iomap
    infrastructure. It's much simpler, faster, and has lower IO latency
    than the existing direct IO infrastructure.

    Summary:
    - DAX PMD faults via iomap infrastructure
    - Direct-io support in iomap infrastructure
    - removal of now-redundant XFS inode iolock, replaced with VFS
    i_rwsem
    - synchronisation with fixes and changes in userspace libxfs code
    - extent tree lookup helpers
    - lots of little corruption detection improvements to verifiers
    - optimised CRC calculations
    - faster buffer cache lookups
    - deprecation of barrier/nobarrier mount options - we always use
    REQ_FUA/REQ_FLUSH where appropriate for data integrity now
    - cleanups to speculative preallocation
    - miscellaneous minor bug fixes and cleanups"

    * tag 'xfs-for-linus-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (63 commits)
    xfs: nuke unused tracepoint definitions
    xfs: use GPF_NOFS when allocating btree cursors
    xfs: use xfs_vn_setattr_size to check on new size
    xfs: deprecate barrier/nobarrier mount option
    xfs: Always flush caches when integrity is required
    xfs: ignore leaf attr ichdr.count in verifier during log replay
    xfs: use rhashtable to track buffer cache
    xfs: optimise CRC updates
    xfs: make xfs btree stats less huge
    xfs: don't cap maximum dedupe request length
    xfs: don't allow di_size with high bit set
    xfs: error out if trying to add attrs and anextents > 0
    xfs: don't crash if reading a directory results in an unexpected hole
    xfs: complain if we don't get nextents bmap records
    xfs: check for bogus values in btree block headers
    xfs: forbid AG btrees with level == 0
    xfs: several xattr functions can be void
    xfs: handle cow fork in xfs_bmap_trace_exlist
    xfs: pass state not whichfork to trace_xfs_extlist
    xfs: Move AGI buffer type setting to xfs_read_agi
    ...

    Linus Torvalds
     
  • Pull fs meta data unmap optimization from Jens Axboe:
    "A series from Jan Kara, providing a more efficient way for unmapping
    meta data from in the buffer cache than doing it block-by-block.

    Provide a general helper that existing callers can use"

    * 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block:
    fs: Remove unmap_underlying_metadata
    fs: Add helper to clean bdev aliases under a bh and use it
    ext2: Use clean_bdev_aliases() instead of iteration
    ext4: Use clean_bdev_aliases() instead of iteration
    direct-io: Use clean_bdev_aliases() instead of handmade iteration
    fs: Provide function to unmap metadata for a range of blocks

    Linus Torvalds
     

30 Nov, 2016

1 commit


12 Nov, 2016

1 commit


05 Nov, 2016

1 commit