grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/9] btrfs: Avoid a rescan for a device which was already not


From: Daniel Kiper
Subject: Re: [PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found.
Date: Tue, 9 Oct 2018 19:56:43 +0200
User-agent: Mutt/1.3.28i

On Thu, Sep 27, 2018 at 08:34:59PM +0200, Goffredo Baroncelli wrote:
> From: Goffredo Baroncelli <address@hidden>
>
> Change the behavior of find_device(): before the patch, a read of a missed
> device may trigger a rescan. However, it is never recorded that a device
> is missed, so each single read of a missed device may triggers a rescan.
> It is the caller who decides if a rescan is performed in case of a missed
> device. And it does quite often, without considering if in the past a
> devices was already found as "missed"
> This behavior causes a lot of unneeded rescan, causing a huge slowdown in
> case of a missed device.
>
> After the patch, the "missed device" information is stored in the
> data->devices_attached[] array (as a NULL value in the field dev). A rescan
> is triggered only if no information at all is found. This means that only
> the first time a read of a missed device triggers a rescan.
>
> The change in the code is done removing "return NULL" when the disk is not
> found. So it is always executed the code which stores in the
> data->devices_attached[] array the value returned by grub_device_iterate():
> NULL if the device is missed, or a valid data otherwise.
>
> Signed-off-by: Goffredo Baroncelli <address@hidden>

Commit message still begs for improvement. I will send you a proposal shortly.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]