Re: [PATCH] btrfs: cleanup assigning next active device with a check

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

 





On 04/25/2016 11:15 PM, David Sterba wrote:
On Mon, Apr 18, 2016 at 07:25:52PM +0800, Anand Jain wrote:
Creates helper fucntion as needed by the device delete
and replace operations. Also now it checks if the next
device being assigned is an active device.

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1684,10 +1684,40 @@ out:
  	return ret;
  }

+struct btrfs_device *btrfs_find_next_active_device(struct btrfs_fs_devices *fs_devs,
+					struct btrfs_device *device)

+
+void btrfs_assign_next_active_device(struct btrfs_fs_info *fs_info,
+		struct btrfs_device *device, struct btrfs_device *this_dev)

Please add comments what the functions do so that one does not need to
read the whole function to figure it out.

Right. Added comments. and BUG_ON(). Thanks,
Anand

--
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

--
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