Lines Matching defs:write_bytes
44 static noinline int btrfs_copy_from_user(loff_t pos, size_t write_bytes,
53 while (write_bytes > 0) {
55 PAGE_SIZE - offset, write_bytes);
83 write_bytes -= copied;
128 size_t num_pages, loff_t pos, size_t write_bytes,
137 u64 end_pos = pos + write_bytes;
141 if (write_bytes == 0)
148 num_bytes = round_up(write_bytes + pos - start_pos,
907 size_t write_bytes, bool force_uptodate,
941 pos + write_bytes, false);
978 size_t write_bytes,
989 last_pos = round_up(pos + write_bytes, fs_info->sectorsize) - 1;
1043 * Check if we can do nocow write into the range [@pos, @pos + @write_bytes)
1046 * @write_bytes: The length to write, will be updated to the nocow writeable
1053 * > 0 If we can nocow, and updates @write_bytes.
1062 size_t *write_bytes, bool nowait)
1078 lockend = round_up(pos + *write_bytes,
1097 *write_bytes = min_t(size_t, *write_bytes ,
1227 size_t write_bytes = min(iov_iter_count(i),
1242 if (unlikely(fault_in_iov_iter_readable(i, write_bytes))) {
1253 write_bytes, nowait);
1264 * metadata only. write_bytes may get smaller than
1268 &write_bytes, nowait);
1278 num_pages = DIV_ROUND_UP(write_bytes + offset, PAGE_SIZE);
1280 reserve_bytes = round_up(write_bytes + sector_offset,
1290 write_bytes);
1313 pos, write_bytes, force_page_uptodate, false);
1322 num_pages, pos, write_bytes, &lockstart,
1334 copied = btrfs_copy_from_user(pos, write_bytes, pages, i);
1345 if (copied < write_bytes)