[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: |
Thu, 27 Sep 2018 18:03:26 +0200 |
User-agent: |
Mutt/1.3.28i |
On Wed, Sep 26, 2018 at 09:55:54PM +0200, Goffredo Baroncelli wrote:
> On 25/09/2018 19.29, Daniel Kiper wrote:
> > On Wed, Sep 19, 2018 at 08:40:35PM +0200, Goffredo Baroncelli wrote:
> >> From: Goffredo Baroncelli <address@hidden>
> >>
> >> If a device is not found, do not return immediately but
> >> record this failure by storing NULL in data->devices_attached[].
> >
> > Still the same question: Where the store happens in the code?
> > I cannot find it in the patch below. This have to be clarified.
> >
> > Daniel
>
>
> What about the following commit description
> ---------------------------------------------
> Change the behavior of find_device(): before the patch, a read of a
> missed device might trigger a rescan. However, it is never recorded
s/might/may/
> that a device is missed, so each single read of a missed device might
> 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
> cache (as a NULL value). A rescan is triggered only if no information
What do you mean by "cache"? ctx.dev_found? If yes please use latter
instead of former. Or both together if it makes sense.
> at all is found in the cache. 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 cache
cache?
> the value returned by grub_device_iterate(): NULL if the device is
> missed, or a valid data otherwise.
> ---------------------------------------------
Otherwise it is much better than earlier one.
Daniel
- Re: [PATCH 1/9] btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile., (continued)
[PATCH 5/9] btrfs: Move logging code in grub_btrfs_read_logical(), Goffredo Baroncelli, 2018/09/19
[PATCH 2/9] btrfs: Add helper to check the btrfs header., Goffredo Baroncelli, 2018/09/19
[PATCH 3/9] btrfs: Move the error logging from find_device() to its caller., Goffredo Baroncelli, 2018/09/19
[PATCH 4/9] btrfs: Avoid a rescan for a device which was already not found., Goffredo Baroncelli, 2018/09/19
[PATCH 7/9] btrfs: Add support for recovery for a RAID 5 btrfs profiles., Goffredo Baroncelli, 2018/09/19
[PATCH 8/9] btrfs: Make more generic the code for RAID 6 rebuilding, Goffredo Baroncelli, 2018/09/19
[PATCH 9/9] btrfs: Add RAID 6 recovery for a btrfs filesystem., Goffredo Baroncelli, 2018/09/19
[PATCH 6/9] btrfs: Refactor the code that read from disk, Goffredo Baroncelli, 2018/09/19