RE: freeze_bdev and scrub/re-balance
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@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 +, 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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: freeze_bdev and scrub/re-balance
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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: freeze_bdev and scrub/re-balance
On Sat, Dec 05, 2015 at 09:57:18AM +, 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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html