Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+7 -22
+1 -1
fs/btrfs/delayed-ref.c
··· 649 649 &href->ref_add_list); 650 650 else if (ref->action == BTRFS_DROP_DELAYED_REF) { 651 651 ASSERT(!list_empty(&exist->add_list)); 652 - list_del(&exist->add_list); 652 + list_del_init(&exist->add_list); 653 653 } else { 654 654 ASSERT(0); 655 655 }
+1 -1
fs/btrfs/inode.c
··· 1618 1618 clear_bits |= EXTENT_CLEAR_DATA_RESV; 1619 1619 extent_clear_unlock_delalloc(inode, start, end, locked_folio, 1620 1620 &cached, clear_bits, page_ops); 1621 - btrfs_qgroup_free_data(inode, NULL, start, cur_alloc_size, NULL); 1621 + btrfs_qgroup_free_data(inode, NULL, start, end - start + 1, NULL); 1622 1622 } 1623 1623 return ret; 1624 1624 }
+5 -20
fs/btrfs/super.c
··· 1979 1979 * fsconfig(FSCONFIG_SET_FLAG, "ro"). This option is seen by the filesystem 1980 1980 * in fc->sb_flags. 1981 1981 * 1982 - * This disambiguation has rather positive consequences. Mounting a subvolume 1983 - * ro will not also turn the superblock ro. Only the mount for the subvolume 1984 - * will become ro. 1985 - * 1986 - * So, if the superblock creation request comes from the new mount API the 1987 - * caller must have explicitly done: 1988 - * 1989 - * fsconfig(FSCONFIG_SET_FLAG, "ro") 1990 - * fsmount/mount_setattr(MOUNT_ATTR_RDONLY) 1991 - * 1992 - * IOW, at some point the caller must have explicitly turned the whole 1993 - * superblock ro and we shouldn't just undo it like we did for the old mount 1994 - * API. In any case, it lets us avoid the hack in the new mount API. 1995 - * 1996 - * Consequently, the remounting hack must only be used for requests originating 1997 - * from the old mount API and should be marked for full deprecation so it can be 1998 - * turned off in a couple of years. 1999 - * 2000 - * The new mount API has no reason to support this hack. 1982 + * But, currently the util-linux mount command already utilizes the new mount 1983 + * API and is still setting fsconfig(FSCONFIG_SET_FLAG, "ro") no matter if it's 1984 + * btrfs or not, setting the whole super block RO. To make per-subvolume mounting 1985 + * work with different options work we need to keep backward compatibility. 2001 1986 */ 2002 1987 static struct vfsmount *btrfs_reconfigure_for_mount(struct fs_context *fc) 2003 1988 { ··· 2004 2019 if (IS_ERR(mnt)) 2005 2020 return mnt; 2006 2021 2007 - if (!fc->oldapi || !ro2rw) 2022 + if (!ro2rw) 2008 2023 return mnt; 2009 2024 2010 2025 /* We need to convert to rw, call reconfigure. */