[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/9] btrfs: move the error logging from find_device() to its call
From: |
Goffredo Baroncelli |
Subject: |
[PATCH 3/9] btrfs: move the error logging from find_device() to its callee. |
Date: |
Wed, 16 May 2018 20:48:13 +0200 |
This is a preparatory patch. The callee knows better if this
error is fatal or not, i.e. another available disk.
Signed-off-by: Goffredo Baroncelli <address@hidden>
---
grub-core/fs/btrfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index 123bfbfc1..fd4225d11 100644
--- a/grub-core/fs/btrfs.c
+++ b/grub-core/fs/btrfs.c
@@ -604,9 +604,6 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t
id, int do_rescan)
grub_device_iterate (find_device_iter, &ctx);
if (!ctx.dev_found)
{
- grub_error (GRUB_ERR_BAD_FS,
- N_("couldn't find a necessary member device "
- "of multi-device filesystem"));
return NULL;
}
data->n_devices_attached++;
@@ -900,6 +897,9 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
grub_disk_addr_t addr,
dev = find_device (data, stripe->device_id, j);
if (!dev)
{
+ grub_dprintf ("btrfs",
+ "couldn't find a necessary member device "
+ "of multi-device filesystem\n");
err = grub_errno;
grub_errno = GRUB_ERR_NONE;
continue;
--
2.17.0
- [PATCH V4] Add support for BTRFS raid5/6 to GRUB, Goffredo Baroncelli, 2018/05/16
- [PATCH 1/9] btrfs: add support for reading a filesystem with a RAID 5 or RAID 6 profile., Goffredo Baroncelli, 2018/05/16
- [PATCH 2/9] btrfs: add helper to check the btrfs header., Goffredo Baroncelli, 2018/05/16
- [PATCH 5/9] btrfs: move logging code in grub_btrfs_read_logical(), Goffredo Baroncelli, 2018/05/16
- [PATCH 6/9] btrfs: refactor the code that read from disk, Goffredo Baroncelli, 2018/05/16
- [PATCH 3/9] btrfs: move the error logging from find_device() to its callee.,
Goffredo Baroncelli <=
- [PATCH 4/9] btrfs: avoiding a rescan for a device which was already not founded., Goffredo Baroncelli, 2018/05/16
- [PATCH 7/9] btrfs: add support for recovery for a RAID 5 btrfs profiles., Goffredo Baroncelli, 2018/05/16
- [PATCH 8/9] btrfs: make more generic the code for RAID 6 rebuilding, Goffredo Baroncelli, 2018/05/16
- [PATCH 9/9] btrfs: add RAID 6 recovery for a btrfs filesystem., Goffredo Baroncelli, 2018/05/16