Lines Matching refs:nb_sectors
128 int64_t sector_num, int nb_sectors, in is_changed() argument
133 if (!bitmap || nb_sectors == 0) { in is_changed()
134 *num_same = nb_sectors; in is_changed()
139 for (*num_same = 1; *num_same < nb_sectors; (*num_same)++) { in is_changed()
148 int nb_sectors, int *pnum) in cow_is_allocated() argument
151 return is_changed(s->cow_bitmap, sector_num, nb_sectors, pnum); in cow_is_allocated()
155 uint8_t *buf, int nb_sectors) in cow_read() argument
160 while (nb_sectors > 0) { in cow_read()
161 if (is_changed(s->cow_bitmap, sector_num, nb_sectors, &n)) { in cow_read()
176 nb_sectors -= n; in cow_read()
184 const uint8_t *buf, int nb_sectors) in cow_write() argument
190 ret = write(s->fd, buf, nb_sectors * 512); in cow_write()
191 if (ret != nb_sectors * 512) in cow_write()
193 for (i = 0; i < nb_sectors; i++) in cow_write()