From: Andrew Morton <akpm@linux-foundation.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: LINUXFS-ML <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linuxfoundation.org>,
Andrey Vagin <avagin@virtuozzo.com>,
Pavel Emelyanov <xemul@virtuozzo.com>
Subject: Re: [RFC] fs,eventpoll: Add ability to install target file by its number
Date: Wed, 15 Feb 2017 12:29:04 -0800 [thread overview]
Message-ID: <20170215122904.33499c5b0af3de12d351e7a1@linux-foundation.org> (raw)
In-Reply-To: <20170215161453.GA13021@uranus>
On Wed, 15 Feb 2017 19:14:54 +0300 Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> When we checkpoint a process we look into /proc/<pid>/fdinfo/<fd> of eventpoll
> file and parse target files list from there. In most situations this is fine
> because target file is present in the /proc/<pid>/fd/ list. But in case if file
> descriptor was dup'ed or transferred via unix socket and closed after,
> it might not be in the list and we can't figure out which file descriptor
> to pass into epoll_ctl call.
>
> To resolve this tie lets add EPOLL_CTL_ITF ("itf" stands for install
> target file) operation which simply takes target file descriptor number
> and installs it into a caller's file table, thus we can use kcmp()
> syscall and figure out which exactly file to be added into
> eventpoll on restore procedure.
Can we please see the proposed manpage update. And Cc linux-api and
Michael Kerrisk.
> --- linux-ml.git.orig/include/uapi/linux/eventpoll.h
> +++ linux-ml.git/include/uapi/linux/eventpoll.h
> @@ -25,6 +25,7 @@
> #define EPOLL_CTL_ADD 1
> #define EPOLL_CTL_DEL 2
> #define EPOLL_CTL_MOD 3
> +#define EPOLL_CTL_ITF 4
Somewhere we should tell the poor reader what "itf" means. A comment
here would suit.
next prev parent reply other threads:[~2017-02-15 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 16:14 Cyrill Gorcunov
2017-02-15 20:29 ` Andrew Morton [this message]
2017-02-15 20:43 ` Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170215122904.33499c5b0af3de12d351e7a1@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=akpm@linuxfoundation.org \
--cc=avagin@virtuozzo.com \
--cc=gorcunov@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®