Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fGVr6-0003EU-PG for mharc-grub-devel@gnu.org; Wed, 09 May 2018 16:38:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGUu6-0006aT-M1 for grub-devel@gnu.org; Wed, 09 May 2018 15:37:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGUu3-0002Kh-Db for grub-devel@gnu.org; Wed, 09 May 2018 15:37:34 -0400 Received: from smtp-36-i6.italiaonline.it ([213.209.14.36]:36883 helo=libero.it) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fGUu3-00027H-61 for grub-devel@gnu.org; Wed, 09 May 2018 15:37:31 -0400 Received: from venice.bhome ([84.223.216.156]) by smtp-36.iol.local with SMTP id GUu2fOF79xK79GUu2f6VOY; Wed, 09 May 2018 21:37:30 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inwind.it; s=s2014; t=1525894650; bh=kb7RHiheELk9/Xs+S9pVoEm27hK74p9eWnemYGrA96w=; h=Reply-To:Subject:To:References:From:Cc:Date:In-Reply-To; b=g3/fE+imjWJGxCUVREX5ROAG21oS8W9YA3QI7ZBksnqmjxkPF+pjqD1wBFvMcDPaO 5rNNhawRXqTNiyMQuXdr4cuIpUExWUqQrl5fyLF/2cod/+ERosaFXUuSffDLM7GXvu QZVZ1EWXhXez7DMYw/RPnFiCAsByXjeBHJtWuX/W54SXIkAv9xXWA9DKZ5W4AzDwu5 jD4jNO8F4lFGZdaQJmFZxT3yKRUqmBSGV5Z+YjdpFRxLsm0gS1HxWEQotv1O9wHrf8 5uv9Cp51lNV4vcwv4fz9L95d6DlvOMk6YRuX1kn4FyjBmbD0Mu22qRY5DnMDsycSLS 5JTsTqNkIoIUA== X-CNFS-Analysis: v=2.2 cv=WJIPZjkR c=1 sm=1 tr=0 a=aJCR3EiSKf4gI6xYJITVbg==:117 a=aJCR3EiSKf4gI6xYJITVbg==:17 a=IkcTkHD0fZMA:10 a=1cbxRVK0Q70lm3l9KR4A:9 a=QEXdDO2ut3YA:10 Reply-To: kreijack@inwind.it Subject: Re: [PATCH 3/7] Move from the find_device the error logging logic to the callee. To: Daniel Kiper References: <20180424191316.11031-1-kreijack@inwind.it> <20180424191316.11031-4-kreijack@inwind.it> <20180509140041.GD25320@router-fw-old.local.net-space.pl> From: Goffredo Baroncelli Cc: The development of GNU GRUB Message-ID: <3ee02883-cc78-bf76-4166-407d956a6aff@inwind.it> 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 MIME-Version: 1.0 In-Reply-To: <20180509140041.GD25320@router-fw-old.local.net-space.pl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfNECYe1t40v73EwRHvcDgYLybA7kFySJ5tr8NbsA1pEIcQ9SnjCNxKpRE978QjdoJfifwrShzRfF8yR3my9eDiSn6qGtbinlD6pbYEpCkOmQsf+kssSg oW1xzTFCqicgqTe4tu8LK9849g4KnpSV8jpasj9yK7XOFj4nRIq65E5BnAxlcK3e9TeQgfozXCyVfHWUN8qq64x+mdJRcEQ4T5E= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 213.209.14.36 X-Mailman-Approved-At: Wed, 09 May 2018 16:38:30 -0400 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 19:37:35 -0000 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 >> --- >> 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 Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5