* [PATCH] btrfs: use rounddown in decide_stripe_size
@ 2020-03-02 10:46 Nikolay Borisov
2020-03-02 10:48 ` Qu Wenruo
2020-03-02 20:30 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Borisov @ 2020-03-02 10:46 UTC (permalink / raw)
To: dsterba; +Cc: linux-btrfs, Nikolay Borisov
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
Dave, please fold this into c1ac11142016 ("btrfs: factor out decide_stripe_size()")
fs/btrfs/volumes.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 267847c72c22..111c1270f800 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4994,11 +4994,7 @@ static int decide_stripe_size(struct btrfs_fs_devices *fs_devices,
{
struct btrfs_fs_info *info = fs_devices->fs_info;
- /*
- * Round down to number of usable stripes, devs_increment can be any
- * number so we can't use round_down()
- */
- ctl->ndevs -= ctl->ndevs % ctl->devs_increment;
+ ctl->ndevs = rounddown(ctl->ndevs, ctl->devs_increment);
if (ctl->ndevs < ctl->devs_min) {
if (btrfs_test_opt(info, ENOSPC_DEBUG)) {
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: use rounddown in decide_stripe_size
2020-03-02 10:46 [PATCH] btrfs: use rounddown in decide_stripe_size Nikolay Borisov
@ 2020-03-02 10:48 ` Qu Wenruo
2020-03-02 20:30 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2020-03-02 10:48 UTC (permalink / raw)
To: Nikolay Borisov, dsterba; +Cc: linux-btrfs
On 2020/3/2 下午6:46, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
>
> Dave, please fold this into c1ac11142016 ("btrfs: factor out decide_stripe_size()")
>
> fs/btrfs/volumes.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 267847c72c22..111c1270f800 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4994,11 +4994,7 @@ static int decide_stripe_size(struct btrfs_fs_devices *fs_devices,
> {
> struct btrfs_fs_info *info = fs_devices->fs_info;
>
> - /*
> - * Round down to number of usable stripes, devs_increment can be any
> - * number so we can't use round_down()
> - */
> - ctl->ndevs -= ctl->ndevs % ctl->devs_increment;
> + ctl->ndevs = rounddown(ctl->ndevs, ctl->devs_increment);
>
> if (ctl->ndevs < ctl->devs_min) {
> if (btrfs_test_opt(info, ENOSPC_DEBUG)) {
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: use rounddown in decide_stripe_size
2020-03-02 10:46 [PATCH] btrfs: use rounddown in decide_stripe_size Nikolay Borisov
2020-03-02 10:48 ` Qu Wenruo
@ 2020-03-02 20:30 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2020-03-02 20:30 UTC (permalink / raw)
To: Nikolay Borisov; +Cc: dsterba, linux-btrfs
On Mon, Mar 02, 2020 at 12:46:51PM +0200, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>
> Dave, please fold this into c1ac11142016 ("btrfs: factor out decide_stripe_size()")
Will do, though I'll keep the comment given how confusing the rounddown
and round_down things are.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-02 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 10:46 [PATCH] btrfs: use rounddown in decide_stripe_size Nikolay Borisov
2020-03-02 10:48 ` Qu Wenruo
2020-03-02 20:30 ` David Sterba
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.