Lines Matching refs:sectors
156 static inline s64 ptr_disk_sectors(s64 sectors, struct extent_ptr_decoded p)
158 EBUG_ON(sectors < 0);
161 ? DIV_ROUND_UP_ULL(sectors * p.crc.compressed_size,
163 : sectors;
403 if (res->sectors) {
404 this_cpu_sub(*c->online_reserved, res->sectors);
405 res->sectors = 0;
416 u64 sectors, int flags)
423 if (sectors > old)
424 return __bch2_disk_reservation_add(c, res, sectors, flags);
426 new = old - sectors;
429 this_cpu_add(*c->online_reserved, sectors);
430 res->sectors += sectors;
433 return __bch2_disk_reservation_add(c, res, sectors, flags);
441 .sectors = 0,
452 u64 sectors, unsigned nr_replicas,
457 return bch2_disk_reservation_add(c, res, sectors * nr_replicas, flags);