Lines Matching refs:safepos
6281 sector_t writepos, readpos, safepos;
6327 safepos = conf->reshape_safe;
6328 sector_div(safepos, data_disks);
6333 safepos += reshape_sectors;
6336 /* readpos and safepos are worst-case calculations.
6341 safepos -= min_t(sector_t, reshape_sectors, safepos);
6361 * 'safepos' is the least address recorded in the metadata as having
6364 * increasing the safepos/readpos if diff is negative, or
6370 * Otherwise if 'safepos' is behind 'writepos', then we really need to
6371 * update the metadata to advance 'safepos' to match 'readpos' so that
6373 * So we insist on updating metadata if safepos is behind writepos and
6380 safepos += -conf->min_offset_diff;
6386 ? (safepos > writepos && readpos < writepos)
6387 : (safepos < writepos && readpos > writepos)) ||