Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9]

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2018-07-11 16:08:22
Also in
linux-fsdevel, lkml
Reply to
David Howells, 2018-07-11
On Wed, Jul 11, 2018 at 1:42 AM David Howells [off-list ref] wrote:
     Buffering till the end means you have to buffer *everything* - and,
     unless you limit your buffer, you risk running out of RAM
Do we really care?

Can't we limit the buffer size to something small?

Right now, the mount options can't be bigger than a page anyway. Why
would we want to extend on that?

Btw, the magic word here is "why". I really really want to see a
fairly exhaustive explanation of why this all is such a big deal, and
exactly what limitations (including perhaps the mount option buffer
size) are such a pain right now and need changing.
Now, I can replace the 'x' command with an ioctl() so that just writing random
rubbish to the fd won't cause anything to actually happen.

        fd = fsopen("ext4");
        write(fd, "s /dev/sda1");
        write(fd, "o user_xattr");
        ioctl(fd, FSOPEN_IOC_CREATE_SB, 0);

or I could make a special syscall for it:

        fscommit(fd, FSCOMMIT_CREATE);

or:

        fscommit(fd, FSCOMMIT_RECONFIGURE);

and require that you have CAP_SYS_ADMIN to enact it.
I think any of them sound fairly ok, with that whole "we need reasons" caveat.

               Linus
Thread (64 messages) 64 messages, 11 authors, last reply 2019-10-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help