[CRIU] [PATCH 1/2] zdtm: introduced a local version of O_LARGEFILE

Cyrill Gorcunov gorcunov at openvz.org
Thu Jan 31 01:21:00 EST 2013


On Thu, Jan 31, 2013 at 06:19:58AM +0400, Pavel Emelyanov wrote:
> >>
> >> Try calling rst_file_parms afterwards.
> > 
> > If only I've not missed something obvious (it's nitgh and i'm somehow
> > semisleep already :) it won't does the trick
> > 
> > #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
> > 
> > static int setfl(int fd, struct file * filp, unsigned long arg)
> > {
> > 	...
> > 	spin_lock(&filp->f_lock);
> > 	filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
> > 	spin_unlock(&filp->f_lock);
> > 
> > where the args is the new flags set.
> 
> Can kernel change this flag at all?
> If can -- fix the set. If no -- we're in trouble :(

As far as I see, on 64 bit system this flag is always set
by the kernel and can't be clear. Need to figure out if
patching the kernel will not cause any side effects.


More information about the CRIU mailing list