On Thu, May 17, 2012 at 07:58:21PM +0800, Miao Xie wrote: > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -1151,6 +1151,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) > /* pause restriper - we want to resume on remount to r/w */ > btrfs_pause_balance(root->fs_info); > > + btrfs_scrub_cancel(root); Can we possibly switch scrub to readonly instead ? I'm not sure what's the 'least surprise here', whether to cancel everything on the filesystem upon ro-remount or just the minimal set of operations (and leave the rest running if possible). Looking at the scrub code, if dev->readonly is set, no repairs are done, so the only concern is to wait for any outstanding IOs and then switch to RO. david -- 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
