Re: Questions answered by Neil Brown

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

 



"Peter T. Breuer" wrote:
 
> >
> > 3) it is not clear to me that I am doing accounting right on
> >    async writes (or indeed when resyncing and skipping blocks).
> >
> >    The last end_io always did
> >    io_request_done(bh->b_rsector, conf,
> >                           test_bit(R1BH_SyncPhase, &r1_bh->state));
> >    and now this can be done on the first end_io (along with the
> >    bh->b_end_io(bh, uptodate);) in  an async write. Is that right?

> Once you have called bh->b_end_io, you cannot touch that bh every
> again, as it might not even exist.
 
So I think this means that we really need to duplicate the buffer memory
(bh->b_page, bh->b_data) and point the mirror I/Os to the duplicated
buffer, so we can allow the original (master_bh) to be freed before all
the I/Os complete. We then free the duplicate when the last mirror I/O
completes, right?

--
Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
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