On Fri, May 29, 2020 at 06:37:27PM +0200, Goffredo Baroncelli wrote: > On 5/28/20 11:59 PM, Hans van Kranenburg wrote: > > Hi! > > > > On 5/28/20 8:34 PM, Goffredo Baroncelli wrote: [...] > > > The patches set is composed by four patches: > > > > > > - The first patch adds the ioctl to update the btrfs_dev_item.type field. > > > The ioctl is generic to handle more fields, however now only the "type" > > > field is supported. > > > > What are your thoughts about the chicken/egg situation of changing these > > properties only when the filesystem is mounted? > > The logic is related only to a chunk allocation. I.e. if you have a not > empty filesystem, after enabling the preferred_metadata "mode", in order > to get the benefit a full balance is required. Ideally this feature comes with a balance filter that selects block groups that don't match the current preferred allocation policy, so you can do a balance on those block groups and leave the rest alone. There are existing balance filters by devid and stripe count to work from, so it shouldn't be a lot of new kernel code.
