On 12/05/2017 03:31 AM, David Sterba wrote:
On Tue, Nov 28, 2017 at 10:43:10AM +0800, Anand Jain wrote:
This patch creates a helper function to get either the rcu device path
or missing.
Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
fs/btrfs/dev-replace.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 7c655f9a7a50..4b6ceb38cb5f 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -304,6 +304,11 @@ void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info)
dev_replace->cursor_left_last_write_of_item;
}
+static inline char *dev_missing_or_rcu_str(struct btrfs_device *device)
+{
+ return device->missing ? "<missing disk>" : rcu_str_deref(device->name);
+}
I'd change it to dev_name, as long as it stays a local helper in
dev-replace. I'm now merging the dev_state patches which depend on this
patch so I'll rename it myself so you don't have to refresh and resend
the patches.
I am not good at naming, thanks for fixing David.
- 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