Re: d_path() and overlay fs

2016-01-05 Thread sangeetha Busangari
Hi, I am new to Linux kernel programming. i am trying to print current working directory of process which are running under containers. i have written code in kernel as below to get pwd * struct path pwd; char *buf,*cwd;

Re: d_path() and overlay fs

2015-03-20 Thread Miklos Szeredi
On Fri, Mar 20, 2015 at 5:53 PM, Miklos Szeredi wrote: > On Fri, Mar 20, 2015 at 04:25:58PM +, Al Viro wrote: >> On Fri, Mar 20, 2015 at 05:01:23PM +0100, Miklos Szeredi wrote: >> >> > But it does take care of the majority of f_path users that actually want >> > the >> > covering path. >> >>

Re: d_path() and overlay fs

2015-03-20 Thread Miklos Szeredi
On Fri, Mar 20, 2015 at 04:25:58PM +, Al Viro wrote: > On Fri, Mar 20, 2015 at 05:01:23PM +0100, Miklos Szeredi wrote: > > > But it does take care of the majority of f_path users that actually want the > > covering path. > > Bloody bad idea, IMO. I have no objections against adding _helpers_

Re: d_path() and overlay fs

2015-03-20 Thread Al Viro
On Fri, Mar 20, 2015 at 05:01:23PM +0100, Miklos Szeredi wrote: > But it does take care of the majority of f_path users that actually want the > covering path. Bloody bad idea, IMO. I have no objections against adding _helpers_ from that patch (seq_file_path(), etc.), but I really don't like add

Re: d_path() and overlay fs

2015-03-20 Thread Miklos Szeredi
On Fri, Mar 20, 2015 at 09:41:25AM -0400, Josh Boyer wrote: > On Fri, Mar 20, 2015 at 9:29 AM, Karel Zak wrote: > > > > Hi, > > > > kernel-4.0.0-0.rc4.git1.3.fc23 (I have nothing more recent right now, > > sorry it the problem is already fixed). > > That equates to Linux v4.0-rc4-88-g7b09ac704

Re: d_path() and overlay fs

2015-03-20 Thread Josh Boyer
On Fri, Mar 20, 2015 at 9:29 AM, Karel Zak wrote: > > Hi, > > kernel-4.0.0-0.rc4.git1.3.fc23 (I have nothing more recent right now, > sorry it the problem is already fixed). That equates to Linux v4.0-rc4-88-g7b09ac704bac upstream. Fedora has Linux v4.0-rc4-199-gb314acaccd7e queued to build t

Re: d_path() and overlay fs

2015-03-20 Thread Al Viro
On Fri, Mar 20, 2015 at 02:29:14PM +0100, Karel Zak wrote: > It seems like serious problem because kernel uses d_path() (and > friends) on many places to generate path strings for userspace in > /proc and /sys and people already use overlay fs in containers. It's not d_path(), it's file->f_pat

d_path() and overlay fs

2015-03-20 Thread Karel Zak
Hi, kernel-4.0.0-0.rc4.git1.3.fc23 (I have nothing more recent right now, sorry it the problem is already fixed). It seems like d_path() kernel function returns nonsenses for overlay fs. Example: # mount -t overlay overlay -olowerdir=/mnt/low,upperdir=/mnt/up/data,workdir=/mnt/up/wor