Ryusuke Konishi fec73a61ce libnilfs: allow opening nilfs by resolving backing device
Introduce a new open flag NILFS_OPEN_SRCHDEV.

If this flag is set and the 'dev' argument is a file or directory on a
NILFS filesystem, nilfs_open() automatically locates the backing block
device.

The logic calls the internal helper function nilfs_lookup_device() to
retrieve the device ID from the given path and resolve the canonical
device path (e.g. "/dev/sda1") via sysfs.

To support this, the source file "lookup_device.c" is added to the build
list in lib/Makefile.am.

This feature eliminates the need for users or tools to explicitly specify
the block device path when operating on a mounted NILFS filesystem.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
2026-01-21 20:53:35 +09:00
..
2026-01-11 13:50:11 +09:00