From: Cyrill Gorcunov Date: Tue, 15 Jul 2014 21:54:52 +0000 (+0400) Subject: timerfd: Implement show_fdinfo method X-Git-Tag: omap-for-v3.17/fixes-against-rc2~152^2~74 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af9c4957cf212ad9cf0bee34c95cb11de5426e85;p=pandora-kernel.git 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 Cc: Andrew Morton Cc: Michael Kerrisk Cc: Andrey Vagin Cc: Pavel Emelyanov Cc: Vladimir Davydov Link: http://lkml.kernel.org/r/20140715215703.114365649@openvz.org Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed