Skip to contentSkip to conversation

md/raid10: Don't print warn calltrace for discard with REQ_NOWAIT

PATCH In review Xiao Ni 2 participants 4 messages Mar 4, 2025 MD RAID

lore
Share & tools
lore

Xiao Ni

author
#0 lore raw

PATCH 1/1 md/raid10: Don't print warn calltrace for discard with REQ_NOWAIT

There is no need to print warn call trace. And it also can confuse qe and mark test case failure.

---
 drivers/md/raid10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid10.c +1 -1
index 15b9ae5bf84d..0441691130c7 100644
@@ -1631,7 +1631,7 @@ static int raid10_handle_discard(struct mddev *mddev, struct bio *bio)
 	if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
 		return -EAGAIN;
 
-	if (WARN_ON_ONCE(bio->bi_opf & REQ_NOWAIT)) {
+	if (bio->bi_opf & REQ_NOWAIT) {
 		bio_wouldblock_error(bio);
 		return 0;
 	}
Signature · 1 line
2.32.0 (Apple Git-132)
#1 lore raw

Dear Xiao,

Thank you for your patch.

Am 04.03.25 um 10:09 schrieb Xiao Ni:

Quoted 1 line

There is no need to print warn call trace. And it also can confuse

Why is there no need?

Quoted 1 line

qe and mark test case failure.

What is *qe*?

Quoted 10 lines
---
  drivers/md/raid10.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid10.c +0 -0
index 15b9ae5bf84d..0441691130c7 100644

drivers/md/raid10.c static int raid10_handle_discard(struct mddev *mddev, struct bio *bio) · line 1637

Quoted 8 lines
drivers/md/raid10.c +1 -1
@@ -1631,7 +1631,7 @@ static int raid10_handle_discard(struct mddev *mddev, struct bio *bio)
  	if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
  		return -EAGAIN;
 
-	if (WARN_ON_ONCE(bio->bi_opf & REQ_NOWAIT)) {
+	if (bio->bi_opf & REQ_NOWAIT) {
  		bio_wouldblock_error(bio);
  		return 0;
  	}

Kind regards,

Paul

author
#2 lore raw
Quoted 11 lines · Paul Menzel

Dear Xiao,

Thank you for your patch.

Am 04.03.25 um 10:09 schrieb Xiao Ni:

Quoted 1 line

There is no need to print warn call trace. And it also can confuse

Why is there no need?

Hi Paul

I use raid1 as a reference, there is no warning there. And why is there need to give warning message?

Quoted 4 lines
Quoted 2 lines

qe and mark test case failure.

What is *qe*?

quality engineering team. They check the result and report error if the dmesg has calltrace(warning/error)

Regards
Xiao

Quoted 25 lines
Quoted 11 lines
---
  drivers/md/raid10.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid10.c +0 -0
index 15b9ae5bf84d..0441691130c7 100644

drivers/md/raid10.c static int raid10_handle_discard(struct mddev *mddev, struct bio *bio) · line 1637

Quoted 8 lines
drivers/md/raid10.c +1 -1
@@ -1631,7 +1631,7 @@ static int raid10_handle_discard(struct mddev *mddev, struct bio *bio)
      if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
              return -EAGAIN;
 
-     if (WARN_ON_ONCE(bio->bi_opf & REQ_NOWAIT)) {
+     if (bio->bi_opf & REQ_NOWAIT) {
              bio_wouldblock_error(bio);
              return 0;
      }

Kind regards,

Paul

author
#3 lore raw
In reply to Xiao Ni

Please ignore this patch. It should use wait_barrier first before returning the discard request with REQ_NOWATI to the upper layer.

Regards
Xiao

Quoted 26 lines · Xiao Ni

There is no need to print warn call trace. And it also can confuse qe and mark test case failure.

---
 drivers/md/raid10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/raid10.c +1 -2
index 15b9ae5bf84d..0441691130c7 100644
@@ -1631,7 +1631,7 @@ static int raid10_handle_discard(struct mddev *mddev, struct bio *bio)
        if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery))
                return -EAGAIN;
 
-       if (WARN_ON_ONCE(bio->bi_opf & REQ_NOWAIT)) {
+       if (bio->bi_opf & REQ_NOWAIT) {
                bio_wouldblock_error(bio);
                return 0;
        }
--

2.32.0 (Apple Git-132)