/fs/squashfs/ |
D | page_actor.c | 46 int i, avail, pos = 0; in squashfs_actor_to_buf() local 49 avail = min_t(int, length - pos, PAGE_SIZE); in squashfs_actor_to_buf() 52 memcpy(buf + pos, pageaddr, avail); in squashfs_actor_to_buf() 55 pos += avail; in squashfs_actor_to_buf() 63 int i, avail, pos = 0; in squashfs_buf_to_actor() local 66 avail = min_t(int, length - pos, PAGE_SIZE); in squashfs_buf_to_actor() 69 memcpy(pageaddr, buf + pos, avail); in squashfs_buf_to_actor() 72 pos += avail; in squashfs_buf_to_actor() 80 int bytes = 0, pgoff = 0, b = 0, p = 0, i, avail; in squashfs_bh_to_actor() local 86 avail = min_t(int, blksz - offset, in squashfs_bh_to_actor() [all …]
|
D | xz_wrapper.c | 137 int avail, total = 0, k = 0; in squashfs_xz_uncompress() local 150 avail = min(length, msblk->devblksize - offset); in squashfs_xz_uncompress() 151 length -= avail; in squashfs_xz_uncompress() 153 stream->buf.in_size = avail; in squashfs_xz_uncompress()
|
D | zlib_wrapper.c | 79 int avail = min(length, msblk->devblksize - offset); in zlib_uncompress() local 80 length -= avail; in zlib_uncompress() 82 stream->avail_in = avail; in zlib_uncompress()
|
D | file.c | 395 int avail = buffer ? min_t(int, bytes, PAGE_CACHE_SIZE) : 0; in squashfs_copy_cache() local 397 TRACE("bytes %d, i %d, available_bytes %d\n", bytes, i, avail); in squashfs_copy_cache() 409 squashfs_copy_data(pageaddr, buffer, offset, avail); in squashfs_copy_cache() 410 memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail); in squashfs_copy_cache()
|
/fs/ubifs/ |
D | io.c | 505 ubifs_assert(!(wbuf->avail & 7)); in ubifs_wbuf_sync_nolock() 547 wbuf->avail = wbuf->size; in ubifs_wbuf_sync_nolock() 588 wbuf->avail = wbuf->size; in ubifs_wbuf_seek_nolock() 686 ubifs_assert(wbuf->avail > 0 && wbuf->avail <= wbuf->size); in ubifs_wbuf_write_nolock() 706 if (aligned_len <= wbuf->avail) { in ubifs_wbuf_write_nolock() 713 if (aligned_len == wbuf->avail) { in ubifs_wbuf_write_nolock() 727 wbuf->avail = wbuf->size; in ubifs_wbuf_write_nolock() 733 wbuf->avail -= aligned_len; in ubifs_wbuf_write_nolock() 751 memcpy(wbuf->buf + wbuf->used, buf, wbuf->avail); in ubifs_wbuf_write_nolock() 758 len -= wbuf->avail; in ubifs_wbuf_write_nolock() [all …]
|
D | tnc_commit.c | 417 int lnum, offs, len, next_len, buf_len, buf_offs, used, avail; in layout_in_empty_space() local 430 avail = buf_len; in layout_in_empty_space() 451 avail = buf_len; in layout_in_empty_space() 497 avail -= ALIGN(len, 8); in layout_in_empty_space() 501 avail > 0) in layout_in_empty_space() 504 if (avail <= 0 && next_len && in layout_in_empty_space() 524 avail = buf_len - used; in layout_in_empty_space() 812 int avail, wlen, err, lnum_pos = 0, blen, nxt_offs; in write_index() local 828 avail = buf_len; in write_index() 873 avail = buf_len; in write_index() [all …]
|
D | orphan.c | 204 int avail_lebs, avail, gap; in avail_orphs() local 207 avail = avail_lebs * in avail_orphs() 211 avail += (gap - UBIFS_ORPH_NODE_SZ) / sizeof(__le64); in avail_orphs() 212 return avail; in avail_orphs() 224 int avail_lebs, avail; in tot_avail_orphs() local 227 avail = avail_lebs * in tot_avail_orphs() 229 return avail / 2; in tot_avail_orphs() 417 int avail, atomic = 0, err; in commit_orphans() local 420 avail = avail_orphs(c); in commit_orphans() 421 if (avail < c->cmt_orphans) { in commit_orphans()
|
D | gc.c | 371 int avail; in move_nodes() local 376 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes() 377 if (snod->len > avail) in move_nodes() 391 avail = c->leb_size - wbuf->offs - wbuf->used; in move_nodes() 392 if (avail < min) in move_nodes() 395 if (snod->len > avail) { in move_nodes()
|
D | journal.c | 117 int err = 0, err1, retries = 0, avail, lnum, offs, squeeze; in reserve_space() local 135 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space() 136 if (wbuf->lnum != -1 && avail >= len) in reserve_space() 184 avail = c->leb_size - wbuf->offs - wbuf->used; in reserve_space() 186 if (wbuf->lnum != -1 && avail >= len) { in reserve_space()
|
D | ubifs.h | 682 int avail; member
|
/fs/ |
D | aio.c | 288 unsigned head, avail; in free_ioctx() local 311 avail = (head <= ctx->tail ? ctx->tail : ctx->nr_events) - head; in free_ioctx() 313 atomic_sub(avail, &ctx->reqs_active); in free_ioctx() 314 head += avail; in free_ioctx() 721 long avail; in aio_read_events_ring() local 725 avail = (head <= ctx->tail ? ctx->tail : ctx->nr_events) - head; in aio_read_events_ring() 729 avail = min(avail, nr - ret); in aio_read_events_ring() 730 avail = min_t(long, avail, AIO_EVENTS_PER_PAGE - in aio_read_events_ring() 739 sizeof(*ev) * avail); in aio_read_events_ring() 747 ret += avail; in aio_read_events_ring() [all …]
|
/fs/jffs2/ |
D | nodemgmt.c | 26 uint32_t avail; in jffs2_rp_can_write() local 29 avail = c->dirty_size + c->free_size + c->unchecked_size + in jffs2_rp_can_write() 33 if (avail < 2 * opts->rp_size) in jffs2_rp_can_write() 39 c->nr_erasing_blocks, avail, c->nospc_dirty_size); in jffs2_rp_can_write() 41 if (avail > opts->rp_size) in jffs2_rp_can_write() 101 uint32_t dirty, avail; in jffs2_reserve_space() local 140 avail = c->free_size + c->dirty_size + c->erasing_size + c->unchecked_size; in jffs2_reserve_space() 141 if ( (avail / c->sector_size) <= blocksneeded) { in jffs2_reserve_space() 149 avail, blocksneeded * c->sector_size); in jffs2_reserve_space()
|
D | fs.c | 209 unsigned long avail; in jffs2_statfs() local 221 avail = c->dirty_size + c->free_size; in jffs2_statfs() 222 if (avail > c->sector_size * c->resv_blocks_write) in jffs2_statfs() 223 avail -= c->sector_size * c->resv_blocks_write; in jffs2_statfs() 225 avail = 0; in jffs2_statfs() 228 buf->f_bavail = buf->f_bfree = avail >> PAGE_SHIFT; in jffs2_statfs()
|
/fs/nfsd/ |
D | nfs3xdr.c | 451 unsigned int len, avail; in nfs3svc_decode_symlinkargs() local 474 avail = vec->iov_len - (old - (char*)vec->iov_base); in nfs3svc_decode_symlinkargs() 475 while (len && avail && *old) { in nfs3svc_decode_symlinkargs() 478 avail--; in nfs3svc_decode_symlinkargs() 481 if (len && !avail && rqstp->rq_arg.page_len) { in nfs3svc_decode_symlinkargs() 482 avail = rqstp->rq_arg.page_len; in nfs3svc_decode_symlinkargs() 483 if (avail > PAGE_SIZE) in nfs3svc_decode_symlinkargs() 484 avail = PAGE_SIZE; in nfs3svc_decode_symlinkargs() 487 while (len && avail && *old) { in nfs3svc_decode_symlinkargs() 490 avail--; in nfs3svc_decode_symlinkargs()
|
D | nfs4xdr.c | 142 unsigned int avail = (char *)argp->end - (char *)argp->p; in read_buf() local 144 if (avail + argp->pagelen < nbytes) in read_buf() 146 if (avail + PAGE_SIZE < nbytes) /* need more than a page !! */ in read_buf() 163 memcpy(p, argp->p, avail); in read_buf() 174 memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); in read_buf() 175 argp->p += XDR_QUADLEN(nbytes - avail); in read_buf() 1130 int avail; in nfsd4_decode_write() local 1148 avail = (char*)argp->end - (char*)argp->p; in nfsd4_decode_write() 1149 if (avail + argp->pagelen < write->wr_buflen) { in nfsd4_decode_write() 1155 write->wr_head.iov_len = avail; in nfsd4_decode_write() [all …]
|
D | nfs4state.c | 821 int avail; in nfsd4_get_drc_mem() local 824 avail = min((unsigned long)NFSD_MAX_MEM_PER_SESSION, in nfsd4_get_drc_mem() 826 num = min_t(int, num, avail / slotsize); in nfsd4_get_drc_mem()
|
/fs/ceph/ |
D | debugfs.c | 129 int total, avail, used, reserved, min; in caps_show() local 131 ceph_reservation_status(fsc, &total, &avail, &used, &reserved, &min); in caps_show() 137 total, avail, used, reserved, min); in caps_show()
|
D | super.h | 542 int *total, int *avail, int *used,
|
D | caps.c | 294 int *total, int *avail, int *used, int *reserved, in ceph_reservation_status() argument 301 if (avail) in ceph_reservation_status() 302 *avail = mdsc->caps_avail_count; in ceph_reservation_status()
|
/fs/sdcardfs/ |
D | sdcardfs.h | 591 u64 avail; in check_min_free_space() local 612 avail = statfs.f_bavail * statfs.f_bsize; in check_min_free_space() 615 if ((u64)size > avail) in check_min_free_space() 619 if ((avail - size) > (sbi->options.reserved_mb * 1024 * 1024)) in check_min_free_space()
|
/fs/btrfs/ |
D | extent-tree.c | 3826 u64 avail; in can_overcommit() local 3848 avail = root->fs_info->free_chunk_space; in can_overcommit() 3860 avail >>= 1; in can_overcommit() 3878 to_add = min(avail, to_add); in can_overcommit()
|