Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: David Sterba <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Cc: <guihc.fnst@cn.fujitsu.com>, <miaoxie@huawei.com>, <clm@fb.com>
Subject: Re: [PULL] [PATCH 0/3] Btrfs, fixes for freezing vs pending changes
Date: Fri, 23 Jan 2015 10:32:16 +0800	[thread overview]
Message-ID: <54C1B2B0.8040406@cn.fujitsu.com> (raw)
In-Reply-To: <cover.1421776294.git.dsterba@suse.cz>

Hi David,

Would you please delay this patchset to be merged into next rc?

In fact, I think there is a better solution for such problem.

1) mount option change problem.
In fact, there is no need to start a transaction to change mount option, 
since it doesn't change anything
on-disk.
What we need is just to keep the mount option doesn't change during 
transaction.
(Although several exceptions still exists, but should be OK)

So I prefer to add a rwsem to protect mount_opt, each btrfs_transaction 
will hold the read lock on it
and upon btrfs_put_transaction(), read unlock it.
btrfs_parse_option() should wait for write lock to change it.

BTW, current btrfs_parse_options() is not atomic, and for nospace_cache 
mount option,
SPACE_CACHE bit is always first set and later cleared, which created a 
window btrfs_commit_transaction()
can create space cache. I'll solve it by using copy-n-update method.

2) Sysfs label/feature change problem
For this problem, I agree with Miao to keep the behavior the same as 
"btrfs pro set" command,
since it will write something on disk.
And since btrfs_ioctl_set_fslabel() is synchronized, I didn't see the 
necessity to change it to async using sysfs.

What do you think about this idea?
Although, I'm afraid this may revert all your pending_changes 
patches.... :-<
(In fact, I'm already dealing the mount option change problem)

Thanks,
Qu

-------- Original Message --------
Subject: [PULL] [PATCH 0/3] Btrfs, fixes for freezing vs pending changes
From: David Sterba <dsterba@suse.cz>
To: <linux-btrfs@vger.kernel.org>
Date: 2015年01月21日 02:05
> There was some churn regarding the patches to $SUBJ, here's what I think is
> enough to fix it for 3.19.
>
> It's based on top of my other patch "btrfs: sync ioctl, handle errors after
> transaction start" that might land in Chris' for-linus already so it's not
> included here.
>
> The patches are for review by the involved people, also available in this
> branch:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git
>
> David Sterba (1):
>    btrfs: remove a no-op unfreeze superbock callback
>
> Qu Wenruo (2):
>    btrfs: Fix the bug that fs_info->pending_changes is never cleared.
>    btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid
>      deadlock.
>
>   fs/btrfs/super.c       | 16 ++++++++++------
>   fs/btrfs/transaction.c |  2 +-
>   2 files changed, 11 insertions(+), 7 deletions(-)
>


  parent reply	other threads:[~2015-01-23  2:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 18:05 [PULL] [PATCH 0/3] Btrfs, fixes for freezing vs pending changes David Sterba
2015-01-20 18:05 ` [PATCH 1/3] btrfs: Fix the bug that fs_info->pending_changes is never cleared David Sterba
2015-01-20 18:05 ` [PATCH 2/3] btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock David Sterba
2015-01-20 18:05 ` [PATCH 3/3] btrfs: remove a no-op unfreeze superbock callback David Sterba
2015-01-23  2:32 ` Qu Wenruo [this message]
2015-01-23 16:07   ` [PULL] [PATCH 0/3] Btrfs, fixes for freezing vs pending changes David Sterba

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=54C1B2B0.8040406@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.cz \
    --cc=guihc.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox