All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, Zhiye" <Zhiye.Wang@Arcserve.com>
To: "bo.li.liu@oracle.com" <bo.li.liu@oracle.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: RE: freeze_bdev and scrub/re-balance
Date: Mon, 14 Dec 2015 09:27:10 +0000	[thread overview]
Message-ID: <CY1PR10MB0428D9B9F5ED1E9E5080EA2EE4ED0@CY1PR10MB0428.namprd10.prod.outlook.com> (raw)
In-Reply-To: <20151209172143.GA30753@localhost.localdomain>

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

  reply	other threads:[~2015-12-14  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2016-01-07 22:14       ` Liu Bo
2016-01-08  3:13         ` Wang, Zhiye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CY1PR10MB0428D9B9F5ED1E9E5080EA2EE4ED0@CY1PR10MB0428.namprd10.prod.outlook.com \
    --to=zhiye.wang@arcserve.com \
    --cc=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.