Re: [bcachefs] [bug]: missing subvolume 0

From: Kent Overstreet
Date: Mon Dec 04 2023 - 15:45:06 EST


On Mon, Dec 04, 2023 at 12:03:26PM +0100, Donald Buczek wrote:
> Reporting to maintainer.pl list, hope that's correct?
>
> Probably, this is a trivial one:
> Linux 6.7.0-rc4.
>
> buczek@dose:~$ sudo bcachefs format /dev/vdb
> External UUID: d5181483-dc0c-4781-a266-ef830fa3c099
> Internal UUID: d96e4b19-43f3-4a5b-bc5c-3fe2b726b1ef
> [...]
> buczek@dose:~$ sudo bcachefs mount /dev/vdb /mnt
> buczek@dose:~$ sudo chmod a=rwxt /mnt
> buczek@dose:~$ mkdir /mnt/d
> buczek@dose:~$ bcachefs subvolume snapshot /mnt/d/snp1
> BCH_IOCTL_SUBVOLUME_CREATE ioctl error: No such file or directory
> buczek@dose:~$ dmesg|tail -10
> [ 7477.587299] bcachefs (vdb): mounting version 1.3: rebalance_work
> [ 7477.589134] bcachefs (vdb): recovering from clean shutdown, journal seq 14
> [ 7477.608861] bcachefs (vdb): alloc_read... done
> [ 7477.610525] bcachefs (vdb): stripes_read... done
> [ 7477.612037] bcachefs (vdb): snapshots_read... done
> [ 7477.644331] bcachefs (vdb): journal_replay... done
> [ 7477.645940] bcachefs (vdb): resume_logged_ops... done
> [ 7477.650087] bcachefs (vdb): going read-write
> [ 7514.113568] bcachefs (vdb): missing subvolume 0
> [ 7514.115121] bcachefs (vdb): inconsistency detected - emergency read only
> buczek@dose:~$

So the "no source argument" version is completely unimplemented, and I
never noticed - so thanks for the report :)

I'll have to disable that code path for now and get back to it when I'm
a bit less distracted, the patch so that we don't go -EROFS will go out
in the next bugfix pull request...