pnfs: store a list of layout segments

pnfs_layout_state now stores a list instead of a single pnfs_file_layout entry.  when new segments are acquired through LAYOUTGET, they are inserted into the list in order of increasing offset

functions related to pnfs_layout_state_prepare() now operate on the list to find missing layout ranges and segments missing devices

pattern_init() in pnfs_io.c now allocates and initializes io threads for each layout segment in the range

new function pattern_join() will call WaitForMultipleObjects() in a loop, to support io patterns with more than 64 threads.  if pattern_fork() is called with a thread count of 1, the thread function is called directly instead of spawning a new thread

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2012-01-30 13:40:31 -05:00 committed by unknown
parent 62ed5248bf
commit 5cc317e8a5
4 changed files with 290 additions and 170 deletions

View file

@ -606,7 +606,7 @@ static uint32_t stateid_array(
if (open->layout) { /* layout stateid? */
AcquireSRWLockShared(&open->layout->lock);
if (open->layout->status & PNFS_LAYOUT_GRANTED) {
if (open->layout->stateid.seqid) {
memcpy(&stateids[i].stateid, &open->layout->stateid, sizeof(stateid4));
stateids[i].type = STATEID_LAYOUT;
stateids[i].open = open;