nilfs2: add new nilfs_suinfo_update struct

This adds struct nilfs_suinfo_update and some flags. It contains the
information needed to update one entry of segment usage information in
the SUFILE. The flags specify, which fields need to be updated.

This can be used to update segment usage information from userspace with an
ioctl.

Signed-off-by: Andreas Rohner <andreas.rohner@gmx.net>
nilfs2: add nilfs_sufile_set_suinfo to update segment usage info

This patch introduces the nilfs_sufile_set_suinfo function, which
expects an array of nilfs_suinfo_update structures and updates the
segment usage information accordingly.

This is basically a helper function for the newly introduced
NILFS_IOCTL_SET_SUINFO ioctl.

Signed-off-by: Andreas Rohner <andreas.rohner@gmx.net>
nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl

With this ioctl the segment usage information in the SUFILE can be
updated from userspace.

This is useful, because it allows the userspace GC to modify and update
segment usage entries for specific segments, which enables it to avoid
unnecessary write operations.

If a segment needs to be cleaned, but there is no or very little free
space to be gained, the cleaning operation basically degrades to
needless expensive copying of data. In the end the only thing that
changes is the location of the data and a timestamp in the segment usage
info. With this ioctl the GC can skip the copying and update the segment
usage entries directly instead.

Signed-off-by: Andreas Rohner <andreas.rohner@gmx.net>
temporary commit