Lines Matching defs:count

190  * @count:	number of bytes to read
193 * This function will read @count bytes from device @dev at position @pos into
197 * lower than @count this means that we have either reached end of file or
199 * end of file or nothing to read (@count is 0).
205 s64 ntfs_pread(struct ntfs_device *dev, const s64 pos, s64 count, void *b)
210 ntfs_log_trace("pos %lld, count %lld\n",(long long)pos,(long long)count);
212 if (!b || count < 0 || pos < 0) {
216 if (!count)
221 for (total = 0; count; count -= br, total += br) {
222 br = dops->pread(dev, (char*)b + total, count, pos + total);
240 * @count: number of bytes to write
243 * This function will write @count bytes from data buffer @b to the device @dev
247 * is lower than @count this means that the write has been interrupted in
249 * is partial. 0 means nothing was written (also return 0 when @count is 0).
255 s64 ntfs_pwrite(struct ntfs_device *dev, const s64 pos, s64 count,
261 ntfs_log_trace("pos %lld, count %lld\n",(long long)pos,(long long)count);
263 if (!b || count < 0 || pos < 0) {
267 if (!count)
277 for (total = 0; count; count -= written, total += written) {
278 written = dops->pwrite(dev, (const char*)b + total, count,
304 * @count: number of blocks to read
308 * Multi sector transfer (mst) positioned read. This function will read @count
313 * lower than @count this means that we have reached end of file, that the read
316 * when @count or @bksize are 0).
324 * is possible that we return count blocks as being read but that any number
325 * (between zero and count!) of these blocks is actually subject to a multi
329 s64 ntfs_mst_pread(struct ntfs_device *dev, const s64 pos, s64 count,
339 br = ntfs_pread(dev, pos, count * bksize, b);
348 count = br / bksize;
349 for (i = 0; i < count; ++i)
353 return count;
360 * @count: number of blocks to write
365 * @count blocks of size @bksize bytes each from data buffer @b to the device
369 * is lower than @count this means that the write has been interrupted or that
371 * means nothing was written (also return 0 when @count or @bksize are 0).
386 s64 ntfs_mst_pwrite(struct ntfs_device *dev, const s64 pos, s64 count,
391 if (count < 0 || bksize % NTFS_BLOCK_SIZE) {
395 if (!count)
398 for (i = 0; i < count; ++i) {
407 count = i;
412 written = ntfs_pwrite(dev, pos, count * bksize, b);
414 for (i = 0; i < count; ++i)
426 * @count: number of clusters to read
429 * Read @count ntfs clusters starting at logical cluster number @lcn from
433 s64 ntfs_cluster_read(const ntfs_volume *vol, const s64 lcn, const s64 count,
438 if (!vol || lcn < 0 || count < 0) {
442 if (vol->nr_clusters < lcn + count) {
446 (long long)lcn + count);
450 count << vol->cluster_size_bits, b);
462 * @count: number of clusters to write
465 * Write @count ntfs clusters starting at logical cluster number @lcn from
470 const s64 count, const void *b)
474 if (!vol || lcn < 0 || count < 0) {
478 if (vol->nr_clusters < lcn + count) {
482 (long long)lcn + count);
487 count << vol->cluster_size_bits, b);
489 bw = count << vol->cluster_size_bits;