linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
@ 2018-01-26  7:44 Amir Goldstein
  2018-01-26  7:44 ` Christoph Hellwig
  2018-01-26 21:44 ` Darrick J. Wong
  0 siblings, 2 replies; 12+ messages in thread
From: Amir Goldstein @ 2018-01-26  7:44 UTC (permalink / raw)
  To: Darrick J . Wong
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel

Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
value for special inodes to VFS inodes, but forgot to preserve the
value of i_rdev when recycling a reclaimable xfs_inode.

This was detected by xfstest overlay/017 with inodex=on mount option
and xfs base fs. The test does a lookup of overlay chardev and blockdev
right after drop caches.

Overlayfs inodes hold a reference on underlying xfs inodes when mount
option index=on is configured. If drop caches reclaim xfs inodes, before
it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
inode and that test hits that case quite often.

When that happens, the xfs inode cache remains broken (zere i_rdev)
until the next cycle mount or drop caches.

Fixes: 66f364649d870 ("xfs: remove if_rdev")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---

Darrick,

You may want to rush this last minute v4.15 regression fix.

Thanks,
Amir.

 fs/xfs/xfs_icache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 3861d61fb265..3ce946063ffe 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -295,6 +295,7 @@ xfs_reinit_inode(
 	uint32_t	generation = inode->i_generation;
 	uint64_t	version = inode->i_version;
 	umode_t		mode = inode->i_mode;
+	dev_t		dev = inode->i_rdev;
 
 	error = inode_init_always(mp->m_super, inode);
 
@@ -302,6 +303,7 @@ xfs_reinit_inode(
 	inode->i_generation = generation;
 	inode->i_version = version;
 	inode->i_mode = mode;
+	inode->i_rdev = dev;
 	return error;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-01-26  7:44 [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode Amir Goldstein
@ 2018-01-26  7:44 ` Christoph Hellwig
  2018-01-26 21:44 ` Darrick J. Wong
  1 sibling, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2018-01-26  7:44 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Darrick J . Wong, Christoph Hellwig, Eryu Guan, Miklos Szeredi,
	linux-xfs, linux-fsdevel

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-01-26  7:44 [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode Amir Goldstein
  2018-01-26  7:44 ` Christoph Hellwig
@ 2018-01-26 21:44 ` Darrick J. Wong
  2018-01-29 11:07   ` Amir Goldstein
  1 sibling, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-01-26 21:44 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel

On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
> value for special inodes to VFS inodes, but forgot to preserve the
> value of i_rdev when recycling a reclaimable xfs_inode.
> 
> This was detected by xfstest overlay/017 with inodex=on mount option
> and xfs base fs. The test does a lookup of overlay chardev and blockdev
> right after drop caches.
> 
> Overlayfs inodes hold a reference on underlying xfs inodes when mount
> option index=on is configured. If drop caches reclaim xfs inodes, before
> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
> inode and that test hits that case quite often.
> 
> When that happens, the xfs inode cache remains broken (zere i_rdev)
> until the next cycle mount or drop caches.
> 
> Fixes: 66f364649d870 ("xfs: remove if_rdev")
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
> 
> Darrick,
> 
> You may want to rush this last minute v4.15 regression fix.
> 
> Thanks,
> Amir.
> 
>  fs/xfs/xfs_icache.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> index 3861d61fb265..3ce946063ffe 100644
> --- a/fs/xfs/xfs_icache.c
> +++ b/fs/xfs/xfs_icache.c
> @@ -295,6 +295,7 @@ xfs_reinit_inode(
>  	uint32_t	generation = inode->i_generation;
>  	uint64_t	version = inode->i_version;
>  	umode_t		mode = inode->i_mode;
> +	dev_t		dev = inode->i_rdev;
>  
>  	error = inode_init_always(mp->m_super, inode);
>  
> @@ -302,6 +303,7 @@ xfs_reinit_inode(
>  	inode->i_generation = generation;
>  	inode->i_version = version;
>  	inode->i_mode = mode;
> +	inode->i_rdev = dev;
>  	return error;
>  }
>  
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-01-26 21:44 ` Darrick J. Wong
@ 2018-01-29 11:07   ` Amir Goldstein
  2018-01-29 15:50     ` Darrick J. Wong
  0 siblings, 1 reply; 12+ messages in thread
From: Amir Goldstein @ 2018-01-29 11:07 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel

On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
<darrick.wong@oracle.com> wrote:
> On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
>> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
>> value for special inodes to VFS inodes, but forgot to preserve the
>> value of i_rdev when recycling a reclaimable xfs_inode.
>>
>> This was detected by xfstest overlay/017 with inodex=on mount option
>> and xfs base fs. The test does a lookup of overlay chardev and blockdev
>> right after drop caches.
>>
>> Overlayfs inodes hold a reference on underlying xfs inodes when mount
>> option index=on is configured. If drop caches reclaim xfs inodes, before
>> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
>> inode and that test hits that case quite often.
>>
>> When that happens, the xfs inode cache remains broken (zere i_rdev)
>> until the next cycle mount or drop caches.
>>
>> Fixes: 66f364649d870 ("xfs: remove if_rdev")
>> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>
> Looks ok,
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
>

I recon that now we should now also strap:
Cc: <stable@vger.kernel.org> #v4.15

Can I assume, you'll add it on apply?

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-01-29 11:07   ` Amir Goldstein
@ 2018-01-29 15:50     ` Darrick J. Wong
  2018-02-01  0:27       ` Amir Goldstein
  0 siblings, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-01-29 15:50 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel

On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
> <darrick.wong@oracle.com> wrote:
> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
> >> value for special inodes to VFS inodes, but forgot to preserve the
> >> value of i_rdev when recycling a reclaimable xfs_inode.
> >>
> >> This was detected by xfstest overlay/017 with inodex=on mount option
> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
> >> right after drop caches.
> >>
> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
> >> option index=on is configured. If drop caches reclaim xfs inodes, before
> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
> >> inode and that test hits that case quite often.
> >>
> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
> >> until the next cycle mount or drop caches.
> >>
> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >
> > Looks ok,
> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> >
> 
> I recon that now we should now also strap:
> Cc: <stable@vger.kernel.org> #v4.15
> 
> Can I assume, you'll add it on apply?

I'll do a proper backport of this and a couple other critical cow
fixes after I get the 4.16 stuff merged.

--D

> Thanks,
> Amir.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-01-29 15:50     ` Darrick J. Wong
@ 2018-02-01  0:27       ` Amir Goldstein
  2018-02-01  0:29         ` Amir Goldstein
  2018-02-01  0:35         ` Darrick J. Wong
  0 siblings, 2 replies; 12+ messages in thread
From: Amir Goldstein @ 2018-02-01  0:27 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel, Greg KH, stable

On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
<darrick.wong@oracle.com> wrote:
> On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
>> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
>> <darrick.wong@oracle.com> wrote:
>> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
>> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
>> >> value for special inodes to VFS inodes, but forgot to preserve the
>> >> value of i_rdev when recycling a reclaimable xfs_inode.
>> >>
>> >> This was detected by xfstest overlay/017 with inodex=on mount option
>> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
>> >> right after drop caches.
>> >>
>> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
>> >> option index=on is configured. If drop caches reclaim xfs inodes, before
>> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
>> >> inode and that test hits that case quite often.
>> >>
>> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
>> >> until the next cycle mount or drop caches.
>> >>
>> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
>> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>> >
>> > Looks ok,
>> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
>> >
>>
>> I recon that now we should now also strap:
>> Cc: <stable@vger.kernel.org> #v4.15
>>
>> Can I assume, you'll add it on apply?
>
> I'll do a proper backport of this and a couple other critical cow
> fixes after I get the 4.16 stuff merged.
>

I am not sure what "proper backport" means in the context of
this patch.
This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
It applied cleanly on v4.15.

CC'ing stable for attention.

This patch is now in master, but due to its timing it did not
get the CC: stable tag.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-02-01  0:27       ` Amir Goldstein
@ 2018-02-01  0:29         ` Amir Goldstein
  2018-02-01  0:35         ` Darrick J. Wong
  1 sibling, 0 replies; 12+ messages in thread
From: Amir Goldstein @ 2018-02-01  0:29 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel, Greg KH, stable

On Thu, Feb 1, 2018 at 2:27 AM, Amir Goldstein <amir73il@gmail.com> wrote:
> On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
> <darrick.wong@oracle.com> wrote:
>> On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
>>> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
>>> <darrick.wong@oracle.com> wrote:
>>> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
>>> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
>>> >> value for special inodes to VFS inodes, but forgot to preserve the
>>> >> value of i_rdev when recycling a reclaimable xfs_inode.
>>> >>
>>> >> This was detected by xfstest overlay/017 with inodex=on mount option
>>> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
>>> >> right after drop caches.
>>> >>
>>> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
>>> >> option index=on is configured. If drop caches reclaim xfs inodes, before
>>> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
>>> >> inode and that test hits that case quite often.
>>> >>
>>> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
>>> >> until the next cycle mount or drop caches.
>>> >>
>>> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
>>> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>>> >
>>> > Looks ok,
>>> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
>>> >
>>>
>>> I recon that now we should now also strap:
>>> Cc: <stable@vger.kernel.org> #v4.15
>>>
>>> Can I assume, you'll add it on apply?
>>
>> I'll do a proper backport of this and a couple other critical cow
>> fixes after I get the 4.16 stuff merged.
>>
>
> I am not sure what "proper backport" means in the context of
> this patch.
> This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
> It applied cleanly on v4.15.
>
> CC'ing stable for attention.
>
> This patch is now in master, but due to its timing it did not
> get the CC: stable tag.
>

Now really CC stable.

Amir.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-02-01  0:27       ` Amir Goldstein
  2018-02-01  0:29         ` Amir Goldstein
@ 2018-02-01  0:35         ` Darrick J. Wong
  2018-03-11 16:08           ` Amir Goldstein
  1 sibling, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-02-01  0:35 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel, Greg KH, stable

On Thu, Feb 01, 2018 at 02:27:23AM +0200, Amir Goldstein wrote:
> On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
> <darrick.wong@oracle.com> wrote:
> > On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
> >> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
> >> <darrick.wong@oracle.com> wrote:
> >> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
> >> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
> >> >> value for special inodes to VFS inodes, but forgot to preserve the
> >> >> value of i_rdev when recycling a reclaimable xfs_inode.
> >> >>
> >> >> This was detected by xfstest overlay/017 with inodex=on mount option
> >> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
> >> >> right after drop caches.
> >> >>
> >> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
> >> >> option index=on is configured. If drop caches reclaim xfs inodes, before
> >> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
> >> >> inode and that test hits that case quite often.
> >> >>
> >> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
> >> >> until the next cycle mount or drop caches.
> >> >>
> >> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
> >> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >> >
> >> > Looks ok,
> >> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> >> >
> >>
> >> I recon that now we should now also strap:
> >> Cc: <stable@vger.kernel.org> #v4.15
> >>
> >> Can I assume, you'll add it on apply?
> >
> > I'll do a proper backport of this and a couple other critical cow
> > fixes after I get the 4.16 stuff merged.
> >
> 
> I am not sure what "proper backport" means in the context of
> this patch.
> This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
> It applied cleanly on v4.15.

I meant the other things that went into 4.16, like the reflink quota
fixes, the directio corruption problems, etc.  Make a branch, add the
necessary fixes, run xfstests to make sure it all still works, etc.

--D

> CC'ing stable for attention.
> 
> This patch is now in master, but due to its timing it did not
> get the CC: stable tag.
> 
> Thanks,
> Amir.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-02-01  0:35         ` Darrick J. Wong
@ 2018-03-11 16:08           ` Amir Goldstein
  2018-03-11 16:24             ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Amir Goldstein @ 2018-03-11 16:08 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel, Greg KH, stable

On Thu, Feb 1, 2018 at 2:35 AM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> On Thu, Feb 01, 2018 at 02:27:23AM +0200, Amir Goldstein wrote:
>> On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
>> <darrick.wong@oracle.com> wrote:
>> > On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
>> >> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
>> >> <darrick.wong@oracle.com> wrote:
>> >> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
>> >> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
>> >> >> value for special inodes to VFS inodes, but forgot to preserve the
>> >> >> value of i_rdev when recycling a reclaimable xfs_inode.
>> >> >>
>> >> >> This was detected by xfstest overlay/017 with inodex=on mount option
>> >> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
>> >> >> right after drop caches.
>> >> >>
>> >> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
>> >> >> option index=on is configured. If drop caches reclaim xfs inodes, before
>> >> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
>> >> >> inode and that test hits that case quite often.
>> >> >>
>> >> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
>> >> >> until the next cycle mount or drop caches.
>> >> >>
>> >> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
>> >> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>> >> >
>> >> > Looks ok,
>> >> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
>> >> >
>> >>
>> >> I recon that now we should now also strap:
>> >> Cc: <stable@vger.kernel.org> #v4.15
>> >>
>> >> Can I assume, you'll add it on apply?
>> >
>> > I'll do a proper backport of this and a couple other critical cow
>> > fixes after I get the 4.16 stuff merged.
>> >
>>
>> I am not sure what "proper backport" means in the context of
>> this patch.
>> This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
>> It applied cleanly on v4.15.
>
> I meant the other things that went into 4.16, like the reflink quota
> fixes, the directio corruption problems, etc.  Make a branch, add the
> necessary fixes, run xfstests to make sure it all still works, etc.
>

Darrick,

I may be missing something in the process of stable kernel
maintenance, but this patch fixes a reproducible v4.15 regression
(xfstest overlay/017 fails on stable kernel v4.15).

Is Greg usually picking those stable patches himself or is he waiting
for xfs maintainers (or xfs stable maintainers) to stage the
stable patches?

As I wrote above, the reason this patch is missing the Cc: stable
tag is because it landed just after v4.15 was released, but I was
aiming for it to get merged to v4.15 and avoid the regression in
a release kernel.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-03-11 16:08           ` Amir Goldstein
@ 2018-03-11 16:24             ` Greg KH
  2018-03-12 16:27               ` Darrick J. Wong
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2018-03-11 16:24 UTC (permalink / raw)
  To: Amir Goldstein
  Cc: Darrick J. Wong, Christoph Hellwig, Eryu Guan, Miklos Szeredi,
	linux-xfs, linux-fsdevel, stable

On Sun, Mar 11, 2018 at 06:08:06PM +0200, Amir Goldstein wrote:
> On Thu, Feb 1, 2018 at 2:35 AM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> > On Thu, Feb 01, 2018 at 02:27:23AM +0200, Amir Goldstein wrote:
> >> On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
> >> <darrick.wong@oracle.com> wrote:
> >> > On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
> >> >> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
> >> >> <darrick.wong@oracle.com> wrote:
> >> >> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
> >> >> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
> >> >> >> value for special inodes to VFS inodes, but forgot to preserve the
> >> >> >> value of i_rdev when recycling a reclaimable xfs_inode.
> >> >> >>
> >> >> >> This was detected by xfstest overlay/017 with inodex=on mount option
> >> >> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
> >> >> >> right after drop caches.
> >> >> >>
> >> >> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
> >> >> >> option index=on is configured. If drop caches reclaim xfs inodes, before
> >> >> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
> >> >> >> inode and that test hits that case quite often.
> >> >> >>
> >> >> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
> >> >> >> until the next cycle mount or drop caches.
> >> >> >>
> >> >> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
> >> >> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >> >> >
> >> >> > Looks ok,
> >> >> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> >> >> >
> >> >>
> >> >> I recon that now we should now also strap:
> >> >> Cc: <stable@vger.kernel.org> #v4.15
> >> >>
> >> >> Can I assume, you'll add it on apply?
> >> >
> >> > I'll do a proper backport of this and a couple other critical cow
> >> > fixes after I get the 4.16 stuff merged.
> >> >
> >>
> >> I am not sure what "proper backport" means in the context of
> >> this patch.
> >> This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
> >> It applied cleanly on v4.15.
> >
> > I meant the other things that went into 4.16, like the reflink quota
> > fixes, the directio corruption problems, etc.  Make a branch, add the
> > necessary fixes, run xfstests to make sure it all still works, etc.
> >
> 
> Darrick,
> 
> I may be missing something in the process of stable kernel
> maintenance, but this patch fixes a reproducible v4.15 regression
> (xfstest overlay/017 fails on stable kernel v4.15).
> 
> Is Greg usually picking those stable patches himself or is he waiting
> for xfs maintainers (or xfs stable maintainers) to stage the
> stable patches?

I'm waiting for the patch to either be tagges with cc: stable, or for
someone to tell me to take the patch.

Sometimes I dig through the tree, but for xfs patches, I do not, as was
told not to :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-03-11 16:24             ` Greg KH
@ 2018-03-12 16:27               ` Darrick J. Wong
  2018-03-12 20:16                 ` Amir Goldstein
  0 siblings, 1 reply; 12+ messages in thread
From: Darrick J. Wong @ 2018-03-12 16:27 UTC (permalink / raw)
  To: Greg KH, Amir Goldstein
  Cc: Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel, stable

On Sun, Mar 11, 2018 at 05:24:42PM +0100, Greg KH wrote:
> On Sun, Mar 11, 2018 at 06:08:06PM +0200, Amir Goldstein wrote:
> > On Thu, Feb 1, 2018 at 2:35 AM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> > > On Thu, Feb 01, 2018 at 02:27:23AM +0200, Amir Goldstein wrote:
> > >> On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
> > >> <darrick.wong@oracle.com> wrote:
> > >> > On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
> > >> >> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
> > >> >> <darrick.wong@oracle.com> wrote:
> > >> >> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
> > >> >> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
> > >> >> >> value for special inodes to VFS inodes, but forgot to preserve the
> > >> >> >> value of i_rdev when recycling a reclaimable xfs_inode.
> > >> >> >>
> > >> >> >> This was detected by xfstest overlay/017 with inodex=on mount option
> > >> >> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
> > >> >> >> right after drop caches.
> > >> >> >>
> > >> >> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
> > >> >> >> option index=on is configured. If drop caches reclaim xfs inodes, before
> > >> >> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
> > >> >> >> inode and that test hits that case quite often.
> > >> >> >>
> > >> >> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
> > >> >> >> until the next cycle mount or drop caches.
> > >> >> >>
> > >> >> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
> > >> >> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > >> >> >
> > >> >> > Looks ok,
> > >> >> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> > >> >> >
> > >> >>
> > >> >> I recon that now we should now also strap:
> > >> >> Cc: <stable@vger.kernel.org> #v4.15
> > >> >>
> > >> >> Can I assume, you'll add it on apply?
> > >> >
> > >> > I'll do a proper backport of this and a couple other critical cow
> > >> > fixes after I get the 4.16 stuff merged.
> > >> >
> > >>
> > >> I am not sure what "proper backport" means in the context of
> > >> this patch.
> > >> This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
> > >> It applied cleanly on v4.15.
> > >
> > > I meant the other things that went into 4.16, like the reflink quota
> > > fixes, the directio corruption problems, etc.  Make a branch, add the
> > > necessary fixes, run xfstests to make sure it all still works, etc.
                       ^^^^^^^^^^^^
Hi Amir, could you do   this step   ?

As far as the code patch goes it's probably fine for stable, but I don't
want patches going to stable that have not been run through xfstests to
look for regressions.  If the patch doesn't increase the number of
xfstests failures then it's ready to go to 4.15.y.

--D

> > >
> > 
> > Darrick,
> > 
> > I may be missing something in the process of stable kernel
> > maintenance, but this patch fixes a reproducible v4.15 regression
> > (xfstest overlay/017 fails on stable kernel v4.15).
> > 
> > Is Greg usually picking those stable patches himself or is he waiting
> > for xfs maintainers (or xfs stable maintainers) to stage the
> > stable patches?
> 
> I'm waiting for the patch to either be tagges with cc: stable, or for
> someone to tell me to take the patch.
> 
> Sometimes I dig through the tree, but for xfs patches, I do not, as was
> told not to :)
> 
> thanks,
> 
> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode
  2018-03-12 16:27               ` Darrick J. Wong
@ 2018-03-12 20:16                 ` Amir Goldstein
  0 siblings, 0 replies; 12+ messages in thread
From: Amir Goldstein @ 2018-03-12 20:16 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Greg KH, Christoph Hellwig, Eryu Guan, Miklos Szeredi, linux-xfs,
	linux-fsdevel, stable

On Mon, Mar 12, 2018 at 6:27 PM, Darrick J. Wong
<darrick.wong@oracle.com> wrote:
> On Sun, Mar 11, 2018 at 05:24:42PM +0100, Greg KH wrote:
>> On Sun, Mar 11, 2018 at 06:08:06PM +0200, Amir Goldstein wrote:
>> > On Thu, Feb 1, 2018 at 2:35 AM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
>> > > On Thu, Feb 01, 2018 at 02:27:23AM +0200, Amir Goldstein wrote:
>> > >> On Mon, Jan 29, 2018 at 5:50 PM, Darrick J. Wong
>> > >> <darrick.wong@oracle.com> wrote:
>> > >> > On Mon, Jan 29, 2018 at 01:07:36PM +0200, Amir Goldstein wrote:
>> > >> >> On Fri, Jan 26, 2018 at 11:44 PM, Darrick J. Wong
>> > >> >> <darrick.wong@oracle.com> wrote:
>> > >> >> > On Fri, Jan 26, 2018 at 09:44:29AM +0200, Amir Goldstein wrote:
>> > >> >> >> Commit 66f364649d870 ("xfs: remove if_rdev") moved storing of rdev
>> > >> >> >> value for special inodes to VFS inodes, but forgot to preserve the
>> > >> >> >> value of i_rdev when recycling a reclaimable xfs_inode.
>> > >> >> >>
>> > >> >> >> This was detected by xfstest overlay/017 with inodex=on mount option
>> > >> >> >> and xfs base fs. The test does a lookup of overlay chardev and blockdev
>> > >> >> >> right after drop caches.
>> > >> >> >>
>> > >> >> >> Overlayfs inodes hold a reference on underlying xfs inodes when mount
>> > >> >> >> option index=on is configured. If drop caches reclaim xfs inodes, before
>> > >> >> >> it relclaims overlayfs inodes, that can sometimes leave a reclaimable xfs
>> > >> >> >> inode and that test hits that case quite often.
>> > >> >> >>
>> > >> >> >> When that happens, the xfs inode cache remains broken (zere i_rdev)
>> > >> >> >> until the next cycle mount or drop caches.
>> > >> >> >>
>> > >> >> >> Fixes: 66f364649d870 ("xfs: remove if_rdev")
>> > >> >> >> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
>> > >> >> >
>> > >> >> > Looks ok,
>> > >> >> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
>> > >> >> >
>> > >> >>
>> > >> >> I recon that now we should now also strap:
>> > >> >> Cc: <stable@vger.kernel.org> #v4.15
>> > >> >>
>> > >> >> Can I assume, you'll add it on apply?
>> > >> >
>> > >> > I'll do a proper backport of this and a couple other critical cow
>> > >> > fixes after I get the 4.16 stuff merged.
>> > >> >
>> > >>
>> > >> I am not sure what "proper backport" means in the context of
>> > >> this patch.
>> > >> This is a v4.15-rc1 regression fix that is based on v4.15-rc8.
>> > >> It applied cleanly on v4.15.
>> > >
>> > > I meant the other things that went into 4.16, like the reflink quota
>> > > fixes, the directio corruption problems, etc.  Make a branch, add the
>> > > necessary fixes, run xfstests to make sure it all still works, etc.
>                        ^^^^^^^^^^^^
> Hi Amir, could you do   this step   ?
>

Will do.

> As far as the code patch goes it's probably fine for stable, but I don't
> want patches going to stable that have not been run through xfstests to
> look for regressions.  If the patch doesn't increase the number of
> xfstests failures then it's ready to go to 4.15.y.
>


Thanks,
Amir.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-03-12 20:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-26  7:44 [PATCH v2] xfs: preserve i_rdev when recycling a reclaimable inode Amir Goldstein
2018-01-26  7:44 ` Christoph Hellwig
2018-01-26 21:44 ` Darrick J. Wong
2018-01-29 11:07   ` Amir Goldstein
2018-01-29 15:50     ` Darrick J. Wong
2018-02-01  0:27       ` Amir Goldstein
2018-02-01  0:29         ` Amir Goldstein
2018-02-01  0:35         ` Darrick J. Wong
2018-03-11 16:08           ` Amir Goldstein
2018-03-11 16:24             ` Greg KH
2018-03-12 16:27               ` Darrick J. Wong
2018-03-12 20:16                 ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).