fdinfo: handle large fdinfo buffers
Currently the way we deal with special fdinfo information is with the
fop->show_fdinfo, which seq_printf's and carries on. This works in 99% of the
cases, but for things like inotify/fanotify we can have lots of stuff that we
want to print out, so we can easily overflow the seq buffer and result in no
output. To fix this add a few more callbacks to file_operations to handle
stop/start/next in a way similar to the normal seq_operations. We keep track of
what state we are in inside of fd.c and then call out to the helpers if we need
to. This allows us to still get all the inotify/fanotify information from the
special file descriptors without overflowing the buffer. Thanks,
Signed-off-by: Josef Bacik <jbacik@fb.com>
13 files changed