On Tue, Jun 03, 2014 at 11:47:42AM +0800, Anand Jain wrote:
> >>>+    /* replace the sysfs entry */
> >>>+    rm_device_membership(fs_info, src_device);
> >>>+    add_device_membership(fs_info, tgt_device);
> >>>+
> >>>      btrfs_rm_dev_replace_blocked(fs_info);
> >>>
> >>>      btrfs_rm_dev_replace_srcdev(fs_info, src_device);
> >>
> >>569         btrfs_rm_dev_replace_unblocked(fs_info);
> >>570
> >>
> >>The comment that follows says
> >>
> >>571         /*
> >>572          * this is again a consistent state where no dev_replace
> >>procedure
> >>573          * is running, the target device is part of the
> >>filesystem, the
> >>574          * source device is not part of the filesystem anymore and
> >>its 1st
> >>575          * superblock is scratched out so that it is no longer
> >>marked to
> >>576          * belong to this filesystem.
> >>577          */
> >>
> >>and I think this is the right place to put the sysfs updates, because the
> >>srcdev is processed.
> >
> >Looking into this, will update. Thanks for the review.
> 
>  btrfs_rm_dev_replace_srcdev()  would destroy the btrfs_device of
>  src_device, and I am removing its sys/fs entry before we destroy
>  btrfs_device of src_device. Which is logically correct.

I agree, my analysis was wrong.
--
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

Reply via email to