* [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression
@ 2014-07-02 4:19 Qu Wenruo
2014-07-02 16:12 ` Eric Sandeen
0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2014-07-02 4:19 UTC (permalink / raw)
To: linux-btrfs; +Cc: Eric Sandeen
From: Eric Sandeen <sandeen@redhat.com>
The commit
0780253 btrfs: Cleanup the btrfs_parse_options for remount.
broke ssd options quite badly; it stopped making ssd_spread
imply ssd, and it made "nossd" unsettable.
Put things back at least as well as they were before
(though ssd mount option handling is still pretty odd:
Reported-by: Roman Mamedov <rm@romanrm.net>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
v2(By Qu):
Make nossd disable ssd and ssd_spread.
Add notes in Documentation/btrfs.txt
---
Documentation/filesystems/btrfs.txt | 3 +++
fs/btrfs/super.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/filesystems/btrfs.txt b/Documentation/filesystems/btrfs.txt
index d11cc2f..f7d0878 100644
--- a/Documentation/filesystems/btrfs.txt
+++ b/Documentation/filesystems/btrfs.txt
@@ -201,6 +201,9 @@ Options with (*) are default options and will not show in the mount options.
of unused space, and may perform better on low-end ssds. ssd_spread
implies ssd, enabling all other ssd heuristics as well.
+ Option nossd removes all ssd allocation heuristics, disabling
+ ssd_spread or ssd mount option.
+
subvol=<path>
Mount subvolume at <path> rather than the root subvolume. <path> is
relative to the top level subvolume.
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4662d92..cfe377a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -522,10 +522,12 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
case Opt_ssd_spread:
btrfs_set_and_info(root, SSD_SPREAD,
"use spread ssd allocation scheme");
+ btrfs_set_opt(info->mount_opt, SSD);
break;
case Opt_nossd:
- btrfs_clear_and_info(root, NOSSD,
+ btrfs_set_and_info(root, NOSSD,
"not using ssd allocation scheme");
+ btrfs_clear_opt(info->mount_opt, SSD_SPREAD);
btrfs_clear_opt(info->mount_opt, SSD);
break;
case Opt_barrier:
--
2.0.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression
2014-07-02 4:19 [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression Qu Wenruo
@ 2014-07-02 16:12 ` Eric Sandeen
2014-07-03 0:24 ` Qu Wenruo
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2014-07-02 16:12 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
On 7/1/14, 11:19 PM, Qu Wenruo wrote:
> From: Eric Sandeen <sandeen@redhat.com>
>
> The commit
>
> 0780253 btrfs: Cleanup the btrfs_parse_options for remount.
>
> broke ssd options quite badly; it stopped making ssd_spread
> imply ssd, and it made "nossd" unsettable.
>
> Put things back at least as well as they were before
> (though ssd mount option handling is still pretty odd:
>
> Reported-by: Roman Mamedov <rm@romanrm.net>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
> v2(By Qu):
> Make nossd disable ssd and ssd_spread.
> Add notes in Documentation/btrfs.txt
Ok, thanks for fixing up a little bit more.
But option handling is still strange even with your changes:
# mount -o ssd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
/dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,ssd,space_cache 0 0
# mount -o remount,nossd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
/dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,space_cache 0 0
# mount -o remount,ssd_spread /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
/dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,ssd_spread,space_cache 0 0
# mount -o remount,ssd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
/dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,ssd_spread,space_cache 0 0
I'd rather just commit my first patch to fix the regression ASAP, and
fix the ssd option mess with a second patch which has received careful testing.
-Eric
> ---
> Documentation/filesystems/btrfs.txt | 3 +++
> fs/btrfs/super.c | 4 +++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/filesystems/btrfs.txt b/Documentation/filesystems/btrfs.txt
> index d11cc2f..f7d0878 100644
> --- a/Documentation/filesystems/btrfs.txt
> +++ b/Documentation/filesystems/btrfs.txt
> @@ -201,6 +201,9 @@ Options with (*) are default options and will not show in the mount options.
> of unused space, and may perform better on low-end ssds. ssd_spread
> implies ssd, enabling all other ssd heuristics as well.
>
> + Option nossd removes all ssd allocation heuristics, disabling
> + ssd_spread or ssd mount option.
> +
> subvol=<path>
> Mount subvolume at <path> rather than the root subvolume. <path> is
> relative to the top level subvolume.
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 4662d92..cfe377a 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -522,10 +522,12 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
> case Opt_ssd_spread:
> btrfs_set_and_info(root, SSD_SPREAD,
> "use spread ssd allocation scheme");
> + btrfs_set_opt(info->mount_opt, SSD);
> break;
> case Opt_nossd:
> - btrfs_clear_and_info(root, NOSSD,
> + btrfs_set_and_info(root, NOSSD,
> "not using ssd allocation scheme");
> + btrfs_clear_opt(info->mount_opt, SSD_SPREAD);
> btrfs_clear_opt(info->mount_opt, SSD);
> break;
> case Opt_barrier:
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression
2014-07-02 16:12 ` Eric Sandeen
@ 2014-07-03 0:24 ` Qu Wenruo
2014-07-03 0:49 ` Chris Mason
0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2014-07-03 0:24 UTC (permalink / raw)
To: Eric Sandeen, linux-btrfs
-------- Original Message --------
Subject: Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option
regression
From: Eric Sandeen <sandeen@redhat.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Date: 2014年07月03日 00:12
> On 7/1/14, 11:19 PM, Qu Wenruo wrote:
>> From: Eric Sandeen <sandeen@redhat.com>
>>
>> The commit
>>
>> 0780253 btrfs: Cleanup the btrfs_parse_options for remount.
>>
>> broke ssd options quite badly; it stopped making ssd_spread
>> imply ssd, and it made "nossd" unsettable.
>>
>> Put things back at least as well as they were before
>> (though ssd mount option handling is still pretty odd:
>>
>> Reported-by: Roman Mamedov <rm@romanrm.net>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>> ---
>> v2(By Qu):
>> Make nossd disable ssd and ssd_spread.
>> Add notes in Documentation/btrfs.txt
> Ok, thanks for fixing up a little bit more.
>
> But option handling is still strange even with your changes:
>
> # mount -o ssd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
> /dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,ssd,space_cache 0 0
>
> # mount -o remount,nossd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
> /dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,space_cache 0 0
>
> # mount -o remount,ssd_spread /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
> /dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,ssd_spread,space_cache 0 0
>
> # mount -o remount,ssd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
> /dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,ssd_spread,space_cache 0 0
>
> I'd rather just commit my first patch to fix the regression ASAP, and
> fix the ssd option mess with a second patch which has received careful testing.
>
> -Eric
OK, please merge the v1 patch only.
I'll fix the ssd dependency things later.
>
>> ---
>> Documentation/filesystems/btrfs.txt | 3 +++
>> fs/btrfs/super.c | 4 +++-
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/filesystems/btrfs.txt b/Documentation/filesystems/btrfs.txt
>> index d11cc2f..f7d0878 100644
>> --- a/Documentation/filesystems/btrfs.txt
>> +++ b/Documentation/filesystems/btrfs.txt
>> @@ -201,6 +201,9 @@ Options with (*) are default options and will not show in the mount options.
>> of unused space, and may perform better on low-end ssds. ssd_spread
>> implies ssd, enabling all other ssd heuristics as well.
>>
>> + Option nossd removes all ssd allocation heuristics, disabling
>> + ssd_spread or ssd mount option.
>> +
>> subvol=<path>
>> Mount subvolume at <path> rather than the root subvolume. <path> is
>> relative to the top level subvolume.
>> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
>> index 4662d92..cfe377a 100644
>> --- a/fs/btrfs/super.c
>> +++ b/fs/btrfs/super.c
>> @@ -522,10 +522,12 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
>> case Opt_ssd_spread:
>> btrfs_set_and_info(root, SSD_SPREAD,
>> "use spread ssd allocation scheme");
>> + btrfs_set_opt(info->mount_opt, SSD);
>> break;
>> case Opt_nossd:
>> - btrfs_clear_and_info(root, NOSSD,
>> + btrfs_set_and_info(root, NOSSD,
>> "not using ssd allocation scheme");
>> + btrfs_clear_opt(info->mount_opt, SSD_SPREAD);
>> btrfs_clear_opt(info->mount_opt, SSD);
>> break;
>> case Opt_barrier:
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression
2014-07-03 0:24 ` Qu Wenruo
@ 2014-07-03 0:49 ` Chris Mason
0 siblings, 0 replies; 4+ messages in thread
From: Chris Mason @ 2014-07-03 0:49 UTC (permalink / raw)
To: Qu Wenruo, Eric Sandeen, linux-btrfs
On 07/02/2014 08:24 PM, Qu Wenruo wrote:
>
> -------- Original Message --------
> Subject: Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option
> regression
> From: Eric Sandeen <sandeen@redhat.com>
> To: Qu Wenruo <quwenruo@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
> Date: 2014年07月03日 00:12
>> On 7/1/14, 11:19 PM, Qu Wenruo wrote:
>>> From: Eric Sandeen <sandeen@redhat.com>
>>>
>>> The commit
>>>
>>> 0780253 btrfs: Cleanup the btrfs_parse_options for remount.
>>>
>>> broke ssd options quite badly; it stopped making ssd_spread
>>> imply ssd, and it made "nossd" unsettable.
>>>
>>> Put things back at least as well as they were before
>>> (though ssd mount option handling is still pretty odd:
>>>
>>> Reported-by: Roman Mamedov <rm@romanrm.net>
>>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>>> ---
>>> v2(By Qu):
>>> Make nossd disable ssd and ssd_spread.
>>> Add notes in Documentation/btrfs.txt
>> Ok, thanks for fixing up a little bit more.
>>
>> But option handling is still strange even with your changes:
>>
>> # mount -o ssd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
>> /dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,ssd,space_cache 0 0
>>
>> # mount -o remount,nossd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
>> /dev/sdc3 /mnt/test btrfs rw,seclabel,relatime,nossd,space_cache 0 0
>>
>> # mount -o remount,ssd_spread /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
>> /dev/sdc3 /mnt/test btrfs
>> rw,seclabel,relatime,nossd,ssd_spread,space_cache 0 0
>>
>> # mount -o remount,ssd /dev/sdc3 /mnt/test; grep sdc3 /proc/mounts
>> /dev/sdc3 /mnt/test btrfs
>> rw,seclabel,relatime,nossd,ssd_spread,space_cache 0 0
>>
>> I'd rather just commit my first patch to fix the regression ASAP, and
>> fix the ssd option mess with a second patch which has received careful
>> testing.
>>
>> -Eric
> OK, please merge the v1 patch only.
> I'll fix the ssd dependency things later.
The v1 patch is already queued ;)
-chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-03 0:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 4:19 [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression Qu Wenruo
2014-07-02 16:12 ` Eric Sandeen
2014-07-03 0:24 ` Qu Wenruo
2014-07-03 0:49 ` Chris Mason
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.