mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-17 02:15:57 +00:00
for-6.12-rc6-tag
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmct+40ACgkQxWXV+ddt WDvCtRAAp0rheEu14hpVvWE2//+6u9Gx7Wfjzbj0+o4zBRWdg7BigFxfeb6JsH/E 2TjuWdcoP/OMV9ghCBQAQxySAPtsxH7skkyNy2UcMk5byBIrNvhw9auP5GXXlrhK jSKDD4yfOMb++8LhrLevgTrijNyjLqaKXruw9a1Pmc3gxpdNmnMEySsQaF62o2Sm YC3jwi0KpNAhu2qyJ6TnPgd5zf3BTM0JAeuB019IZW4WoeRTOdcPe7S7gqqJwZ+e lL0D2/lfIE1lKvLE266Fab4FAQiJV07rozYj25XHiDpqThCxnJVOZCEHasOQ1PRy d6j3RmGPqJYAYfQL1L+FH2hsS1BVZfVyCV1V7A/cN+lAffBfnROnf13C3gJ15Nbx 3lTyjBPQQw2WpfdmeyF3ikbrjZ8AfahChQO+mMnLN7oAWdIwWX5MRB+cwfWTxzA/ P8upz6HSTpSwy8nXdq264q1KkyCjx0Wv+8iyU7LirN2fCcEchA12HAIaOBeHedgh PrGZDqrkZccQQxAvU5H7hQv0hZkGK8qba381oYHO09g72VM6ysuBU7tGrPZrlZYB CvYTCwNZ/lqI8ikrcHOyUO1SPR9SaaWej1mWgBJ69ZIfg+ZuMtOMl171DU4S/i2V iYgYoN8eCqTQWdaX5kk+3LWmK8fSU7F/KSDtJtT1KxkaSwCacfY= =TQzP -----END PGP SIGNATURE----- Merge tag 'for-6.12-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more one-liners that fix some user visible problems: - use correct range when clearing qgroup reservations after COW - properly reset freed delayed ref list head - fix ro/rw subvolume mounts to be backward compatible with old and new mount API" * tag 'for-6.12-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix the length of reserved qgroup to free btrfs: reinitialize delayed ref list after deleting it from the list btrfs: fix per-subvolume RO/RW flags with new mount API
This commit is contained in:
commit
9183e033ec
@ -649,7 +649,7 @@ static bool insert_delayed_ref(struct btrfs_trans_handle *trans,
|
||||
&href->ref_add_list);
|
||||
else if (ref->action == BTRFS_DROP_DELAYED_REF) {
|
||||
ASSERT(!list_empty(&exist->add_list));
|
||||
list_del(&exist->add_list);
|
||||
list_del_init(&exist->add_list);
|
||||
} else {
|
||||
ASSERT(0);
|
||||
}
|
||||
|
@ -1618,7 +1618,7 @@ out_unlock:
|
||||
clear_bits |= EXTENT_CLEAR_DATA_RESV;
|
||||
extent_clear_unlock_delalloc(inode, start, end, locked_folio,
|
||||
&cached, clear_bits, page_ops);
|
||||
btrfs_qgroup_free_data(inode, NULL, start, cur_alloc_size, NULL);
|
||||
btrfs_qgroup_free_data(inode, NULL, start, end - start + 1, NULL);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1979,25 +1979,10 @@ error:
|
||||
* fsconfig(FSCONFIG_SET_FLAG, "ro"). This option is seen by the filesystem
|
||||
* in fc->sb_flags.
|
||||
*
|
||||
* This disambiguation has rather positive consequences. Mounting a subvolume
|
||||
* ro will not also turn the superblock ro. Only the mount for the subvolume
|
||||
* will become ro.
|
||||
*
|
||||
* So, if the superblock creation request comes from the new mount API the
|
||||
* caller must have explicitly done:
|
||||
*
|
||||
* fsconfig(FSCONFIG_SET_FLAG, "ro")
|
||||
* fsmount/mount_setattr(MOUNT_ATTR_RDONLY)
|
||||
*
|
||||
* IOW, at some point the caller must have explicitly turned the whole
|
||||
* superblock ro and we shouldn't just undo it like we did for the old mount
|
||||
* API. In any case, it lets us avoid the hack in the new mount API.
|
||||
*
|
||||
* Consequently, the remounting hack must only be used for requests originating
|
||||
* from the old mount API and should be marked for full deprecation so it can be
|
||||
* turned off in a couple of years.
|
||||
*
|
||||
* The new mount API has no reason to support this hack.
|
||||
* But, currently the util-linux mount command already utilizes the new mount
|
||||
* API and is still setting fsconfig(FSCONFIG_SET_FLAG, "ro") no matter if it's
|
||||
* btrfs or not, setting the whole super block RO. To make per-subvolume mounting
|
||||
* work with different options work we need to keep backward compatibility.
|
||||
*/
|
||||
static struct vfsmount *btrfs_reconfigure_for_mount(struct fs_context *fc)
|
||||
{
|
||||
@ -2019,7 +2004,7 @@ static struct vfsmount *btrfs_reconfigure_for_mount(struct fs_context *fc)
|
||||
if (IS_ERR(mnt))
|
||||
return mnt;
|
||||
|
||||
if (!fc->oldapi || !ro2rw)
|
||||
if (!ro2rw)
|
||||
return mnt;
|
||||
|
||||
/* We need to convert to rw, call reconfigure. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user