[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/7] Move from the find_device the error logging logic to the
From: |
Goffredo Baroncelli |
Subject: |
Re: [PATCH 3/7] Move from the find_device the error logging logic to the callee. |
Date: |
Wed, 9 May 2018 21:37:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 05/09/2018 04:00 PM, Daniel Kiper wrote:
> On Tue, Apr 24, 2018 at 09:13:12PM +0200, Goffredo Baroncelli wrote:
>> 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 01a1fc7a1..745bb854e 100644
>> --- a/grub-core/fs/btrfs.c
>> +++ b/grub-core/fs/btrfs.c
>> @@ -602,9 +602,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++;
>> @@ -862,6 +859,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");
>
> May I ask you to explain in the commit message why are you doing that?
>
I update the commit message to better explain the reason
This is a preparatory patch. The callee knows better if this
error is fatal, or it exists another available disk.
In the next patch find_device() will be called from more places
> Daniel
>
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5