Re: [BUG] MD/RAID1 hung forever on freeze_array

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

 



On Mon, Dec 12, 2016 at 1:59 AM, NeilBrown <neilb@xxxxxxxx> wrote:
> On Sat, Nov 26 2016, Jinpu Wang wrote:
>> [  810.270860]  [<ffffffff813fc851>] blk_prologue_bio+0x91/0xc0
>
> What is this?  I cannot find that function in the upstream kernel.
>
> NeilBrown

Hi Neil,

blk_prologue_bio is our internal extension to gather some stats, sorry
not informed before.

It does below, code snip only:
+static void bio_endio_complete_diskstat(struct bio *clone)
+{
+       struct bio *bio = clone->bi_private;
+       struct block_device *bdev = bio->bi_bdev;
+       struct hd_struct *hdp = bdev->bd_part;
+       unsigned long start = clone->bi_start_time;
+       const int rw = !!bio_data_dir(bio);
+       int cpu, err = clone->bi_error;
+
+       bio_put(clone);
+       blk_end_io_acct()
+       bio->bi_error = err;
+       bio_endio(bio);
+}
+
+blk_qc_t blk_prologue_bio(struct request_queue *q, struct bio *bio)
+{
+       struct block_device *bdev = bio->bi_bdev;
+       struct hd_struct *hdp = bdev->bd_part;
+       struct bio *clone;
+
+       if (!hdp->additional_diskstat)
+               return q->custom_make_request_fn(q, bio);
+       clone = bio_clone_fast(bio, GFP_NOWAIT | __GFP_NOWARN, NULL);
+       if (unlikely(!clone))
+               return q->custom_make_request_fn(q, bio);
+       clone->bi_start_time = jiffies;
+       if (hdp->bio_mode_diskstat) {
+               int rw = !!bio_data_dir(bio);
+
+               generic_start_io_acct(rw, bio_sectors(clone), hdp);
+       }
+       clone->bi_end_io = bio_endio_complete_diskstat;
+       clone->bi_private = bio;
+       return q->custom_make_request_fn(q, clone);
+}

IMHO, it seems unrelated, but I will rerun my test without this change.

-- 
Jinpu Wang
Linux Kernel Developer

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Tel:       +49 30 577 008  042
Fax:      +49 30 577 008 299
Email:    jinpu.wang@xxxxxxxxxxxxxxxx
URL:      https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux