<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fstools, branch master</title>
<subtitle>OpenWrt filesystem utilities</subtitle>
<id>https://git.openwrt.org/project/fstools/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/fstools/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/'/>
<updated>2026-10-18T20:40:38Z</updated>
<entry>
<title>block: take down a share that left the configuration</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-29T01:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=907cf4496eb58c93daf3c9c65ce32eec6e6546e3'/>
<id>urn:sha1:907cf4496eb58c93daf3c9c65ce32eec6e6546e3</id>
<content type='text'>
A share exists only in the configuration, so nothing announces a section
that has been deleted and blockd goes on serving the mount and its
symlink until it is restarted.

Remember the registered keys across a reload and deregister the ones the
configuration no longer carries.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>block: report a helper failure without a synthetic errno</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-29T01:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=c681289c827e507d9efca84e55020de5e63070e4'/>
<id>urn:sha1:c681289c827e507d9efca84e55020de5e63070e4</id>
<content type='text'>
A failing mount helper logs its own diagnosis and exit status, after
which exec_helper() sets errno to EINVAL.  The summary line then reports
"Invalid argument" directly below the helper's own "Host is unreachable",
describing nothing and contradicting what was just printed.

Leave errno alone and omit the errno clause when there is none to report.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>blockd: log an automount request at info level</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-29T01:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=b46809fc8645baeede86d9be82497653ddd50773'/>
<id>urn:sha1:b46809fc8645baeede86d9be82497653ddd50773</id>
<content type='text'>
Every automount logs "kernel is requesting a mount" at error level, so
the ordinary path fills the error stream.  On a media box that is one
line per share access.

Fixes: 98bbb5a068d6 ("blockd: add automounting support")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>block: mount network filesystems from fstab</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T21:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=8740de0ed209be81f32e1897b3ed7a8a5e13f622'/>
<id>urn:sha1:8740de0ed209be81f32e1897b3ed7a8a5e13f622</id>
<content type='text'>
A share has no uuid, label or device to be found by, so there is no way
to describe an NFS or CIFS mount in fstab.

Accept a mount section carrying source and fstype.  Its autofs key comes
from the configured target with the path separators folded into
underscores, because the key is a single component below the autofs root
and shares one namespace with the block device names; a section mixing
source with uuid, label or device is refused, and so is a duplicate key.
autofs serves such a mount whether or not the section asks for it, as
mounting a share at boot would put an unreachable server in the boot
path, and check_fs is ignored exactly as it is in /etc/fstab.

block umount takes these mounts down as well, so a helper still gets to
send its UMNT.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>blockd: take a deregistered mount down without probing /dev</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T21:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=d82a150d1a00ea1fe8b96cea3885d56554ed579a'/>
<id>urn:sha1:d82a150d1a00ea1fe8b96cea3885d56554ed579a</id>
<content type='text'>
The autofs teardown of a deregistered device only runs when a mount
point can be found for /dev/&lt;name&gt;, which holds for a block device and
for nothing else.  A mount whose source is not a device node would stay
mounted once its registration is dropped.

Ask block to take the mount down unconditionally; it finds nothing to do
when there is no mount.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>block: allow an explicit filesystem type in fstab</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T19:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=627d0eb410b14d08b0538c78a5bc1df8d5f0d6ae'/>
<id>urn:sha1:627d0eb410b14d08b0538c78a5bc1df8d5f0d6ae</id>
<content type='text'>
The type a mount is attempted with comes from the probe alone, so a user
who wants to override it, say to ntfs-3g where the kernel driver is also
present, has nowhere to say so.

Accept "option fstype" on a mount section and pass it to the mount call
in place of the probed type.  The filesystem check keeps using the probed
type, which is what is actually on the device.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>block: use the umount helper when one exists</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T19:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=519681d10b4a050d101413aa9c482c26e0846c71'/>
<id>urn:sha1:519681d10b4a050d101413aa9c482c26e0846c71</id>
<content type='text'>
Every unmount goes straight to umount2() with MNT_DETACH, so an NFSv3
share is dropped without the UMNT RPC that clears the server's rmtab,
and any filesystem whose helper performs its own cleanup never gets to
run it.

Look the mount's type up in /proc/self/mounts and hand the work to
/sbin/umount.&lt;type&gt; where one exists, naming it as umount(8) does.  A
helper that fails leaves the mount in place for the next expiry to
retry, so the EBUSY of a mount that is still in use no longer tears it
down under its user.  MNT_DETACH stays for the filesystems that ship no
helper, which is every block device today.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>blockd: expire autofs mounts asynchronously</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T19:45:57Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=86ad409bd8bdfb5459e47a0d99dbc0ee40be7eb0'/>
<id>urn:sha1:86ad409bd8bdfb5459e47a0d99dbc0ee40be7eb0</id>
<content type='text'>
The expiry timer runs /sbin/block for each idle mount and waits for it,
which stalls the whole event loop as soon as tearing a mount down means
running a umount helper that talks to an unreachable server.  It also
announces the umount to subscribers as soon as that helper is started,
so uvol is told a volume's device has no holder left while the mount may
still be there, and is told so even when the umount failed.

Turn an expiry into an entry in the queue that serves mount requests, so
one name has one operation in flight at a time and a mount request for a
name whose umount still runs waits for it.  Announce the umount from the
child's exit and only where it succeeded.  The loop over
AUTOFS_IOC_EXPIRE still terminates: the kernel refreshes the victim's
last_used as it hands it over, which keeps it out of the next round.

Fixes: 98bbb5a068d6 ("blockd: add automounting support")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>blockd: answer autofs misses asynchronously</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T19:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=6f8e8231606c1a1835ada2b2e750cc41dd4af4ec'/>
<id>urn:sha1:6f8e8231606c1a1835ada2b2e750cc41dd4af4ec</id>
<content type='text'>
The handler for a mount request runs /sbin/block synchronously and only
then answers the kernel's wait queue token, so a mount.nfs against an
unreachable server stops blockd serving any other autofs miss, running
expiry or answering ubus for as long as the helper takes.  Queue the
in-flight requests, spawn the helper through uloop, and answer the token
from its exit status; a request for a name that is already being mounted
waits for that result.

The token is copied into the queue entry because the packet lives on the
handler's stack, and every path out answers exactly once, a failed
allocation and a failed fork included, since an unanswered token blocks
the accessing process for good.  Answering late is safe: the 30 s
AUTOFS_IOC_SETTIMEOUT value bounds how long an idle mount may live, and
the accessor waits in the kernel's autofs_wait() with no timeout at all.
The lstat() shortcut for an already mounted name goes as well, as blockd
has no working directory inside the autofs mount for that relative path
to resolve against.

Fixes: 98bbb5a068d6 ("blockd: add automounting support")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>blockd: report a failed fork to the caller of block()</title>
<updated>2026-10-18T20:40:38Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-28T19:42:15Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/fstools/commit/?id=ee8de6e9e889bedd5b4c2cb22139730e52d00147'/>
<id>urn:sha1:ee8de6e9e889bedd5b4c2cb22139730e52d00147</id>
<content type='text'>
An asynchronous caller passes a uloop_process and waits for its
callback, but a failed fork() returns the value that stands for success
on that path, so the caller believes a child is on its way and waits for
a callback that can never run.

Return -1 whenever the fork fails.

Fixes: b7bf18563769 ("blockd: make most calls to 'block' asynchronous")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
