[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140708150226.GA4113@kroah.com>
Date: Tue, 8 Jul 2014 08:02:26 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Minchan Kim <minchan@...nel.org>,
Sasha Levin <sasha.levin@...cle.com>,
"Alexander E. Patrakov" <patrakov@...il.com>,
Nitin Gupta <ngupta@...are.org>,
Jerome Marchand <jmarchan@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 3.15 093/122] zram: revalidate disk after capacity change
On Tue, Jul 08, 2014 at 07:56:17PM +0900, Sergey Senozhatsky wrote:
> On (07/07/14 16:57), Greg Kroah-Hartman wrote:
> > Date: Mon, 7 Jul 2014 16:57:35 -0700
> > From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > To: linux-kernel@...r.kernel.org
> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
> > stable@...r.kernel.org, Minchan Kim <minchan@...nel.org>, "Alexander E.
> > Patrakov" <patrakov@...il.com>, Sergey Senozhatsky
> > <sergey.senozhatsky@...il.com>, Nitin Gupta <ngupta@...are.org>, Jerome
> > Marchand <jmarchan@...hat.com>, Andrew Morton <akpm@...ux-foundation.org>,
> > Linus Torvalds <torvalds@...ux-foundation.org>
> > Subject: [PATCH 3.15 093/122] zram: revalidate disk after capacity change
> > X-Mailer: git-send-email 2.0.0.254.g50f84e3
> > User-Agent: quilt/0.63-1
> >
> > 3.15-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Minchan Kim <minchan@...nel.org>
> >
> > commit 2e32baea46ce542c561a519414c840295b229c8f upstream.
> >
> > Alexander reported mkswap on /dev/zram0 is failed if other process is
> > opening the block device file.
> >
> > Step is as follows,
> >
> > 0. Reset the unused zram device.
> > 1. Use a program that opens /dev/zram0 with O_RDWR and sleeps
> > until killed.
> > 2. While that program sleeps, echo the correct value to
> > /sys/block/zram0/disksize.
> > 3. Verify (e.g. in /proc/partitions) that the disk size is applied
> > correctly. It is.
> > 4. While that program still sleeps, attempt to mkswap /dev/zram0.
> > This fails: mkswap: error: swap area needs to be at least 40 KiB
> >
> > When I investigated, the size get by ioctl(fd, BLKGETSIZE64, xxx) on
> > mkswap to get a size of blockdev was zero although zram0 has right size by
> > 2.
> >
> > The reason is zram didn't revalidate disk after changing capacity so that
> > size of blockdev's inode is not uptodate until all of file is close.
> >
> > This patch should fix the BUG.
> >
> > Signed-off-by: Minchan Kim <minchan@...nel.org>
> > Reported-by: Alexander E. Patrakov <patrakov@...il.com>
> > Tested-by: Alexander E. Patrakov <patrakov@...il.com>
> > Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> > Cc: Nitin Gupta <ngupta@...are.org>
> > Acked-by: Jerome Marchand <jmarchan@...hat.com>
> > Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> > Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> Hello,
>
> this patch is known to cause problems. please see
> https://lkml.org/lkml/2014/7/3/885
Did the fix ever get merged to Linus's tree? If not, why not? I'd
rather just take that fix as well.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists