Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-05-26 Thread Cyrill Gorcunov
On Tue, Apr 12, 2016 at 12:42:11AM +0300, Cyrill Gorcunov wrote: ... > I think so. At least this gives some kind of consistensy while we're > fetching data. Something close to peeking data from pipes/sockets. > > > In that case, I think just write trylocking the termios rwsem should > > prevent

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-05-26 Thread Cyrill Gorcunov
On Tue, Apr 12, 2016 at 12:42:11AM +0300, Cyrill Gorcunov wrote: ... > I think so. At least this gives some kind of consistensy while we're > fetching data. Something close to peeking data from pipes/sockets. > > > In that case, I think just write trylocking the termios rwsem should > > prevent

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Cyrill Gorcunov
On Mon, Apr 11, 2016 at 10:20:08AM -0700, Peter Hurley wrote: ... > > My thoughts here are two-fold. > > 1. I'd like whatever functionality is to be added to support checkpoint/ > restore to be a restrictive as possible while still accomplishing your > objectives _exactly because I don't want it

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Cyrill Gorcunov
On Mon, Apr 11, 2016 at 10:20:08AM -0700, Peter Hurley wrote: ... > > My thoughts here are two-fold. > > 1. I'd like whatever functionality is to be added to support checkpoint/ > restore to be a restrictive as possible while still accomplishing your > objectives _exactly because I don't want it

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Peter Hurley
On 04/11/2016 02:01 AM, Cyrill Gorcunov wrote: > On Sun, Apr 10, 2016 at 10:43:28PM -0700, Peter Hurley wrote: >> Hi Cyrill, >> >> On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: >>> Currently when we checkpoint PTY connections we ignore data queued inside >>> read buffer of ldisk, such data is

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Peter Hurley
On 04/11/2016 02:01 AM, Cyrill Gorcunov wrote: > On Sun, Apr 10, 2016 at 10:43:28PM -0700, Peter Hurley wrote: >> Hi Cyrill, >> >> On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: >>> Currently when we checkpoint PTY connections we ignore data queued inside >>> read buffer of ldisk, such data is

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Cyrill Gorcunov
On Sun, Apr 10, 2016 at 10:43:28PM -0700, Peter Hurley wrote: > Hi Cyrill, > > On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: > > Currently when we checkpoint PTY connections we ignore data queued inside > > read buffer of ldisk, such data is barely lost after the restore. So we > > would like to

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Cyrill Gorcunov
On Sun, Apr 10, 2016 at 10:43:28PM -0700, Peter Hurley wrote: > Hi Cyrill, > > On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: > > Currently when we checkpoint PTY connections we ignore data queued inside > > read buffer of ldisk, such data is barely lost after the restore. So we > > would like to

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-10 Thread Peter Hurley
Hi Cyrill, On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: > Currently when we checkpoint PTY connections we ignore data queued inside > read buffer of ldisk, such data is barely lost after the restore. So we > would like to have an ability to dump and restore it. Do you want to be able to

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-10 Thread Peter Hurley
Hi Cyrill, On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: > Currently when we checkpoint PTY connections we ignore data queued inside > read buffer of ldisk, such data is barely lost after the restore. So we > would like to have an ability to dump and restore it. Do you want to be able to

[PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-07 Thread Cyrill Gorcunov
Currently when we checkpoint PTY connections we ignore data queued inside read buffer of ldisk, such data is barely lost after the restore. So we would like to have an ability to dump and restore it. Here is a new ioctl code which simply copies data from read buffer into the userspace without any

[PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-07 Thread Cyrill Gorcunov
Currently when we checkpoint PTY connections we ignore data queued inside read buffer of ldisk, such data is barely lost after the restore. So we would like to have an ability to dump and restore it. Here is a new ioctl code which simply copies data from read buffer into the userspace without any