Re: [PULL] [PATCH 0/3] Btrfs, fixes for freezing vs pending changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
To: <linux-btrfs@xxxxxxxxxxxxxxx>
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(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux