Lines Matching defs:sector
49 unsigned long long sector;
62 /* Convert the file position into a sector number and offset. */
64 sector = offset / bch->sectsize;
65 sectoffset = offset - sector * bch->sectsize;
67 if (sector >= bch->nsectors)
72 /* Write the initial partial sector */
77 /* Read the full sector into the sector buffer */
79 ret = bchlib_readsector(bch, sector + bch->sectstart);
85 /* Copy the tail end of the sector from the user buffer */
106 sector++;
108 if (sector >= bch->nsectors)
118 /* Then write all of the full sectors following the partial sector
125 if (sector + nsectors > bch->nsectors)
127 nsectors = bch->nsectors - sector;
130 /* Flush the dirty sector to keep the sector sequence */
142 sector + bch->sectstart, nsectors);
151 sector += nsectors;
155 if (sector >= bch->nsectors)
164 /* Then write any partial final sector */
168 /* Read the sector into the sector buffer */
170 ret = bchlib_readsector(bch, sector + bch->sectstart);
176 /* Copy the head end of the sector from the user buffer */