On 2012-07-04 10:30 NeilBrown <neilb@xxxxxxx> Wrote: >On Tue, 3 Jul 2012 16:52:49 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote: > >> On 2012-07-03 14:38 NeilBrown <neilb@xxxxxxx> Wrote: >> >On Tue, 3 Jul 2012 14:23:41 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote: >> > >> >> Because bios will merge at block-layer,so bios-error may caused by other >> >> bio which be merged into to the same request. >> >> Using this flag,it will find exactly error-sector and not do redundant >> >> operation like re-write and re-read. >> >> >> >> Signed-off-by: majianpeng <majianpeng@xxxxxxxxx> >> > >> >Hi, >> > I think this patch needs a more detailed explanation. >> > >> >What exactly is the situation that causes a problem, and what exactly is the >> >problem that it causes? >> > >> >Pretend that I don't know anything about what happens below the md level.. >> > >> >Thanks, >> >NeilBrown >> > >> > .... >> >> >> > >> > >> How about the below explanation: >> >> Because bio will be merged at block-layer,so bios-error may caused by other >> bio which be merged into to the same request. >> For example: if chunk_aligned_read failed, it will add bio to some stipe. >> But because the bio-merge function,those bios at most be merged.It will like >> the chunk_aligned_read and returen error.Then it will re-write and re-read. >> Suppose RAID5 created by n disk and chunk-size is 512K. >> If read 512k chunk_aligned and met error(sector 0 is media error), >> then add 512/4=128 stipe.If those bios merged and must be error.The rewrite operation >> will read (n-1) * 128 and computer 128 stripe.But using this flag,we only exec one rewrite. >> This occur in resync/repair situation and chunk-aligned-read. >> >> May be using this flag,we can find exact bad-sector.Not recorded the whole request bios >> as bad-sector > >Thanks. That make some sense. > >I wonder if we can just use REQ_FUA to stop requests being merged, rather >than create a new flag. In general we should probably be using REQ_FUA in >all the cases where we are checking for, and trying to fix, read errors. > >Thanks, >NeilBrown > > Using REQ_FUA/REQ_FLUSH can have same effect. But i think REQ_FUA/REQ_FLUSH operation do more work for example, pre_flush/post_pflush and the harddisk will do more work.But our purpose only exec bio slonely.?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f