Re: How are reads and writes kept in order in raid5.c?

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

 



Yes, I think that clears it up.

So, a single stripe (or even a single chunk) could certainly have both outstanding read and write requests, but they are guaranteed to not be overlapping.

Is it also safe to assume that you'd never have outstanding, overlapping write requests either (since order is not maintained within the bio list)?

I always thought the drive/device driver was responsible for keeping requests in order. But you're saying that's been delegated to the filesystem, correct?

That certainly makes life easier. No wonder I've been having a hard time wrapping my brain around this code.


At 10:25 PM 2/19/2004, Neil Brown wrote:
On Thursday February 19, nathapl@cs.okstate.edu wrote:
> I've gotten through most of handle_stripe, but I'm still confused on one
> big thing:  The reads and the writes are separated into two separate lists
> as soon as they come into make_request.  What guarantees they are done in
> order?  I can't see any mechanism that maintains any specific ordering of
> the bion.  Just that reads are done first, when possible, then
> writes.  What am I missing?

You aren't missing anything in the code - no ordering is enforced.

If a filesystem issues a 'write' request and then, before that
completes, issues a read request, the read could get either the before
or after values.  But that is probably true of normal disk-drives
too.  A filesystem simply shouldn't do that.

Does that clear up the question?

NeilBrown

- 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