On Wed, Jul 06, 2016 at 02:55:37PM +0300, Andrei Borzenkov wrote: > On Wed, Jul 6, 2016 at 2:45 PM, Austin S. Hemmelgarn > <ahferro...@gmail.com> wrote: > > On 2016-07-06 05:51, Andrei Borzenkov wrote: > >> > >> On Tue, Jul 5, 2016 at 11:10 PM, Chris Murphy <li...@colorremedies.com> > >> wrote: > >>> > >>> I started a systemd-devel@ thread since that's where most udev stuff > >>> gets talked about. > >>> > >>> > >>> https://lists.freedesktop.org/archives/systemd-devel/2016-July/037031.html > >>> > >> > >> Before discussing how to implement it in systemd, we need to decide > >> what to implement. I.e. > >> > >> 1) do you always want to mount filesystem in degraded mode if not > >> enough devices are present or only if explicit hint is given? > >> 2) do you want to restrict degrade handling to root only or to other > >> filesystems as well? Note that there could be more early boot > >> filesystems that absolutely need same treatment (enters separate > >> /usr), and there are also normal filesystems that may need be mounted > >> even degraded. > >> 3) can we query btrfs whether it is mountable in degraded mode? > >> according to documentation, "btrfs device ready" (which udev builtin > >> follows) checks "if it has ALL of it’s devices in cache for mounting". > >> This is required for proper systemd ordering of services. > > > > > > To be entirely honest, if it were me, I'd want systemd to fsck off. If the > > kernel mount(2) call succeeds, then the filesystem was ready enough to > > mount, and if it doesn't, then it wasn't, end of story. > > How should user space know when to try mount? What user space is > supposed to do during boot if mount fails? Do you suggest > > while true; do > mount /dev/foo && exit 0 > done > > as part of startup sequence? And note that nowhere is systemd involved so far.
Getting rid of such loops was the original motivation for the ioctl: http://www.spinics.net/lists/linux-btrfs/msg17372.html Maybe the ioctl need extending? Instead of returning 1/0, it could take flag saying ”return 1 as soon as degraded mount is possible”? -- Tomasz Torcz Morality must always be based on practicality. xmpp: zdzich...@chrome.pl -- Baron Vladimir Harkonnen -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html