Re: Are the btrfs mount options inconsistent?

2018-08-21 Thread Qu Wenruo
On 2018/8/21 下午10:35, David Howells wrote: > David Sterba wrote: > >> - nothing: auto-detect non-rotating devices, enable SSD mount option in turn > > And it's right that this should only turn on SSD if *all* the devices are > non-rotating? If I didn't miss anything again, yes. It's

Re: Are the btrfs mount options inconsistent?

2018-08-21 Thread David Howells
David Sterba wrote: > - nothing: auto-detect non-rotating devices, enable SSD mount option in turn And it's right that this should only turn on SSD if *all* the devices are non-rotating? David

Re: Are the btrfs mount options inconsistent?

2018-08-21 Thread Qu Wenruo
On 2018/8/21 下午10:24, David Sterba wrote: > On Tue, Aug 21, 2018 at 02:43:35PM +0100, David Howells wrote: >> Qu Wenruo wrote: >> >>> But to be more clear, NOSSD shouldn't be a special case. >>> In fact currently NOSSD only affects whether we will output the message >>> "enabling ssd

Re: Are the btrfs mount options inconsistent?

2018-08-21 Thread David Sterba
On Tue, Aug 21, 2018 at 02:43:35PM +0100, David Howells wrote: > Qu Wenruo wrote: > > > But to be more clear, NOSSD shouldn't be a special case. > > In fact currently NOSSD only affects whether we will output the message > > "enabling ssd optimization", no real effect if I didn't miss anything.

Re: Are the btrfs mount options inconsistent?

2018-08-21 Thread Austin S. Hemmelgarn
On 2018-08-21 09:43, David Howells wrote: Qu Wenruo wrote: But to be more clear, NOSSD shouldn't be a special case. In fact currently NOSSD only affects whether we will output the message "enabling ssd optimization", no real effect if I didn't miss anything. That's not quite true. In:

Re: Are the btrfs mount options inconsistent?

2018-08-21 Thread David Howells
Qu Wenruo wrote: > But to be more clear, NOSSD shouldn't be a special case. > In fact currently NOSSD only affects whether we will output the message > "enabling ssd optimization", no real effect if I didn't miss anything. That's not quite true. In: if (!btrfs_test_opt(fs_info, NOSSD)

Re: Are the btrfs mount options inconsistent?

2018-08-20 Thread Qu Wenruo
On 2018/8/20 下午8:24, David Howells wrote: > David Sterba wrote: > >> No it's not. Compression needs the checksums so nodatasum should disable >> compression, which is missing as you found out. > > Thanks. > > Btw, do fs_info->mount_opt end up inscribed on disk as is? I don't see > anywhere

Re: Are the btrfs mount options inconsistent?

2018-08-20 Thread David Howells
David Howells wrote: > Can I get rid of BTRFS_MOUNT_NOSSD as it would appear to be superfluous with > BTRFS_MOUNT_SSD? Ah... I guess it's not quite superfluous: if (!btrfs_test_opt(fs_info, NOSSD) && !fs_info->fs_devices->rotating) {

Re: Are the btrfs mount options inconsistent?

2018-08-20 Thread David Howells
David Sterba wrote: > No it's not. Compression needs the checksums so nodatasum should disable > compression, which is missing as you found out. Thanks. Btw, do fs_info->mount_opt end up inscribed on disk as is? I don't see anywhere this obviously happens. Can I get rid of BTRFS_MOUNT_NOSSD

Re: Are the btrfs mount options inconsistent?

2018-08-16 Thread David Sterba
On Thu, Aug 16, 2018 at 12:01:25PM +0100, David Howells wrote: > I'm trying to convert btrfs to use the new mount API stuff and I'm finding it > hard to work out the relationships between some of the arguments, specifically > datacow, datasum and compress*. > > What I see is that enabling datasum

Are the btrfs mount options inconsistent?

2018-08-16 Thread David Howells
Hi Chris, I'm trying to convert btrfs to use the new mount API stuff and I'm finding it hard to work out the relationships between some of the arguments, specifically datacow, datasum and compress*. What I see is that enabling datasum implies enabling datacow and that disabling datacow implies