* freeze_bdev and scrub/re-balance
[not found] <CY1PR10MB0428B98E759584F476DB4CF3E40B0@CY1PR10MB0428.namprd10.prod.outlook.com>
@ 2015-12-05 9:57 ` Wang, Zhiye
2015-12-09 11:01 ` Wang, Zhiye
2015-12-09 17:21 ` Liu Bo
0 siblings, 2 replies; 6+ messages in thread
From: Wang, Zhiye @ 2015-12-05 9:57 UTC (permalink / raw)
To: linux-btrfs
Hi all,
If I understand it correctly, defragment operation is done in user space tools, while scrub/re-balance is done in kernel thread.
So, if my kernel module calls freeze_bdev when scrub/re-balance is in progress, will I still be able to get a consistent file system state?
Thanks
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: freeze_bdev and scrub/re-balance
2015-12-05 9:57 ` freeze_bdev and scrub/re-balance Wang, Zhiye
@ 2015-12-09 11:01 ` Wang, Zhiye
2015-12-09 17:21 ` Liu Bo
1 sibling, 0 replies; 6+ messages in thread
From: Wang, Zhiye @ 2015-12-09 11:01 UTC (permalink / raw)
To: linux-btrfs
Can anyone help me with this question?
Not only the kernel space API freeze_bdev, but also the IO control which can be called from user space.
-----Original Message-----
From: Wang, Zhiye
Sent: Saturday, December 5, 2015 5:57 PM
To: linux-btrfs@vger.kernel.org
Subject: freeze_bdev and scrub/re-balance
Hi all,
If I understand it correctly, defragment operation is done in user space tools, while scrub/re-balance is done in kernel thread.
So, if my kernel module calls freeze_bdev when scrub/re-balance is in progress, will I still be able to get a consistent file system state?
Thanks
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: freeze_bdev and scrub/re-balance
2015-12-05 9:57 ` freeze_bdev and scrub/re-balance Wang, Zhiye
2015-12-09 11:01 ` Wang, Zhiye
@ 2015-12-09 17:21 ` Liu Bo
2015-12-14 9:27 ` Wang, Zhiye
1 sibling, 1 reply; 6+ messages in thread
From: Liu Bo @ 2015-12-09 17:21 UTC (permalink / raw)
To: Wang, Zhiye; +Cc: linux-btrfs
On Sat, Dec 05, 2015 at 09:57:18AM +0000, Wang, Zhiye wrote:
> Hi all,
>
>
> If I understand it correctly, defragment operation is done in user space tools, while scrub/re-balance is done in kernel thread.
Defragment is done via a IOCTL, so it also works in the kernel.
>
>
> So, if my kernel module calls freeze_bdev when scrub/re-balance is in progress, will I still be able to get a consistent file system state?
It should be like that with COW enabled.
Thanks,
-liubo
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: freeze_bdev and scrub/re-balance
2015-12-09 17:21 ` Liu Bo
@ 2015-12-14 9:27 ` Wang, Zhiye
2016-01-07 22:14 ` Liu Bo
0 siblings, 1 reply; 6+ messages in thread
From: Wang, Zhiye @ 2015-12-14 9:27 UTC (permalink / raw)
To: bo.li.liu; +Cc: linux-btrfs
Thank you liubo for your reply.
But I am very clear with your meaning of "It should be like that with COW enabled"
I'd like to confirm, if defragment/scrub/rebalance is in progress, and my code calls "freeze_bdev" (in kernel code, or in user space code via ioctl), I can get a consistent file system state. "consistent file system state" means, if I run a LVM snapshot (or hardware snapshot, or even "dd" if it can do that quickly) after call freeze_bdev, the snapshot is file system consistent.
Thanks
Mike
-----Original Message-----
From: Liu Bo [mailto:bo.li.liu@oracle.com]
Sent: Thursday, December 10, 2015 1:22 AM
To: Wang, Zhiye
Cc: linux-btrfs@vger.kernel.org
Subject: Re: freeze_bdev and scrub/re-balance
On Sat, Dec 05, 2015 at 09:57:18AM +0000, Wang, Zhiye wrote:
> Hi all,
>
>
> If I understand it correctly, defragment operation is done in user space tools, while scrub/re-balance is done in kernel thread.
Defragment is done via a IOCTL, so it also works in the kernel.
>
>
> So, if my kernel module calls freeze_bdev when scrub/re-balance is in progress, will I still be able to get a consistent file system state?
It should be like that with COW enabled.
Thanks,
-liubo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: freeze_bdev and scrub/re-balance
2015-12-14 9:27 ` Wang, Zhiye
@ 2016-01-07 22:14 ` Liu Bo
2016-01-08 3:13 ` Wang, Zhiye
0 siblings, 1 reply; 6+ messages in thread
From: Liu Bo @ 2016-01-07 22:14 UTC (permalink / raw)
To: Wang, Zhiye; +Cc: linux-btrfs
On Mon, Dec 14, 2015 at 09:27:10AM +0000, Wang, Zhiye wrote:
> Thank you liubo for your reply.
>
> But I am very clear with your meaning of "It should be like that with COW enabled"
>
> I'd like to confirm, if defragment/scrub/rebalance is in progress, and my code calls "freeze_bdev" (in kernel code, or in user space code via ioctl), I can get a consistent file system state. "consistent file system state" means, if I run a LVM snapshot (or hardware snapshot, or even "dd" if it can do that quickly) after call freeze_bdev, the snapshot is file system consistent.
I think so, the metadata is always written as a copy-on-write way, so
it's consistent.
Thanks,
-liubo
>
>
> Thanks
> Mike
>
>
> -----Original Message-----
> From: Liu Bo [mailto:bo.li.liu@oracle.com]
> Sent: Thursday, December 10, 2015 1:22 AM
> To: Wang, Zhiye
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: freeze_bdev and scrub/re-balance
>
> On Sat, Dec 05, 2015 at 09:57:18AM +0000, Wang, Zhiye wrote:
> > Hi all,
> >
> >
> > If I understand it correctly, defragment operation is done in user space tools, while scrub/re-balance is done in kernel thread.
>
> Defragment is done via a IOCTL, so it also works in the kernel.
>
> >
> >
> > So, if my kernel module calls freeze_bdev when scrub/re-balance is in progress, will I still be able to get a consistent file system state?
>
> It should be like that with COW enabled.
>
> Thanks,
>
> -liubo
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: freeze_bdev and scrub/re-balance
2016-01-07 22:14 ` Liu Bo
@ 2016-01-08 3:13 ` Wang, Zhiye
0 siblings, 0 replies; 6+ messages in thread
From: Wang, Zhiye @ 2016-01-08 3:13 UTC (permalink / raw)
To: bo.li.liu; +Cc: linux-btrfs
Thank you Bo.
After some testing, I also confirmed that freeze_bdev has no issue with defragment/scrub/rebalance.
-----Original Message-----
From: Liu Bo [mailto:bo.li.liu@oracle.com]
Sent: Friday, January 8, 2016 6:15 AM
To: Wang, Zhiye
Cc: linux-btrfs@vger.kernel.org
Subject: Re: freeze_bdev and scrub/re-balance
On Mon, Dec 14, 2015 at 09:27:10AM +0000, Wang, Zhiye wrote:
> Thank you liubo for your reply.
>
> But I am very clear with your meaning of "It should be like that with COW enabled"
>
> I'd like to confirm, if defragment/scrub/rebalance is in progress, and my code calls "freeze_bdev" (in kernel code, or in user space code via ioctl), I can get a consistent file system state. "consistent file system state" means, if I run a LVM snapshot (or hardware snapshot, or even "dd" if it can do that quickly) after call freeze_bdev, the snapshot is file system consistent.
I think so, the metadata is always written as a copy-on-write way, so it's consistent.
Thanks,
-liubo
>
>
> Thanks
> Mike
>
>
> -----Original Message-----
> From: Liu Bo [mailto:bo.li.liu@oracle.com]
> Sent: Thursday, December 10, 2015 1:22 AM
> To: Wang, Zhiye
> Cc: linux-btrfs@vger.kernel.org
> Subject: Re: freeze_bdev and scrub/re-balance
>
> On Sat, Dec 05, 2015 at 09:57:18AM +0000, Wang, Zhiye wrote:
> > Hi all,
> >
> >
> > If I understand it correctly, defragment operation is done in user space tools, while scrub/re-balance is done in kernel thread.
>
> Defragment is done via a IOCTL, so it also works in the kernel.
>
> >
> >
> > So, if my kernel module calls freeze_bdev when scrub/re-balance is in progress, will I still be able to get a consistent file system state?
>
> It should be like that with COW enabled.
>
> Thanks,
>
> -liubo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-08 3:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CY1PR10MB0428B98E759584F476DB4CF3E40B0@CY1PR10MB0428.namprd10.prod.outlook.com>
2015-12-05 9:57 ` freeze_bdev and scrub/re-balance Wang, Zhiye
2015-12-09 11:01 ` Wang, Zhiye
2015-12-09 17:21 ` Liu Bo
2015-12-14 9:27 ` Wang, Zhiye
2016-01-07 22:14 ` Liu Bo
2016-01-08 3:13 ` Wang, Zhiye
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.