mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
for-5.13-rc4-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmC435cACgkQxWXV+ddt WDuh5w/+IGfsUFfKikJZpZUP7q/2gC0t0dzZemxeZMutJbT/KCZCDd4CjLf6YH6r oV9uYIgOWGd3aem9fe0R60ErJ4htgszIgeydCw3s2EuTms6WvAVA6Wp+wK/3UNx3 vQgYsqYkhMzIYKm/D4q8G+bqA2nPbBTDRNsXDIDrZYONxwSb+dNbQCGVknBRzRPa hiCqYhUSyXA7E6UZdlma7MvpDOquZN+iW3RRVx1AULLqVs01PCnG/CEN+0oQm2JE r9IyRxOZUvSeW6opT80yzZFCoboNSduMjPENTfzLY6Q1xzS/EtP4kM86fB/7AoJv UI0c3Sr84SC9vOsBsbGJaBHpxP3OpzxohKU///jVQgEDpGv4STPlkVfxk23BHcux Fdfg7wodkXeLU1Ff4dlJhvCqNYqc5V8lT5Kl52ai9Scct6D4yZBAq4KJp2LmYFC0 cHv6xFxBUv5zFZP1j6NMOmiLlCdDEkOruku2mMweQOBWYW/lHYNU469V5RCvfbLl HlbDrtZdnQ3m2IhpQrXiTnT47Ib4DPYWkhRVfWbyVJHA+CbcOV62RQfl+r95Bc7j FB1gM5vwUTJV7wgzErrq7+BD8quxG6/NuLDFjHYRcIj1kSIMK4/I1fOWruzuK+CL 6n7LLvBOojYfFo+ruQMSp2imDn3JJucBuh0/ssOlUWl2zsy6lDA= =8066 -----END PGP SIGNATURE----- Merge tag 'for-5.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Error handling improvements, caught by error injection: - handle errors during checksum deletion - set error on mapping when ordered extent io cannot be finished - inode link count fixup in tree-log - missing return value checks for inode updates in tree-log - abort transaction in rename exchange if adding second reference fails Fixes: - fix fsync failure after writes to prealloc extents - fix deadlock when cloning inline extents and low on available space - fix compressed writes that cross stripe boundary" * tag 'for-5.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: MAINTAINERS: add btrfs IRC link btrfs: fix deadlock when cloning inline extents and low on available space btrfs: fix fsync failure and transaction abort after writes to prealloc extents btrfs: abort in rename_exchange if we fail to insert the second ref btrfs: check error value from btrfs_update_inode in tree log btrfs: fixup error handling in fixup_inode_link_counts btrfs: mark ordered extent and inode with error if we fail to finish btrfs: return errors from btrfs_del_csums in cleanup_ref_head btrfs: fix error handling in btrfs_del_csums btrfs: fix compressed writes that cross stripe boundary
This commit is contained in:
commit
fd2ff2774e
7 changed files with 148 additions and 58 deletions
|
@ -203,10 +203,7 @@ static int clone_copy_inline_extent(struct inode *dst,
|
|||
* inline extent's data to the page.
|
||||
*/
|
||||
ASSERT(key.offset > 0);
|
||||
ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset,
|
||||
inline_data, size, datal,
|
||||
comp_type);
|
||||
goto out;
|
||||
goto copy_to_page;
|
||||
}
|
||||
} else if (i_size_read(dst) <= datal) {
|
||||
struct btrfs_file_extent_item *ei;
|
||||
|
@ -222,13 +219,10 @@ static int clone_copy_inline_extent(struct inode *dst,
|
|||
BTRFS_FILE_EXTENT_INLINE)
|
||||
goto copy_inline_extent;
|
||||
|
||||
ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset,
|
||||
inline_data, size, datal, comp_type);
|
||||
goto out;
|
||||
goto copy_to_page;
|
||||
}
|
||||
|
||||
copy_inline_extent:
|
||||
ret = 0;
|
||||
/*
|
||||
* We have no extent items, or we have an extent at offset 0 which may
|
||||
* or may not be inlined. All these cases are dealt the same way.
|
||||
|
@ -240,11 +234,13 @@ copy_inline_extent:
|
|||
* clone. Deal with all these cases by copying the inline extent
|
||||
* data into the respective page at the destination inode.
|
||||
*/
|
||||
ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset,
|
||||
inline_data, size, datal, comp_type);
|
||||
goto out;
|
||||
goto copy_to_page;
|
||||
}
|
||||
|
||||
/*
|
||||
* Release path before starting a new transaction so we don't hold locks
|
||||
* that would confuse lockdep.
|
||||
*/
|
||||
btrfs_release_path(path);
|
||||
/*
|
||||
* If we end up here it means were copy the inline extent into a leaf
|
||||
|
@ -281,11 +277,6 @@ copy_inline_extent:
|
|||
ret = btrfs_inode_set_file_extent_range(BTRFS_I(dst), 0, aligned_end);
|
||||
out:
|
||||
if (!ret && !trans) {
|
||||
/*
|
||||
* Release path before starting a new transaction so we don't
|
||||
* hold locks that would confuse lockdep.
|
||||
*/
|
||||
btrfs_release_path(path);
|
||||
/*
|
||||
* No transaction here means we copied the inline extent into a
|
||||
* page of the destination inode.
|
||||
|
@ -306,6 +297,21 @@ out:
|
|||
*trans_out = trans;
|
||||
|
||||
return ret;
|
||||
|
||||
copy_to_page:
|
||||
/*
|
||||
* Release our path because we don't need it anymore and also because
|
||||
* copy_inline_to_page() needs to reserve data and metadata, which may
|
||||
* need to flush delalloc when we are low on available space and
|
||||
* therefore cause a deadlock if writeback of an inline extent needs to
|
||||
* write to the same leaf or an ordered extent completion needs to write
|
||||
* to the same leaf.
|
||||
*/
|
||||
btrfs_release_path(path);
|
||||
|
||||
ret = copy_inline_to_page(BTRFS_I(dst), new_key->offset,
|
||||
inline_data, size, datal, comp_type);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue