On Thu, Jan 7, 2010 at 5:18 AM, dong wu <dongwucs@xxxxxxxxx> wrote: > hello, > In the source code,in order to collect multiple write requests,first > add the requests to delayed_list, > then use plug/unplug to wait.During the waiting time,if other requests > arrive to full a stripe_head buffer, > then compute parity and send write request to low level to deal. > If not so, the requests will be set pre-read mark > stripe_preread_active,then send pre-read request to low level. > I want to know if up level send read request and later a write request > arrive to write the same place of read request before, > will the read request be canceled and return the data of write request? No, it is up to the filesystem or whatever code is above the RAID to enforce ordering. In order to guarantee that a read returns the data from a previous write you either need to wait for the write to complete, or with recent kernels send a barrier request to flush the write. -- Dan -- 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