Skip to content

block: ignore __blkdev_issue_discard() ret value

Chaitanya Kulkarni bpf dm-devel linux-block linux-f2fs-devel linux-nvme linux-raid linux-xfs lkml 2 versions Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 29 repliesApplied 6/6
  2. v25 patches 18 repliesSuperseded

Patches in v3 All 6 applied

#Subject and filesSizeRepliesApplied
1/6block: ignore discard return valueblock/blk-lib.c+3 -33 repliesApplied
2/6md: ignore discard return valuedrivers/md/md.c+2 -22 repliesApplied
3/6dm: ignore discard return valuedrivers/md/dm-thin.c+5 -72 repliesApplied
4/6nvmet: ignore discard return valuedrivers/nvme/target/io-cmd-bdev.c+7 -215 repliesApplied
5/6f2fs: ignore discard return valuefs/f2fs/segment.c+3 -77 repliesApplied
6/6xfs: ignore discard return valuefs/xfs/xfs_discard.c fs/xfs/xfs_discard.h+6 -238 repliesApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoph HellwigJohannes ThumshirnMartin K. PetersenChao YuAnuj Gupta
SeriesR-b
1/6R-b R-b R-b
2/6R-b R-b R-b
3/6R-b R-b R-b
4/6R-b R-b R-b
5/6R-b R-b R-b R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v3 thread

Cover letter [PATCH V3 0/6] block: ignore __blkdev_issue_discard() ret value

Hi,

__blkdev_issue_discard() only returns value 0, that makes post call error checking code dead. This patch series revmoes this dead code at all the call sites and adjust the callers.

Please note that it doesn't change the return type of the function from int to void in this series, it will be done once this series gets merged smoothly.

For f2fs and xfs I've ran following test which includes discard they produce same PASS and FAIL output with and without this patch series.

  for-next (lblk-fnext)    discard-ret (lblk-discard)
  ---------------------    --------------------------
  FAIL f2fs/008            FAIL f2fs/008
  FAIL f2fs/014            FAIL f2fs/014
  FAIL f2fs/015            FAIL f2fs/015
  PASS f2fs/017            PASS f2fs/017
  PASS xfs/016             PASS xfs/016
  PASS xfs/288             PASS xfs/288
  PASS xfs/432             PASS xfs/432
  PASS xfs/449             PASS xfs/449
  PASS xfs/513             PASS xfs/513
  PASS generic/033         PASS generic/033
  PASS generic/038         PASS generic/038
  PASS generic/098         PASS generic/098
  PASS generic/224         PASS generic/224
  PASS generic/251         PASS generic/251
  PASS generic/260         PASS generic/260
  PASS generic/288         PASS generic/288
  PASS generic/351         PASS generic/351
  PASS generic/455         PASS generic/455
  PASS generic/457         PASS generic/457
  PASS generic/470         PASS generic/470
  PASS generic/482         PASS generic/482
  PASS generic/500         PASS generic/500
  PASS generic/537         PASS generic/537
  PASS generic/608         PASS generic/608
  PASS generic/619         PASS generic/619
  PASS generic/746         PASS generic/746
  PASS generic/757         PASS generic/757

For NVMeOF taret I've testing blktest with nvme_trtype=nvme_loop and all the testcases are passing.

-ck

Changes from V2:-

1. Add Reviewed-by: tags.
2. Split patch 2 into two separate patches dm and md.
3. Condense __blkdev_issue_discard() parameters for in nvmet patch.
4. Condense __blkdev_issue_discard() parameters for in f2fs patch.

Chaitanya Kulkarni (6):
block: ignore discard return value
md: ignore discard return value
dm: ignore discard return value
nvmet: ignore discard return value
f2fs: ignore discard return value
xfs: ignore discard return value

 block/blk-lib.c                   |  6 +++---
 drivers/md/dm-thin.c              | 12 +++++-------
 drivers/md/md.c                   |  4 ++--
 drivers/nvme/target/io-cmd-bdev.c | 28 +++++++---------------------
 fs/f2fs/segment.c                 | 10 +++-------
 fs/xfs/xfs_discard.c              | 27 +++++----------------------
 fs/xfs/xfs_discard.h              |  2 +-
 7 files changed, 26 insertions(+), 63 deletions(-)
Signature · 1 line
2.40.0