Re: [PATCH] btrfs: do not skip re-registration for the mounted device

David Sterba
2024-02-13T19:38:37Z

On Tue, Feb 13, 2024 at 06:05:53AM +0530, Anand Jain wrote:
>
>
> On 2/12/24 20:29, David Sterba wrote:
> > On Mon, Feb 05, 2024 at 07:45:05PM +0800, Anand Jain wrote:
> >> We skip device registration for a single device. However, we do not do
> >> that if the device is already mounted, as it might be coming in again
> >> for scanning a different path.
> >>
> >> This patch is lightly tested; for verification if it fixes.
> >>
> >> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> >> ---
>
> >> I still have some unknowns about the problem. Pls test if this fixes
> >> the problem.
>
> It is a mystery- we didn't see
> "BTRFS: skip registering single non-seed device %s\n",
> in the kernel messages.
>
> Do you have any clue?

It's printed by pr_debug(), so it may not be on by default. For my
testing I changed it to printk(KERN_ERR "...") as I do for all debugging
messages just to be sure, the message was printed.

It may be actually useful to print that on the 'info' level as we do for
the other scanning messages.