Re: [PATCH v3] block: fix trace completion for chained bio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 6/16/2021 12:53 PM, Christoph Hellwig wrote:
On Wed, Jun 16, 2021 at 11:08:10AM +0800, edwardh wrote:
@@ -1400,18 +1404,13 @@ void bio_endio(struct bio *bio)
  	if (bio->bi_end_io == bio_chain_endio) {
  		bio = __bio_chain_endio(bio);
  		goto again;
+	} else {
+		blk_throtl_bio_endio(bio);
+		/* release cgroup info */
+		bio_uninit(bio);
+		if (bio->bi_end_io)
+			bio->bi_end_io(bio);

No need for an else after a goto.


We are suggested by Neil Brown in the last version that from the
comment, the bio_chain_endio handling is used *only* to avoid
deep recursion so it should be at the end of the function.
Therefore, the position of blk_throtl_bio_endio() and bio_uninit()
are a bit odd.

We believe that blk_throtl_bio_endio() and bio_uninit() is in
the correct position now. And adding an else closure is our
attempt to make it more clear.

If it's not necessary then V2 patch should work to fix the
missing completion traces. Should we resend PATCH V2?

Thank you,
Edward



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux