Lines Matching refs:write_bytes
387 static noinline int btrfs_copy_from_user(loff_t pos, size_t write_bytes, in btrfs_copy_from_user() argument
396 while (write_bytes > 0) { in btrfs_copy_from_user()
398 PAGE_SIZE - offset, write_bytes); in btrfs_copy_from_user()
426 write_bytes -= copied; in btrfs_copy_from_user()
471 size_t num_pages, loff_t pos, size_t write_bytes, in btrfs_dirty_pages() argument
480 u64 end_pos = pos + write_bytes; in btrfs_dirty_pages()
484 if (write_bytes == 0) in btrfs_dirty_pages()
491 num_bytes = round_up(write_bytes + pos - start_pos, in btrfs_dirty_pages()
1376 size_t write_bytes, bool force_uptodate) in prepare_pages() argument
1405 pos + write_bytes, false); in prepare_pages()
1442 size_t write_bytes, in lock_and_cleanup_extent_if_need() argument
1453 last_pos = round_up(pos + write_bytes, fs_info->sectorsize) - 1; in lock_and_cleanup_extent_if_need()
1494 size_t *write_bytes, bool nowait) in check_can_nocow() argument
1509 lockend = round_up(pos + *write_bytes, in check_can_nocow()
1538 *write_bytes = min_t(size_t, *write_bytes , in check_can_nocow()
1548 size_t *write_bytes) in check_nocow_nolock() argument
1550 return check_can_nocow(inode, pos, write_bytes, true); in check_nocow_nolock()
1573 size_t *write_bytes) in btrfs_check_nocow_lock() argument
1575 return check_can_nocow(inode, pos, write_bytes, false); in btrfs_check_nocow_lock()
1706 size_t write_bytes = min(iov_iter_count(i), in btrfs_buffered_write() local
1721 if (unlikely(fault_in_iov_iter_readable(i, write_bytes))) { in btrfs_buffered_write()
1732 write_bytes); in btrfs_buffered_write()
1740 &write_bytes) > 0) in btrfs_buffered_write()
1746 num_pages = DIV_ROUND_UP(write_bytes + offset, PAGE_SIZE); in btrfs_buffered_write()
1748 reserve_bytes = round_up(write_bytes + sector_offset, in btrfs_buffered_write()
1757 write_bytes); in btrfs_buffered_write()
1771 pos, write_bytes, in btrfs_buffered_write()
1781 num_pages, pos, write_bytes, &lockstart, in btrfs_buffered_write()
1792 copied = btrfs_copy_from_user(pos, write_bytes, pages, i); in btrfs_buffered_write()
1803 if (copied < write_bytes) in btrfs_buffered_write()