Thread (117 messages) 117 messages, 14 authors, 2020-03-07

Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17]

flat view

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2020-03-03 13:14:40
Also in: linux-fsdevel, lkml

On Tue, Mar 03, 2020 at 02:03:47PM +0100, Greg Kroah-Hartman wrote:
On Tue, Mar 03, 2020 at 12:38:14PM +0100, Karel Zak wrote:
quoted
On Tue, Mar 03, 2020 at 10:26:21AM +0100, Miklos Szeredi wrote:
quoted
No, I don't think this is going to be a performance issue at all, but
if anything we could introduce a syscall

  ssize_t readfile(int dfd, const char *path, char *buf, size_t
bufsize, int flags);
off-topic, but I'll buy you many many beers if you implement it ;-),
because open + read + close is pretty common for /sys and /proc in
many userspace tools; for example ps, top, lsblk, lsmem, lsns, udevd
etc. is all about it.
Unlimited beers for a 21-line kernel patch?  Sign me up!

Totally untested, barely compiled patch below.
Ok, that didn't even build, let me try this for real now...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help