mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 13:58:46 +00:00
for-5.13-rc2-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmCibywACgkQxWXV+ddt WDs8QhAAlJ1INZGF01lP2mUhzesVIctIAPGBf/77Zsxmcu0rA6E66RVVsYMgGU54 +FWd+LwuFCtC1364OnDa2DnmYtvHfgR4If7EGowpk3qzZFeZQSLqayOFa5tZLYPG tJStjY32QTerfZRoxPJ1QPcoWjxNMxYqYw/s68G3tTTSHEYtlH9zNHbLm9ny507x uPHpxqKXdv3/LYHLt6XUypFqsZkMoDW98oOKvo0MZE/fjcqiDcrvAoYe+y8raFC3 FztlfA2TBmmp/PouDXLCspXAksLpVo9mgTQ0kW4K7152cC0X/zWXYNH01uQ+qTAS OFNKt2DSRIq5TR56ZmReYvRgq0FNMotYpRpxoePSF/rwL+wnsTl7QI3r/d/h/uxQ IzBeBv1Wd+1ZJcqnmEGx8Mws3nGswKyl4W65x8yin41djVoHgM4tYu3nGqielu+w ifEBmU5tUGo05z2HA5kpLjDzc6MwWaCIduQvjH/I4Vgo9fhDo6pQO2dyPC50Nkk5 DQ5jfxiXJ/ZSh5NbWtIkB/OQuwkVL1nDy2jtj3qnK06HDKstK1zui5nccFKFNOiX wtYjnGqd3+vIGIZniMuu9rbPLtG4CCerq44v1gyS6LSEycNW9/r2cOXRaiQk5pej CoYMdnmAqzwidtn4FZPRNQ7JgyckKCXQQSGCazN2vvLCXisCUrw= =ue6o -----END PGP SIGNATURE----- Merge tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes: - fix fiemap to print extents that could get misreported due to internal extent splitting and logical merging for fiemap output - fix RCU stalls during delayed iputs - fix removed dentries still existing after log is synced" * tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix removed dentries still existing after log is synced btrfs: return whole extents in fiemap btrfs: avoid RCU stalls while running delayed iputs btrfs: return 0 for dev_extent_hole_check_zoned hole_start in case of error
This commit is contained in:
commit
8ac91e6c60
@ -5196,7 +5196,7 @@ int extent_fiemap(struct btrfs_inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
u64 start, u64 len)
|
||||
{
|
||||
int ret = 0;
|
||||
u64 off = start;
|
||||
u64 off;
|
||||
u64 max = start + len;
|
||||
u32 flags = 0;
|
||||
u32 found_type;
|
||||
@ -5231,6 +5231,11 @@ int extent_fiemap(struct btrfs_inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
goto out_free_ulist;
|
||||
}
|
||||
|
||||
/*
|
||||
* We can't initialize that to 'start' as this could miss extents due
|
||||
* to extent item merging
|
||||
*/
|
||||
off = 0;
|
||||
start = round_down(start, btrfs_inode_sectorsize(inode));
|
||||
len = round_up(max, btrfs_inode_sectorsize(inode)) - start;
|
||||
|
||||
|
@ -3241,6 +3241,7 @@ void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info)
|
||||
inode = list_first_entry(&fs_info->delayed_iputs,
|
||||
struct btrfs_inode, delayed_iput);
|
||||
run_delayed_iput_locked(fs_info, inode);
|
||||
cond_resched_lock(&fs_info->delayed_iput_lock);
|
||||
}
|
||||
spin_unlock(&fs_info->delayed_iput_lock);
|
||||
}
|
||||
|
@ -6463,6 +6463,24 @@ void btrfs_log_new_name(struct btrfs_trans_handle *trans,
|
||||
(!old_dir || old_dir->logged_trans < trans->transid))
|
||||
return;
|
||||
|
||||
/*
|
||||
* If we are doing a rename (old_dir is not NULL) from a directory that
|
||||
* was previously logged, make sure the next log attempt on the directory
|
||||
* is not skipped and logs the inode again. This is because the log may
|
||||
* not currently be authoritative for a range including the old
|
||||
* BTRFS_DIR_ITEM_KEY and BTRFS_DIR_INDEX_KEY keys, so we want to make
|
||||
* sure after a log replay we do not end up with both the new and old
|
||||
* dentries around (in case the inode is a directory we would have a
|
||||
* directory with two hard links and 2 inode references for different
|
||||
* parents). The next log attempt of old_dir will happen at
|
||||
* btrfs_log_all_parents(), called through btrfs_log_inode_parent()
|
||||
* below, because we have previously set inode->last_unlink_trans to the
|
||||
* current transaction ID, either here or at btrfs_record_unlink_dir() in
|
||||
* case inode is a directory.
|
||||
*/
|
||||
if (old_dir)
|
||||
old_dir->logged_trans = 0;
|
||||
|
||||
btrfs_init_log_ctx(&ctx, &inode->vfs_inode);
|
||||
ctx.logging_new_name = true;
|
||||
/*
|
||||
|
@ -1459,7 +1459,7 @@ static bool dev_extent_hole_check_zoned(struct btrfs_device *device,
|
||||
/* Given hole range was invalid (outside of device) */
|
||||
if (ret == -ERANGE) {
|
||||
*hole_start += *hole_size;
|
||||
*hole_size = false;
|
||||
*hole_size = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user