Lines Matching defs:writepos
6281 sector_t writepos, readpos, safepos;
6323 writepos = conf->reshape_progress;
6324 sector_div(writepos, new_data_disks);
6330 BUG_ON(writepos < reshape_sectors);
6331 writepos -= reshape_sectors;
6335 writepos += reshape_sectors;
6344 /* Having calculated the 'writepos' possibly use it
6349 stripe_addr = writepos;
6355 BUG_ON(writepos != sector_nr + reshape_sectors);
6359 /* 'writepos' is the most advanced device address we might write.
6365 * increasing writepos if diff is positive.
6366 * If 'readpos' is then behind 'writepos', there is no way that we can
6370 * Otherwise if 'safepos' is behind 'writepos', then we really need to
6373 * So we insist on updating metadata if safepos is behind writepos and
6374 * readpos is beyond writepos.
6383 writepos += conf->min_offset_diff;
6386 ? (safepos > writepos && readpos < writepos)
6387 : (safepos < writepos && readpos > writepos)) ||