/* Make sure bytes are sectorsize aligned */
bytes = ALIGN(bytes, fs_info->sectorsize);
- if (btrfs_is_free_space_inode(inode))
- flush = BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE;
- else if (btrfs_is_zoned(fs_info) && btrfs_is_data_reloc_root(root))
+ if (btrfs_is_zoned(fs_info) && btrfs_is_data_reloc_root(root))
flush = BTRFS_RESERVE_FLUSH_ZONED_RELOCATION;
return btrfs_reserve_data_bytes(data_sinfo_for_inode(inode), bytes, flush);
if (noflush)
flush = BTRFS_RESERVE_NO_FLUSH;
- else if (btrfs_is_free_space_inode(inode))
- flush = BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE;
ret = btrfs_reserve_data_bytes(data_sinfo_for_inode(inode), len, flush);
if (ret < 0)
int ret = 0;
/*
- * If we are a free space inode we need to not flush since we will be in
- * the middle of a transaction commit. We also don't need the delalloc
- * mutex since we won't race with anybody. We need this mostly to make
- * lockdep shut its filthy mouth.
- *
* If we have a transaction open (can happen if we call truncate_block
* from truncate), then we need FLUSH_LIMIT so we don't deadlock.
*/
- if (noflush || btrfs_is_free_space_inode(inode)) {
+ if (noflush) {
flush = BTRFS_RESERVE_NO_FLUSH;
} else {
if (current->journal_info)
evict_flush_states,
ARRAY_SIZE(evict_flush_states));
break;
- case BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE:
case BTRFS_RESERVE_FLUSH_ZONED_RELOCATION:
priority_reclaim_data_space(space_info, ticket);
break;
int ret;
ASSERT(flush == BTRFS_RESERVE_FLUSH_DATA ||
- flush == BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE ||
flush == BTRFS_RESERVE_FLUSH_ZONED_RELOCATION ||
flush == BTRFS_RESERVE_NO_FLUSH, "flush=%d", flush);
ASSERT(!current->journal_info || flush != BTRFS_RESERVE_FLUSH_DATA,
* Can be interrupted by a fatal signal.
*/
BTRFS_RESERVE_FLUSH_DATA,
- BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE,
BTRFS_RESERVE_FLUSH_ALL,
/*
* priority flushing for this, because otherwise we can deadlock on
* waiting for a ticket, that cannot be granted, because we cannot do
* any allocations.
- *
- * Apart from being specific to zoned relocation, it is equal to
- * BTRFS_FLUSH_FREE_SPACE_INODE.
*/
BTRFS_RESERVE_FLUSH_ZONED_RELOCATION,