Skip to content

Commits

Permalink
Nitesh-Shetty/…
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Feb 20, 2023

  1. dm: Enable copy offload for dm-linear target

    Setting copy_offload_supported flag to enable offload.
    
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    8ce8787 View commit details
    Browse the repository at this point in the history
  2. dm: Add support for copy offload.

    Before enabling copy for dm target, check if underlying devices and
    dm target support copy. Avoid split happening inside dm target.
    Fail early if the request needs split, currently splitting copy
    request is not supported.
    
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    309f661 View commit details
    Browse the repository at this point in the history
  3. nvmet: add copy command support for bdev and file ns

    Add support for handling target command on target.
    For bdev-ns we call into blkdev_issue_copy, which the block layer
    completes by a offloaded copy request to backend bdev or by emulating the
    request.
    
    For file-ns we call vfs_copy_file_range to service our request.
    
    Currently target always shows copy capability by setting
    NVME_CTRL_ONCS_COPY in controller ONCS.
    
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    0b33a02 View commit details
    Browse the repository at this point in the history
  4. nvme: add copy offload support

    For device supporting native copy, nvme driver receives read and
    write request with BLK_COPY op flags.
    For read request the nvme driver populates the payload with source
    information.
    For write request the driver converts it to nvme copy command using the
    source information in the payload and submits to the device.
    current design only supports single source range.
    This design is courtesy Mikulas Patocka's token based copy
    
    trace event support for nvme_copy_cmd.
    Set the device copy limits to queue limits.
    
    Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    Signed-off-by: Javier González <javier.gonz@samsung.com>
    Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    270b61d View commit details
    Browse the repository at this point in the history
  5. fs, block: copy_file_range for def_blk_ops for direct block device.

    For direct block device, use copy_file_range to issue device copy offload,
    and fallback to generic_copy_file_range incase device copy offload
    capability is absent. Modify checks to allow bdevs to use copy_file_range.
    
    Suggested-by: Ming Lei <ming.lei@redhat.com>
    Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    0f95ad2 View commit details
    Browse the repository at this point in the history
  6. block: add emulation for copy

    For the devices which does not support copy, copy emulation is added.
    It is required for in-kernel users like fabrics, where file descriptor is
    not available and hence they can't use copy_file_range.
    Copy-emulation is implemented by reading from source into memory and
    writing to the corresponding destination asynchronously.
    Also emulation is used, if copy offload fails or partially completes.
    
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
    Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    8f7f443 View commit details
    Browse the repository at this point in the history
  7. block: Add copy offload support infrastructure

    Introduce blkdev_issue_copy which takes similar arguments as
    copy_file_range and performs copy offload between two bdevs.
    Introduce REQ_COPY copy offload operation flag. Create a read-write
    bio pair with a token as payload and submitted to the device in order.
    Read request populates token with source specific information which
    is then passed with write request.
    This design is courtesy Mikulas Patocka's token based copy
    
    Larger copy will be divided, based on max_copy_sectors limit.
    
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    10e1fc4 View commit details
    Browse the repository at this point in the history
  8. block: Introduce queue limits for copy-offload support

    Add device limits as sysfs entries,
            - copy_offload (RW)
            - copy_max_bytes (RW)
            - copy_max_bytes_hw (RO)
    
    Above limits help to split the copy payload in block layer.
    copy_offload: used for setting copy offload(1) or emulation(0).
    copy_max_bytes: maximum total length of copy in single payload.
    copy_max_bytes_hw: Reflects the device supported maximum limit.
    
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
    Signed-off-by: Kanchan Joshi <joshi.k@samsung.com>
    Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
    nj-shetty authored and intel-lab-lkp committed Feb 20, 2023
    Copy the full SHA
    c6b370e View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. dm ioctl: remove unnecessary check when using dm_get_mdptr()

    __hash_remove() removes hash_cell with _hash_lock locked, so acquiring
    _hash_lock can guarantee no-NULL hc returned from dm_get_mdptr() must
    have not been removed and hc->md must still be md.
    
    __hash_remove() also acquires dm_hash_cells_mutex before setting mdptr
    as NULL. So in dm_copy_name_and_uuid(), after acquiring
    dm_hash_cells_mutex and ensuring returned hc is not NULL, the returned
    hc must still be alive and hc->md must still be md.
    
    Remove the unnecessary hc->md != md checks when using dm_get_mdptr()
    with _hash_lock or dm_hash_cells_mutex acquired.
    
    Signed-off-by: Hou Tao <houtao1@huawei.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Hou Tao authored and Mike Snitzer committed Feb 17, 2023
    Copy the full SHA
    a2f998a View commit details
    Browse the repository at this point in the history
  2. dm ioctl: assert _hash_lock is held in __hash_remove

    Also update dm_early_create() to take _hash_lock when calling both
    __get_name_cell and __hash_remove -- given dm_early_create()'s early
    boot usecase this locking isn't about correctness but it allows
    lockdep_assert_held() to be added to __hash_remove.
    
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mike Snitzer committed Feb 17, 2023
    Copy the full SHA
    69868be View commit details
    Browse the repository at this point in the history
  3. dm cache: add cond_resched() to various workqueue loops

    Otherwise on resource constrained systems these workqueues may be too
    greedy.
    
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mike Snitzer committed Feb 17, 2023
    Copy the full SHA
    76227f6 View commit details
    Browse the repository at this point in the history
  4. dm thin: add cond_resched() to various workqueue loops

    Otherwise on resource constrained systems these workqueues may be too
    greedy.
    
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mike Snitzer committed Feb 17, 2023
    Copy the full SHA
    e4f8030 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. dm: add cond_resched() to dm_wq_requeue_work()

    Otherwise the while() loop in dm_wq_requeue_work() can result in a
    "dead loop" on systems that have preemption disabled. This is
    particularly problematic on single cpu systems.
    
    Fixes: 8b211aa ("dm: add two stage requeue mechanism")
    Cc: stable@vger.kernel.org
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mike Snitzer committed Feb 16, 2023
    Copy the full SHA
    f77692d View commit details
    Browse the repository at this point in the history
  2. dm: add cond_resched() to dm_wq_work()

    Otherwise the while() loop in dm_wq_work() can result in a "dead
    loop" on systems that have preemption disabled. This is particularly
    problematic on single cpu systems.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Pingfan Liu <piliu@redhat.com>
    Acked-by: Ming Lei <ming.lei@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Pingfan Liu authored and Mike Snitzer committed Feb 16, 2023
    Copy the full SHA
    0ca44fc View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. dm sysfs: make kobj_type structure constant

    Since commit ee6d3dd ("driver core: make kobj_type constant.")
    the driver core allows the usage of const struct kobj_type.
    
    Take advantage of this to constify the structure definition to prevent
    modification at runtime.
    
    Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    t-8ch authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    b0bbd86 View commit details
    Browse the repository at this point in the history
  2. dm: update targets using system workqueues to use a local workqueue

    Flushing system-wide workqueues is dangerous and will be forbidden.
    Use a local workqueue in dm-mpath.c, dm-raid1.c, and dm-stripe.c.
    
    Link: https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp
    Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Tetsuo Handa authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    a7e8f7f View commit details
    Browse the repository at this point in the history
  3. dm: remove flush_scheduled_work() during local_exit()

    Commit acfe0ad ("dm: allocate a special workqueue for deferred
    device removal") switched from using system workqueue to a single
    workqueue local to DM.  But it didn't eliminate the call to
    flush_scheduled_work() that was introduced purely for the benefit of
    deferred device removal with commit 2c140a2 ("dm: allow remove to
    be deferred").
    
    Since DM core uses its own workqueue (and queue_work) there is no need
    to call flush_scheduled_work() from local_exit().  local_exit()'s
    destroy_workqueue(deferred_remove_workqueue) handles flushing work
    started with queue_work().
    
    Fixes: acfe0ad ("dm: allocate a special workqueue for deferred device removal")
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    0b22ff5 View commit details
    Browse the repository at this point in the history
  4. dm clone: prefer kvmalloc_array()

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    f0ac159 View commit details
    Browse the repository at this point in the history
  5. dm: declare variables static when sensible

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    774f13a View commit details
    Browse the repository at this point in the history
  6. dm: fix suspect indent whitespace

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    23fda2e View commit details
    Browse the repository at this point in the history
  7. dm ioctl: prefer strscpy() instead of strlcpy()

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    22a8b84 View commit details
    Browse the repository at this point in the history
  8. dm: avoid void function return statements

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    b39b732 View commit details
    Browse the repository at this point in the history
  9. dm integrity: change macros min/max() -> min_t/max_t where appropriate

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    ba287d7 View commit details
    Browse the repository at this point in the history
  10. dm: fix use of sizeof() macro

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    8d1058f View commit details
    Browse the repository at this point in the history
  11. dm: avoid 'do {} while(0)' loop in single statement macros

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    6cc435f View commit details
    Browse the repository at this point in the history
  12. dm log: avoid multiple line dereference

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    dcdd467 View commit details
    Browse the repository at this point in the history
  13. dm log: avoid trailing semicolon in macro

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    fb99e87 View commit details
    Browse the repository at this point in the history
  14. dm ioctl: have constant on the right side of the test

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    5cae0aa View commit details
    Browse the repository at this point in the history
  15. dm: don't indent labels

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    a6ba79c View commit details
    Browse the repository at this point in the history
  16. dm: avoid inline filenames

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    9bfeac5 View commit details
    Browse the repository at this point in the history
  17. dm: add missing blank line after declarations/fix those

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    b30f160 View commit details
    Browse the repository at this point in the history
  18. dm: avoid useless 'else' after 'break' or return'

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    1c3fe2f View commit details
    Browse the repository at this point in the history
  19. dm: favour __packed versus "__attribute__ ((packed))"

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    ae99111 View commit details
    Browse the repository at this point in the history
  20. dm: favour __aligned(N) versus "__attribute__ (aligned(N))"

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    f8922a4 View commit details
    Browse the repository at this point in the history
  21. dm: avoid using symbolic permissions

    Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@kernel.org>
    mauelsha authored and Mike Snitzer committed Feb 14, 2023
    Copy the full SHA
    6a80803 View commit details
    Browse the repository at this point in the history
Older