Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Miklos Szeredi
On Tue, Jul 19, 2016 at 8:01 PM, Jeff Layton wrote: > On Tue, 2016-07-19 at 14:27 +0200, Miklos Szeredi wrote: >> > diff --git a/mm/mmap.c b/mm/mmap.c >> index de2c1769cc68..a023caff19d5 100644 >> --- a/mm/mmap.c >> +++ b/mm/mmap.c >> @@ -126,7 +126,7 @@ static void

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Miklos Szeredi
On Tue, Jul 19, 2016 at 8:01 PM, Jeff Layton wrote: > On Tue, 2016-07-19 at 14:27 +0200, Miklos Szeredi wrote: >> > diff --git a/mm/mmap.c b/mm/mmap.c >> index de2c1769cc68..a023caff19d5 100644 >> --- a/mm/mmap.c >> +++ b/mm/mmap.c >> @@ -126,7 +126,7 @@ static void

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Jeff Layton
On Tue, 2016-07-19 at 14:27 +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode.  This allows locks to be persistent across copy-up. >

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Jeff Layton
On Tue, 2016-07-19 at 14:27 +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode.  This allows locks to be persistent across copy-up. >

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 04:46:14PM +0200, Miklos Szeredi wrote: > On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields wrote: > > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > >> This patch allows flock, posix locks, ofd locks and leases to work > >>

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 04:46:14PM +0200, Miklos Szeredi wrote: > On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields wrote: > > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > >> This patch allows flock, posix locks, ofd locks and leases to work > >> correctly on overlayfs. > >> >

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Miklos Szeredi
On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields wrote: > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: >> This patch allows flock, posix locks, ofd locks and leases to work >> correctly on overlayfs. >> >> Instead of using the underlying inode for storing

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Miklos Szeredi
On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields wrote: > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: >> This patch allows flock, posix locks, ofd locks and leases to work >> correctly on overlayfs. >> >> Instead of using the underlying inode for storing lock context use the

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode. This allows locks to be persistent across

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode. This allows locks to be persistent across

[RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Miklos Szeredi
This patch allows flock, posix locks, ofd locks and leases to work correctly on overlayfs. Instead of using the underlying inode for storing lock context use the overlay inode. This allows locks to be persistent across copy-up. This is done by introducing locks_inode() helper and using it

[RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread Miklos Szeredi
This patch allows flock, posix locks, ofd locks and leases to work correctly on overlayfs. Instead of using the underlying inode for storing lock context use the overlay inode. This allows locks to be persistent across copy-up. This is done by introducing locks_inode() helper and using it