Home
last modified time | relevance | path

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

12345

/fs/btrfs/
Dfree-space-cache.c32 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 put_unaligned_le64(bytes, &entry->bytes); in io_ctl_add_entry()
600 entry->bytes = get_unaligned_le64(&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()
768 if (!e->bytes) { in __load_free_space_cache()
828 ctl->discardable_bytes[BTRFS_STAT_CURR] += e->bytes; in __load_free_space_cache()
975 ret = io_ctl_add_entry(io_ctl, e->offset, e->bytes, in write_cache_extent_entries()
1005 trim_entry->bytes, NULL); in write_cache_extent_entries()
[all …]
Dspace-info.h79 u64 bytes; member
100 s64 bytes) \
102 const u64 abs_bytes = (bytes < 0) ? -bytes : bytes; \
104 trace_update_##name(fs_info, sinfo, sinfo->name, bytes); \
107 bytes > 0); \
108 if (bytes < 0 && sinfo->name < -bytes) { \
113 sinfo->name += bytes; \
130 struct btrfs_space_info *info, u64 bytes,
139 struct btrfs_space_info *space_info, u64 bytes,
152 int btrfs_reserve_data_bytes(struct btrfs_fs_info *fs_info, u64 bytes,
Dlzo.c136 unsigned long bytes; in lzo_compress_pages() local
185 bytes = min_t(unsigned long, pg_bytes_left, out_len); in lzo_compress_pages()
187 memcpy(cpage_out + out_offset, buf, bytes); in lzo_compress_pages()
189 out_len -= bytes; in lzo_compress_pages()
190 pg_bytes_left -= bytes; in lzo_compress_pages()
191 buf += bytes; in lzo_compress_pages()
192 out_offset += bytes; in lzo_compress_pages()
292 unsigned long bytes; in lzo_decompress_bio() local
354 bytes = in_len; in lzo_decompress_bio()
363 bytes = min(working_bytes, in_page_bytes_left); in lzo_decompress_bio()
[all …]
Dspace-info.c335 struct btrfs_space_info *space_info, u64 bytes, in btrfs_can_overcommit() argument
348 if (used + bytes < space_info->total_bytes + avail) in btrfs_can_overcommit()
358 ASSERT(space_info->reclaim_size >= ticket->bytes); in remove_ticket()
359 space_info->reclaim_size -= ticket->bytes; in remove_ticket()
384 if ((used + ticket->bytes <= space_info->total_bytes) || in btrfs_try_granting_tickets()
385 btrfs_can_overcommit(fs_info, space_info, ticket->bytes, in btrfs_try_granting_tickets()
389 ticket->bytes); in btrfs_try_granting_tickets()
391 ticket->bytes = 0; in btrfs_try_granting_tickets()
440 struct btrfs_space_info *info, u64 bytes, in btrfs_dump_space_info() argument
462 btrfs_dump_free_space(cache, bytes); in btrfs_dump_space_info()
[all …]
Dfree-space-cache.h26 u64 bytes; member
127 u64 offset, u64 bytes, u64 empty_size,
131 u64 bytes);
134 u64 offset, u64 bytes, u64 empty_size);
137 struct btrfs_free_cluster *cluster, u64 bytes,
154 u64 offset, u64 bytes, bool bitmap);
155 int test_check_exists(struct btrfs_block_group *cache, u64 offset, u64 bytes);
Dzlib.c409 unsigned long bytes; in zlib_decompress() local
431 bytes = min(PAGE_SIZE - pg_offset, in zlib_decompress()
433 bytes = min(bytes, bytes_left); in zlib_decompress()
436 memcpy(kaddr + pg_offset, workspace->buf + buf_offset, bytes); in zlib_decompress()
439 pg_offset += bytes; in zlib_decompress()
440 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()
Dlzo_wrapper.c73 int bytes = length, res; in lzo_uncompress() local
77 int avail = min(bytes, ((int)bvec->bv_len) - offset); in lzo_uncompress()
82 bytes -= avail; in lzo_uncompress()
91 res = bytes = (int)out_len; in lzo_uncompress()
95 if (bytes <= PAGE_SIZE) { in lzo_uncompress()
96 memcpy(data, buff, bytes); in lzo_uncompress()
101 bytes -= PAGE_SIZE; in lzo_uncompress()
Dlz4_wrapper.c99 int bytes = length, res; in lz4_uncompress() local
102 int avail = min(bytes, ((int)bvec->bv_len) - offset); in lz4_uncompress()
107 bytes -= avail; in lz4_uncompress()
117 bytes = res; in lz4_uncompress()
121 if (bytes <= PAGE_SIZE) { in lz4_uncompress()
122 memcpy(data, buff, bytes); in lz4_uncompress()
127 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/crypto/
Dfname.c53 u8 bytes[149]; member
342 offsetof(struct fscrypt_nokey_name, bytes)); in fscrypt_fname_disk_to_usr()
343 BUILD_BUG_ON(offsetofend(struct fscrypt_nokey_name, bytes) != in fscrypt_fname_disk_to_usr()
350 if (iname->len <= sizeof(nokey_name.bytes)) { in fscrypt_fname_disk_to_usr()
351 memcpy(nokey_name.bytes, iname->name, iname->len); in fscrypt_fname_disk_to_usr()
352 size = offsetof(struct fscrypt_nokey_name, bytes[iname->len]); in fscrypt_fname_disk_to_usr()
354 memcpy(nokey_name.bytes, iname->name, sizeof(nokey_name.bytes)); in fscrypt_fname_disk_to_usr()
356 sha256(&iname->name[sizeof(nokey_name.bytes)], in fscrypt_fname_disk_to_usr()
357 iname->len - sizeof(nokey_name.bytes), in fscrypt_fname_disk_to_usr()
443 if (ret < (int)offsetof(struct fscrypt_nokey_name, bytes[1]) || in fscrypt_setup_filename()
[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()
58 bytes = count; in efivarfs_file_write()
63 return bytes; in efivarfs_file_write()
/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.h747 u64 bytes) in ocfs2_clusters_for_bytes() argument
752 bytes += OCFS2_SB(sb)->s_clustersize - 1; in ocfs2_clusters_for_bytes()
754 clusters = (unsigned int)(bytes >> cl_bits); in ocfs2_clusters_for_bytes()
760 u64 bytes) in ocfs2_bytes_to_clusters() argument
765 clusters = (unsigned int)(bytes >> cl_bits); in ocfs2_bytes_to_clusters()
770 u64 bytes) in ocfs2_blocks_for_bytes() argument
772 bytes += sb->s_blocksize - 1; in ocfs2_blocks_for_bytes()
773 return bytes >> sb->s_blocksize_bits; in ocfs2_blocks_for_bytes()
793 u64 bytes) in ocfs2_align_bytes_to_clusters() argument
798 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/
Dkernel_read_file.c89 ssize_t bytes; in kernel_read_file() local
93 bytes = kernel_read(file, *buf + copied, wanted, &pos); in kernel_read_file()
94 if (bytes < 0) { in kernel_read_file()
95 ret = bytes; in kernel_read_file()
99 if (bytes == 0) in kernel_read_file()
101 copied += bytes; in kernel_read_file()
Dstat.c701 void __inode_add_bytes(struct inode *inode, loff_t bytes) in __inode_add_bytes() argument
703 inode->i_blocks += bytes >> 9; in __inode_add_bytes()
704 bytes &= 511; in __inode_add_bytes()
705 inode->i_bytes += bytes; in __inode_add_bytes()
713 void inode_add_bytes(struct inode *inode, loff_t bytes) in inode_add_bytes() argument
716 __inode_add_bytes(inode, bytes); in inode_add_bytes()
722 void __inode_sub_bytes(struct inode *inode, loff_t bytes) in __inode_sub_bytes() argument
724 inode->i_blocks -= bytes >> 9; in __inode_sub_bytes()
725 bytes &= 511; in __inode_sub_bytes()
726 if (inode->i_bytes < bytes) { in __inode_sub_bytes()
[all …]
/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/iomap/
Dbuffered-io.c760 unsigned long bytes; /* Bytes to write to page */ in iomap_write_actor() local
764 bytes = min_t(unsigned long, PAGE_SIZE - offset, in iomap_write_actor()
767 if (bytes > length) in iomap_write_actor()
768 bytes = length; in iomap_write_actor()
780 if (unlikely(iov_iter_fault_in_readable(i, bytes))) { in iomap_write_actor()
785 status = iomap_write_begin(inode, pos, bytes, 0, &page, iomap, in iomap_write_actor()
793 copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes); in iomap_write_actor()
795 copied = iomap_write_end(inode, pos, bytes, copied, page, iomap, in iomap_write_actor()
810 bytes = min_t(unsigned long, PAGE_SIZE - offset, in iomap_write_actor()
860 unsigned long bytes = min_t(loff_t, PAGE_SIZE - offset, length); in iomap_unshare_actor() local
[all …]
/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/nfs/
Ddirect.c288 unsigned long bytes = 0; in nfs_direct_read_completion() local
304 if (!PageCompound(page) && bytes < hdr->good_bytes && in nfs_direct_read_completion()
307 bytes += req->wb_bytes; in nfs_direct_read_completion()
365 size_t bytes; in nfs_direct_read_schedule_iovec() local
374 bytes = result; in nfs_direct_read_schedule_iovec()
375 iov_iter_advance(iter, bytes); in nfs_direct_read_schedule_iovec()
379 unsigned int req_len = min_t(size_t, bytes, PAGE_SIZE - pgbase); in nfs_direct_read_schedule_iovec()
395 bytes -= req_len; in nfs_direct_read_schedule_iovec()
839 size_t bytes; in nfs_direct_write_schedule_iovec() local
848 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/ceph/
Dfile.c94 ssize_t bytes; in __iter_get_bvecs() local
98 bytes = iov_iter_get_pages(iter, pages, maxsize - size, in __iter_get_bvecs()
100 if (bytes < 0) in __iter_get_bvecs()
101 return size ?: bytes; in __iter_get_bvecs()
103 iov_iter_advance(iter, bytes); in __iter_get_bvecs()
104 size += bytes; in __iter_get_bvecs()
106 for ( ; bytes; idx++, bvec_idx++) { in __iter_get_bvecs()
109 .bv_len = min_t(int, bytes, PAGE_SIZE - start), in __iter_get_bvecs()
114 bytes -= bv.bv_len; in __iter_get_bvecs()
135 ssize_t bytes; in iter_get_bvecs_alloc() local
[all …]
/fs/pstore/
Dblk.c278 static ssize_t psblk_generic_blk_read(char *buf, size_t bytes, loff_t pos) in psblk_generic_blk_read() argument
284 struct kvec iov = {.iov_base = buf, .iov_len = bytes}; in psblk_generic_blk_read()
297 iov_iter_kvec(&iter, READ, &iov, 1, bytes); in psblk_generic_blk_read()
302 static ssize_t psblk_generic_blk_write(const char *buf, size_t bytes, in psblk_generic_blk_write() argument
310 struct kvec iov = {.iov_base = (void *)buf, .iov_len = bytes}; in psblk_generic_blk_write()
326 iov_iter_kvec(&iter, WRITE, &iov, 1, bytes); in psblk_generic_blk_write()

12345