|
|
d18179 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
d18179 |
From: Goffredo Baroncelli <kreijack@inwind.it>
|
|
|
d18179 |
Date: Mon, 22 Oct 2018 19:29:33 +0200
|
|
|
d18179 |
Subject: [PATCH] btrfs: Move the error logging from find_device() to its
|
|
|
d18179 |
caller
|
|
|
d18179 |
|
|
|
d18179 |
The caller knows better if this error is fatal or not, i.e. another disk is
|
|
|
d18179 |
available or not.
|
|
|
d18179 |
|
|
|
d18179 |
This is a preparatory patch.
|
|
|
d18179 |
|
|
|
d18179 |
Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
|
|
|
d18179 |
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
|
d18179 |
(cherry picked from commit 908cdb1d029e27f8059f9e3571e8dcbd67f74d8a)
|
|
|
d18179 |
---
|
|
|
d18179 |
grub-core/fs/btrfs.c | 10 ++++------
|
|
|
d18179 |
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
|
d18179 |
|
|
|
d18179 |
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
|
|
d18179 |
index 671dbd8918..2fb8fb323b 100644
|
|
|
d18179 |
--- a/grub-core/fs/btrfs.c
|
|
|
d18179 |
+++ b/grub-core/fs/btrfs.c
|
|
|
d18179 |
@@ -593,12 +593,7 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t id, int do_rescan)
|
|
|
d18179 |
if (do_rescan)
|
|
|
d18179 |
grub_device_iterate (find_device_iter, &ctx;;
|
|
|
d18179 |
if (!ctx.dev_found)
|
|
|
d18179 |
- {
|
|
|
d18179 |
- grub_error (GRUB_ERR_BAD_FS,
|
|
|
d18179 |
- N_("couldn't find a necessary member device "
|
|
|
d18179 |
- "of multi-device filesystem"));
|
|
|
d18179 |
- return NULL;
|
|
|
d18179 |
- }
|
|
|
d18179 |
+ return NULL;
|
|
|
d18179 |
data->n_devices_attached++;
|
|
|
d18179 |
if (data->n_devices_attached > data->n_devices_allocated)
|
|
|
d18179 |
{
|
|
|
d18179 |
@@ -914,6 +909,9 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr,
|
|
|
d18179 |
dev = find_device (data, stripe->device_id, j);
|
|
|
d18179 |
if (!dev)
|
|
|
d18179 |
{
|
|
|
d18179 |
+ grub_dprintf ("btrfs",
|
|
|
d18179 |
+ "couldn't find a necessary member device "
|
|
|
d18179 |
+ "of multi-device filesystem\n");
|
|
|
d18179 |
err = grub_errno;
|
|
|
d18179 |
grub_errno = GRUB_ERR_NONE;
|
|
|
d18179 |
continue;
|