Re: [PATCH V3 07/21] dax: prevent driver unbind while filesystem holds device
From: John Groves
Date: Mon Jan 12 2026 - 13:55:54 EST
On 26/01/07 09:33AM, John Groves wrote:
> From: John Groves <John@xxxxxxxxxx>
>
> Add custom bind/unbind sysfs attributes for the dax bus that check
> whether a filesystem has registered as a holder (via fs_dax_get())
> before allowing driver unbind.
>
> When a filesystem like famfs mounts on a dax device, it registers
> itself as the holder via dax_holder_ops. Previously, there was no
> mechanism to prevent driver unbind while the filesystem was mounted,
> which could cause some havoc.
>
> The new unbind_store() checks dax_holder() and returns -EBUSY if
> a holder is registered, giving userspace proper feedback that the
> device is in use.
>
> To use our custom bind/unbind handlers instead of the default ones,
> set suppress_bind_attrs=true on all dax drivers during registration.
>
> Signed-off-by: John Groves <john@xxxxxxxxxx>
After a discussion with Dan Williams, I will be dropping this patch
from the series. If the fsdev-mode driver gets unbound under famfs,
famfs will just stop working.
Based on feedback so far, V4 should be coming in the next few days.
Regards,
John