Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Dec 2022 06:33:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 268610] mounting cdevs as regular vnodes
Message-ID:  <bug-268610-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268610

            Bug ID: 268610
           Summary: mounting cdevs as regular vnodes
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: ybungalobill@gmail.com

Created attachment 239079
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D239079&action=
=3Dedit
prototype implementation

FreeBSD does not implement filesystem caching for i/o done on cdevs. This m=
akes
i/o slow when done on raw devices, and renders impossible to mmap a cdev (w=
hich
is supported by some other OSes).

I'm attaching my implementation of a 'rawfs' filesystem:

    mount -t rawfs /dev/xxx /mnt

then i/o on /mnt will be fully buffered, while giving a read-only view of t=
he
raw data on the device.

This can be seen as an inverse of `mdconfig`.

If there's an interest in including this functionality in the base system,
please review the attached code. As it's evident, I had no prior experience
working with FreeBSD kernel code, so any comments are welcome.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268610-227>