Lines Matching refs:sectors

554 	sector_t sectors = bad->len;  in front_merge()  local
562 merged = min_t(sector_t, sectors, BB_END(p[prev]) - s); in front_merge()
564 merged = min_t(sector_t, sectors, BB_MAX_LEN - BB_LEN(p[prev])); in front_merge()
839 static bool _badblocks_set(struct badblocks *bb, sector_t s, sector_t sectors, in _badblocks_set() argument
852 if (sectors == 0) in _badblocks_set()
858 sector_t next = s + sectors; in _badblocks_set()
862 sectors = next - s; in _badblocks_set()
872 bad.len = sectors; in _badblocks_set()
923 BB_END(p[prev]) - s, sectors); in _badblocks_set()
954 sectors -= len; in _badblocks_set()
956 if (sectors > 0) in _badblocks_set()
978 return sectors == 0; in _badblocks_set()
991 sector_t sectors = bad->len; in front_clear() local
998 if (BB_LEN(p[prev]) > sectors) { in front_clear()
999 p[prev] = BB_MAKE(BB_OFFSET(p[prev]) + sectors, in front_clear()
1000 BB_LEN(p[prev]) - sectors, in front_clear()
1002 cleared = sectors; in front_clear()
1012 if (BB_END(p[prev]) <= (s + sectors)) { in front_clear()
1037 sector_t sectors = bad->len; in front_splitting_clear() local
1044 p[prev + 1] = BB_MAKE(s + sectors, end - s - sectors, ack); in front_splitting_clear()
1045 return sectors; in front_splitting_clear()
1049 static bool _badblocks_clear(struct badblocks *bb, sector_t s, sector_t sectors) in _badblocks_clear() argument
1060 if (sectors == 0) in _badblocks_clear()
1073 target = s + sectors; in _badblocks_clear()
1076 sectors = target - s; in _badblocks_clear()
1086 bad.len = sectors; in _badblocks_clear()
1089 len = sectors; in _badblocks_clear()
1103 len = sectors; in _badblocks_clear()
1115 len = sectors; in _badblocks_clear()
1122 (BB_END(p[prev]) > (bad.start + sectors))) { in _badblocks_clear()
1123 len = sectors; in _badblocks_clear()
1137 len = sectors; in _badblocks_clear()
1161 len = sectors; in _badblocks_clear()
1167 sectors -= len; in _badblocks_clear()
1169 if (sectors > 0) in _badblocks_clear()
1186 static int _badblocks_check(struct badblocks *bb, sector_t s, sector_t sectors, in _badblocks_check() argument
1198 bad.len = sectors; in _badblocks_check()
1201 len = sectors; in _badblocks_check()
1210 len = sectors; in _badblocks_check()
1221 if (BB_END(p[prev]) >= (s + sectors)) in _badblocks_check()
1222 len = sectors; in _badblocks_check()
1242 len = sectors; in _badblocks_check()
1246 WARN_ON(sectors < len); in _badblocks_check()
1249 sectors -= len; in _badblocks_check()
1251 if (sectors > 0) in _badblocks_check()
1298 int badblocks_check(struct badblocks *bb, sector_t s, sector_t sectors, in badblocks_check() argument
1304 WARN_ON(bb->shift < 0 || sectors == 0); in badblocks_check()
1308 sector_t target = s + sectors; in badblocks_check()
1312 sectors = target - s; in badblocks_check()
1317 rv = _badblocks_check(bb, s, sectors, first_bad, bad_sectors); in badblocks_check()
1341 bool badblocks_set(struct badblocks *bb, sector_t s, sector_t sectors, in badblocks_set() argument
1344 return _badblocks_set(bb, s, sectors, acknowledged); in badblocks_set()
1362 bool badblocks_clear(struct badblocks *bb, sector_t s, sector_t sectors) in badblocks_clear() argument
1364 return _badblocks_clear(bb, s, sectors); in badblocks_clear()