On 12.11.18 г. 6:58 ч., Anand Jain wrote:
>
> The dev_replace_state defines are miss matched between the
> BTRFS_IOCTL_DEV_REPLACE_STATE_* and BTRFS_DEV_REPLACE_ITEM_STATE_* [1].
>
> [1]
> -
> btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED 2
>
On 12.11.18 г. 7:05 ч., Anand Jain wrote:
> dev_replace::replace_state has been set to
> BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED (0) in the same function,
> So delete the line which sets replace_state = 0;
>
> Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
> ---
>
On 25.09.18 г. 21:38 ч., Timofey Titovets wrote:
> Currently btrfs raid1/10 balancer bаlance requests to mirrors,
> based on pid % num of mirrors.
>
> Make logic understood:
> - if one of underline devices are non rotational
> - Queue length to underline devices
>
> By default try use pid %
On 2018/11/12 下午1:30, Anand Jain wrote:
[snip]
Btrfs-progs could do it with some extra dirty work.
(I purposed offline device resize idea, but didn't implement it yet)
You could use this branch:
https://github.com/adam900710/btrfs-progs/tree/dirty_fix
>>>
>>> Qu,
>>>
>>>
On 11/12/2018 10:12 AM, Qu Wenruo wrote:
On 2018/11/12 上午9:35, Anand Jain wrote:
On 11/09/2018 09:21 AM, Qu Wenruo wrote:
On 2018/11/9 上午6:40, Pieter Maes wrote:
Hello,
So, I've had the full disk issue, so when I tried re-balancing,
I got a panic, that pushed filesystem read-only
dev_replace::replace_state has been set to
BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED (0) in the same function,
So delete the line which sets replace_state = 0;
Signed-off-by: Anand Jain
---
fs/btrfs/dev-replace.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/dev-replace.c
The dev_replace_state defines are miss matched between the
BTRFS_IOCTL_DEV_REPLACE_STATE_* and BTRFS_DEV_REPLACE_ITEM_STATE_* [1].
[1]
-
btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED 2
btrfs.h:#define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED
On 2018/11/12 上午9:35, Anand Jain wrote:
>
>
> On 11/09/2018 09:21 AM, Qu Wenruo wrote:
>>
>>
>> On 2018/11/9 上午6:40, Pieter Maes wrote:
>>> Hello,
>>>
>>> So, I've had the full disk issue, so when I tried re-balancing,
>>> I got a panic, that pushed filesystem read-only and I'm unable to
>>>
On 11/09/2018 09:21 AM, Qu Wenruo wrote:
On 2018/11/9 上午6:40, Pieter Maes wrote:
Hello,
So, I've had the full disk issue, so when I tried re-balancing,
I got a panic, that pushed filesystem read-only and I'm unable to
balance or grow the filesystem now.
fs info:
btrfs fi show /
Label:
Hi,friend,
This is Daniel Murray and i am from Sinara Group Co.Ltd Group Co.,LTD in Russia.
We are glad to know about your company from the web and we are interested in
your products.
Could you kindly send us your Latest catalog and price list for our trial order.
Best Regards,
Daniel
Gentle ping.
вт, 25 сент. 2018 г. в 21:38, Timofey Titovets :
>
> Currently btrfs raid1/10 balancer bаlance requests to mirrors,
> based on pid % num of mirrors.
>
> Make logic understood:
> - if one of underline devices are non rotational
> - Queue length to underline devices
>
> By default try
On Tue, Nov 06, 2018 at 02:06:30PM +0100, David Sterba wrote:
> On Mon, Nov 05, 2018 at 12:09:31AM +0800, Eryu Guan wrote:
> > On Fri, Nov 02, 2018 at 02:29:35PM -0700, Omar Sandoval wrote:
> > > From: Omar Sandoval
> > >
> > > This series fixes a couple of generic swapfile tests and adds some
>
We recast the replace return status
BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS to 0, to indicate no
error.
And since BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR should also return 0,
which is also declared as 0, so we just return. Instead add it to the if
statement so that there is enough clarity
In btrfs_dev_replace_cancel() we should check if the
btrfs_scrub_cancel() is successful. If the btrfs_scrub_cancel() fails, return
BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED so that user can try to
cancel the replace again.
Signed-off-by: Anand Jain
---
fs/btrfs/dev-replace.c | 22
When the replace state is placed in the suspended state,
btrfs_scrub_cancel() should fail with -ENOTCONN as there is no
scrub running, as a safety catch check if btrfs_scrub_cancel()
returns -ENOTCONN and assert if it doesn't.
Signed-off-by: Anand Jain
---
fs/btrfs/dev-replace.c | 4 +++-
1
When we successfully cancel the replace its scrub returns -ECANCELED,
which then passed to btrfs_dev_replace_finishing(), it cleans up based
on the scrub returned status and propagates the same -ECANCELED back
the parent function. As of now only user can cancel the replace-scrub,
so its ok to
As of now only user requested replace cancel can cancel the replace-scrub
so no need to log error for it.
Signed-off-by: Anand Jain
---
fs/btrfs/dev-replace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index
In a secnario where balance and replace co-exists as below,
start balance; pause balance; start replace; reboot
and when system restarts balance restarts first and the
replace restart will fail as EXCL OP lock is already held by
the balance. If so place the replace state back to
At the time of forced unmount we place the running replace to
BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state, so when the system comes
back and suppose the target device is missing, then let the replace
state continue to be in BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state
instead of
There isn't any other consumer other than in its own file dev-replace.c.
Signed-off-by: Anand Jain
Reviewed-by: Nikolay Borisov
---
fs/btrfs/dev-replace.c | 2 +-
fs/btrfs/dev-replace.h | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/btrfs/dev-replace.c
v1->v2:
2/9: Drop writeback required
3/9: Drop writeback required
7/9: Use the condition within the WARN_ON()
6/9: Use the condition within the ASSERT()
Replace-start and replace-cancel threads can race to create a messy
situation leading to UAF. We use the scrub code to write
the blocks
replace cancel thread can race with the replace start thread and if
fs_info::scrubs_running is not yet set the btrfs_scrub_cancel() will fail
to stop the scrub thread, so the scrub thread continue with the scrub for
replace which then shall try to write to the target device and which is
already
On 11/07/2018 08:35 PM, Nikolay Borisov wrote:
On 7.11.18 г. 13:43 ч., Anand Jain wrote:
At the time of forced unmount we place the running replace to
BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED state, so when the system comes
back and suppose the target device is missing, then let the replace
23 matches
Mail list logo