Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 102) sorted by relevance

12345

/fs/btrfs/
Dfree-space-cache.c30 u64 bytes; member
516 static int io_ctl_add_entry(struct btrfs_io_ctl *io_ctl, u64 offset, u64 bytes, in io_ctl_add_entry() argument
526 entry->bytes = cpu_to_le64(bytes); in io_ctl_add_entry()
600 entry->bytes = le64_to_cpu(e->bytes); in io_ctl_read_entry()
650 if (prev->offset + prev->bytes == e->offset) { in merge_space_tree()
653 prev->bytes += e->bytes; in merge_space_tree()
756 if (!e->bytes) { in __load_free_space_cache()
953 ret = io_ctl_add_entry(io_ctl, e->offset, e->bytes, in write_cache_extent_entries()
983 trim_entry->bytes, NULL); in write_cache_extent_entries()
1429 static inline unsigned long bytes_to_bits(u64 bytes, u32 unit) in bytes_to_bits() argument
[all …]
Dspace-info.h73 u64 bytes; member
93 s64 bytes) \
95 const u64 abs_bytes = (bytes < 0) ? -bytes : bytes; \
97 trace_update_##name(fs_info, sinfo, sinfo->name, bytes); \
100 bytes > 0); \
101 if (bytes < 0 && sinfo->name < -bytes) { \
106 sinfo->name += bytes; \
123 struct btrfs_space_info *info, u64 bytes,
Dlzo.c160 unsigned long bytes; in lzo_compress_pages() local
209 bytes = min_t(unsigned long, pg_bytes_left, out_len); in lzo_compress_pages()
211 memcpy(cpage_out + out_offset, buf, bytes); in lzo_compress_pages()
213 out_len -= bytes; in lzo_compress_pages()
214 pg_bytes_left -= bytes; in lzo_compress_pages()
215 buf += bytes; in lzo_compress_pages()
216 out_offset += bytes; in lzo_compress_pages()
316 unsigned long bytes; in lzo_decompress_bio() local
378 bytes = in_len; in lzo_decompress_bio()
387 bytes = min(working_bytes, in_page_bytes_left); in lzo_decompress_bio()
[all …]
Dspace-info.c164 struct btrfs_space_info *space_info, u64 bytes, in can_overcommit() argument
204 if (used + bytes < space_info->total_bytes + avail) in can_overcommit()
230 if ((used + ticket->bytes <= space_info->total_bytes) || in btrfs_try_granting_tickets()
231 can_overcommit(fs_info, space_info, ticket->bytes, flush, in btrfs_try_granting_tickets()
235 ticket->bytes); in btrfs_try_granting_tickets()
237 ticket->bytes = 0; in btrfs_try_granting_tickets()
285 struct btrfs_space_info *info, u64 bytes, in btrfs_dump_space_info() argument
307 btrfs_dump_free_space(cache, bytes); in btrfs_dump_space_info()
340 u64 bytes; in calc_reclaim_items_nr() local
343 bytes = btrfs_calc_insert_metadata_size(fs_info, 1); in calc_reclaim_items_nr()
[all …]
Dfree-space-cache.h12 u64 bytes; member
96 u64 offset, u64 bytes, u64 empty_size,
100 u64 bytes);
103 u64 offset, u64 bytes, u64 empty_size);
106 struct btrfs_free_cluster *cluster, u64 bytes,
117 u64 offset, u64 bytes, bool bitmap);
119 u64 offset, u64 bytes);
Ddelalloc-space.c12 int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes) in btrfs_alloc_data_chunk_ondemand() argument
23 bytes = ALIGN(bytes, fs_info->sectorsize); in btrfs_alloc_data_chunk_ondemand()
35 if (used + bytes > data_sinfo->total_bytes) { in btrfs_alloc_data_chunk_ondemand()
85 used + bytes - data_sinfo->total_bytes, in btrfs_alloc_data_chunk_ondemand()
129 data_sinfo->flags, bytes, 1); in btrfs_alloc_data_chunk_ondemand()
132 btrfs_space_info_update_bytes_may_use(fs_info, data_sinfo, bytes); in btrfs_alloc_data_chunk_ondemand()
Dzlib.c364 unsigned long bytes; in zlib_decompress() local
386 bytes = min(PAGE_SIZE - pg_offset, in zlib_decompress()
388 bytes = min(bytes, bytes_left); in zlib_decompress()
391 memcpy(kaddr + pg_offset, workspace->buf + buf_offset, bytes); in zlib_decompress()
394 pg_offset += bytes; in zlib_decompress()
395 bytes_left -= bytes; in zlib_decompress()
/fs/squashfs/
Dsymlink.c42 int bytes, copied; in squashfs_symlink_readpage() local
53 bytes = squashfs_read_metadata(sb, NULL, &block, &offset, in squashfs_symlink_readpage()
55 if (bytes < 0) { in squashfs_symlink_readpage()
70 for (bytes = 0; bytes < length; offset = 0, bytes += copied) { in squashfs_symlink_readpage()
81 copied = squashfs_copy_data(pageaddr + bytes, entry, offset, in squashfs_symlink_readpage()
82 length - bytes); in squashfs_symlink_readpage()
83 if (copied == length - bytes) in squashfs_symlink_readpage()
Dfile_direct.c22 int pages, struct page **page, int bytes);
36 int i, n, pages, missing_pages, bytes, res = -ENOMEM; in squashfs_readpage_block() local
103 bytes = res % PAGE_SIZE; in squashfs_readpage_block()
104 if (bytes) { in squashfs_readpage_block()
106 memset(pageaddr + bytes, 0, PAGE_SIZE - bytes); in squashfs_readpage_block()
145 int pages, struct page **page, int bytes) in squashfs_read_cache() argument
158 for (n = 0; n < pages && bytes > 0; n++, in squashfs_read_cache()
159 bytes -= PAGE_SIZE, offset += PAGE_SIZE) { in squashfs_read_cache()
160 int avail = min_t(int, bytes, PAGE_SIZE); in squashfs_read_cache()
Dblock.c85 int bytes, compressed, b = 0, k = 0, avail, i; in squashfs_read_data() local
96 bytes = -offset; in squashfs_read_data()
109 for (b = 0; bytes < length; b++, cur_index++) { in squashfs_read_data()
113 bytes += msblk->devblksize; in squashfs_read_data()
128 bytes = msblk->devblksize - offset; in squashfs_read_data()
141 for (; bytes < length; b++) { in squashfs_read_data()
145 bytes += msblk->devblksize; in squashfs_read_data()
170 for (bytes = length; k < b; k++) { in squashfs_read_data()
171 in = min(bytes, msblk->devblksize - offset); in squashfs_read_data()
172 bytes -= in; in squashfs_read_data()
Dlzo_wrapper.c71 int avail, i, bytes = length, res; in lzo_uncompress() local
75 avail = min(bytes, msblk->devblksize - offset); in lzo_uncompress()
78 bytes -= avail; in lzo_uncompress()
88 res = bytes = (int)out_len; in lzo_uncompress()
92 if (bytes <= PAGE_SIZE) { in lzo_uncompress()
93 memcpy(data, buff, bytes); in lzo_uncompress()
98 bytes -= PAGE_SIZE; in lzo_uncompress()
Dlz4_wrapper.c97 int avail, i, bytes = length, res; in lz4_uncompress() local
100 avail = min(bytes, msblk->devblksize - offset); in lz4_uncompress()
103 bytes -= avail; in lz4_uncompress()
114 bytes = res; in lz4_uncompress()
118 if (bytes <= PAGE_SIZE) { in lz4_uncompress()
119 memcpy(data, buff, bytes); in lz4_uncompress()
124 bytes -= PAGE_SIZE; in lz4_uncompress()
Dcache.c306 int bytes = min_t(int, entry->length - offset, in squashfs_copy_data() local
309 if (bytes >= remaining) { in squashfs_copy_data()
315 memcpy(buffer, buff, bytes); in squashfs_copy_data()
316 buffer += bytes; in squashfs_copy_data()
317 remaining -= bytes; in squashfs_copy_data()
318 offset += bytes; in squashfs_copy_data()
335 int bytes, res = length; in squashfs_read_metadata() local
353 bytes = squashfs_copy_data(buffer, entry, *offset, length); in squashfs_read_metadata()
355 buffer += bytes; in squashfs_read_metadata()
356 length -= bytes; in squashfs_read_metadata()
[all …]
/fs/efivarfs/
Dfile.c23 ssize_t bytes; in efivarfs_file_write() local
39 bytes = efivar_entry_set_get_size(var, attributes, &datasize, in efivarfs_file_write()
41 if (!set && bytes) { in efivarfs_file_write()
42 if (bytes == -ENOENT) in efivarfs_file_write()
43 bytes = -EIO; in efivarfs_file_write()
47 if (bytes == -ENOENT) { in efivarfs_file_write()
57 bytes = count; in efivarfs_file_write()
62 return bytes; in efivarfs_file_write()
/fs/iomap/
Dbuffered-io.c749 unsigned long bytes; /* Bytes to write to page */ in iomap_write_actor() local
753 bytes = min_t(unsigned long, PAGE_SIZE - offset, in iomap_write_actor()
756 if (bytes > length) in iomap_write_actor()
757 bytes = length; in iomap_write_actor()
769 if (unlikely(iov_iter_fault_in_readable(i, bytes))) { in iomap_write_actor()
774 status = iomap_write_begin(inode, pos, bytes, flags, &page, in iomap_write_actor()
782 copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes); in iomap_write_actor()
786 status = iomap_write_end(inode, pos, bytes, copied, page, in iomap_write_actor()
804 bytes = min_t(unsigned long, PAGE_SIZE - offset, in iomap_write_actor()
864 unsigned long bytes; /* Bytes to write to page */ in iomap_dirty_actor() local
[all …]
/fs/proc/
Dtask_nommu.c26 unsigned long bytes = 0, sbytes = 0, slack = 0, size; in task_mem() local
32 bytes += kobjsize(vma); in task_mem()
46 bytes += size; in task_mem()
55 bytes += kobjsize(mm); in task_mem()
60 bytes += kobjsize(current->fs); in task_mem()
65 bytes += kobjsize(current->files); in task_mem()
70 bytes += kobjsize(current->sighand); in task_mem()
72 bytes += kobjsize(current); /* includes kernel stack */ in task_mem()
78 bytes, slack, sbytes); in task_mem()
/fs/ocfs2/
Docfs2.h746 u64 bytes) in ocfs2_clusters_for_bytes() argument
751 bytes += OCFS2_SB(sb)->s_clustersize - 1; in ocfs2_clusters_for_bytes()
753 clusters = (unsigned int)(bytes >> cl_bits); in ocfs2_clusters_for_bytes()
759 u64 bytes) in ocfs2_bytes_to_clusters() argument
764 clusters = (unsigned int)(bytes >> cl_bits); in ocfs2_bytes_to_clusters()
769 u64 bytes) in ocfs2_blocks_for_bytes() argument
771 bytes += sb->s_blocksize - 1; in ocfs2_blocks_for_bytes()
772 return bytes >> sb->s_blocksize_bits; in ocfs2_blocks_for_bytes()
792 u64 bytes) in ocfs2_align_bytes_to_clusters() argument
797 clusters = ocfs2_clusters_for_bytes(sb, bytes); in ocfs2_align_bytes_to_clusters()
[all …]
/fs/qnx4/
Dbitmap.c31 int bytes = min(size - total, QNX4_BLOCK_SIZE); in qnx4_count_free_blocks() local
37 total_free += bytes * BITS_PER_BYTE - in qnx4_count_free_blocks()
38 memweight(bh->b_data, bytes); in qnx4_count_free_blocks()
40 total += bytes; in qnx4_count_free_blocks()
/fs/ntfs/
Dfile.c571 unsigned nr_pages, s64 pos, size_t bytes) in ntfs_prepare_pages_for_non_resident_write() argument
608 (long long)pos, bytes); in ntfs_prepare_pages_for_non_resident_write()
633 end = pos + bytes; in ntfs_prepare_pages_for_non_resident_write()
1386 s64 pos, size_t bytes) in ntfs_commit_pages_after_non_resident_write() argument
1402 end = pos + bytes; in ntfs_commit_pages_after_non_resident_write()
1540 const unsigned nr_pages, s64 pos, size_t bytes) in ntfs_commit_pages_after_write() argument
1564 (long long)pos, bytes); in ntfs_commit_pages_after_write()
1567 nr_pages, pos, bytes); in ntfs_commit_pages_after_write()
1605 end = pos + bytes; in ntfs_commit_pages_after_write()
1611 memcpy(kattr + pos, kaddr + pos, bytes); in ntfs_commit_pages_after_write()
[all …]
/fs/
Dstat.c677 void __inode_add_bytes(struct inode *inode, loff_t bytes) in __inode_add_bytes() argument
679 inode->i_blocks += bytes >> 9; in __inode_add_bytes()
680 bytes &= 511; in __inode_add_bytes()
681 inode->i_bytes += bytes; in __inode_add_bytes()
689 void inode_add_bytes(struct inode *inode, loff_t bytes) in inode_add_bytes() argument
692 __inode_add_bytes(inode, bytes); in inode_add_bytes()
698 void __inode_sub_bytes(struct inode *inode, loff_t bytes) in __inode_sub_bytes() argument
700 inode->i_blocks -= bytes >> 9; in __inode_sub_bytes()
701 bytes &= 511; in __inode_sub_bytes()
702 if (inode->i_bytes < bytes) { in __inode_sub_bytes()
[all …]
/fs/notify/fanotify/
Dfanotify.c218 int dwords, bytes = 0; in fanotify_encode_fid() local
228 bytes = dwords << 2; in fanotify_encode_fid()
229 if (bytes > FANOTIFY_INLINE_FH_LEN) { in fanotify_encode_fid()
232 fid->ext_fh = kmalloc(bytes, gfp); in fanotify_encode_fid()
237 type = exportfs_encode_inode_fh(inode, fanotify_fid_fh(fid, bytes), in fanotify_encode_fid()
240 if (!type || type == FILEID_INVALID || bytes != dwords << 2) in fanotify_encode_fid()
244 event->fh_len = bytes; in fanotify_encode_fid()
251 fsid->val[0], fsid->val[1], type, bytes, err); in fanotify_encode_fid()
/fs/nfs/
Ddirect.c388 unsigned long bytes = 0; in nfs_direct_read_completion() local
404 if (!PageCompound(page) && bytes < hdr->good_bytes && in nfs_direct_read_completion()
407 bytes += req->wb_bytes; in nfs_direct_read_completion()
465 size_t bytes; in nfs_direct_read_schedule_iovec() local
474 bytes = result; in nfs_direct_read_schedule_iovec()
475 iov_iter_advance(iter, bytes); in nfs_direct_read_schedule_iovec()
479 unsigned int req_len = min_t(size_t, bytes, PAGE_SIZE - pgbase); in nfs_direct_read_schedule_iovec()
495 bytes -= req_len; in nfs_direct_read_schedule_iovec()
870 size_t bytes; in nfs_direct_write_schedule_iovec() local
879 bytes = result; in nfs_direct_write_schedule_iovec()
[all …]
Dread.c161 unsigned long bytes = 0; in nfs_read_completion() local
176 if (bytes > hdr->good_bytes) { in nfs_read_completion()
181 } else if (hdr->good_bytes - bytes < req->wb_bytes) { in nfs_read_completion()
184 start += hdr->good_bytes - bytes; in nfs_read_completion()
190 bytes += req->wb_bytes; in nfs_read_completion()
192 if (bytes <= hdr->good_bytes) in nfs_read_completion()
/fs/nilfs2/
Drecovery.c147 unsigned int bytes = le16_to_cpu(sr->sr_bytes); in nilfs_read_super_root_block() local
149 if (bytes == 0 || bytes > nilfs->ns_blocksize) { in nilfs_read_super_root_block()
154 nilfs, bh_sr, &crc, sizeof(sr->sr_sum), bytes, in nilfs_read_super_root_block()
244 unsigned int *offset, unsigned int bytes) in nilfs_read_summary_info() argument
250 if (bytes > (*pbh)->b_size - *offset) { in nilfs_read_summary_info()
260 *offset += bytes; in nilfs_read_summary_info()
274 unsigned int *offset, unsigned int bytes, in nilfs_skip_summary_info() argument
278 = ((*pbh)->b_size - *offset) / bytes; in nilfs_skip_summary_info()
281 *offset += bytes * count; in nilfs_skip_summary_info()
284 unsigned int nitem_per_block = (*pbh)->b_size / bytes; in nilfs_skip_summary_info()
[all …]
/fs/gfs2/
Dfile.c1003 loff_t bytes, max_bytes, max_blks; in __gfs2_fallocate() local
1016 bytes = sdp->sd_max_rg_data * sdp->sd_sb.sb_bsize / 2; in __gfs2_fallocate()
1017 if (!bytes) in __gfs2_fallocate()
1018 bytes = UINT_MAX; in __gfs2_fallocate()
1019 bytes &= bsize_mask; in __gfs2_fallocate()
1020 if (bytes == 0) in __gfs2_fallocate()
1021 bytes = sdp->sd_sb.sb_bsize; in __gfs2_fallocate()
1029 if (len < bytes) in __gfs2_fallocate()
1030 bytes = len; in __gfs2_fallocate()
1031 if (!gfs2_write_alloc_required(ip, offset, bytes)) { in __gfs2_fallocate()
[all …]

12345