timerfd: Implement show_fdinfo method
timerfd: Implement show_fdinfo method

For checkpoint/restore of timerfd files we need to know how exactly
the timer were armed, to be able to recreate it on restore stage.
Thus implement show_fdinfo method which provides enough information
for that.

One of significant changes I think is the addition of @settime_flags
member. Currently there are two flags TFD_TIMER_ABSTIME and
TFD_TIMER_CANCEL_ON_SET, and the second can be found from
@might_cancel variable but in case if the flags will be extended
in future we most probably will have to somehow remember them
explicitly anyway so I guss doing that right now won't hurt.

To not bloat the timerfd_ctx structure I've converted @expired
to short integer and defined @settime_flags as short too.

v2 (by avagin@, vdavydov@ and tglx@):

 - Add it_value/it_interval fields
 - Save flags being used in timerfd_setup in context

v3 (by tglx@):
 - don't forget to use CONFIG_PROC_FS

v4 (by akpm@):
 -Use define timerfd_show NULL for non c/r config

Signed-off-by: Cyrill Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@openvz.org>
Cc: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Cc: Michael Kerrisk <cc9a9bf9e3f3b546e69143652ae261619ab7ca78@gmail.com>
Cc: Andrey Vagin <74c05afa918858348d6db8037d82fa8124870113@openvz.org>
Cc: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
Cc: Vladimir Davydov <0d62248ee021b6e01c0ee596a62a5b145b996974@parallels.com>
Link: a7eedab9397db2da3e33d95e1e756c6d875ff3b2@openvz.org
Signed-off-by: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs