From: Minchan Kim <minchan@kernel.org>
To: "Alexander E. Patrakov" <patrakov@gmail.com>
Cc: util-linux@vger.kernel.org, Kai Krakow <hurikhan77@gmail.com>,
systemd-devel@lists.freedesktop.org, kay@vrfy.org,
Nitin Gupta <ngupta@vflare.org>
Subject: Re: [systemd-devel] systemd-213: regression with zram
Date: Tue, 24 Jun 2014 07:49:58 +0000 [thread overview]
Message-ID: <20140624074958.GB11030@gmail.com> (raw)
In-Reply-To: <20140624065816.GA11030@gmail.com>
On Tue, Jun 24, 2014 at 07:21:12AM +0000, Minchan Kim wrote:
> On Tue, Jun 24, 2014 at 12:34:50PM +0600, Alexander E. Patrakov wrote:
> > 24.06.2014 12:22, Minchan Kim wrote:
> > >
> > >Hello,
> > >
> > >Sorry for the late response.
> >
> > Better late than never.
> >
> > >If I parse your problem correctly, you meant that changing disksize is
> > >failed while someone opens /dev/zram0?
> > >
> > >I tried test which opens "/dev/zram0" with O_RDWR and sleep forever
> > >and then echo $((512<<20)) > /sys/block/zram0/disksize is successful.
> > >IOW, it's okay with me.
> >
> > No, this is only a part of the problem. A valid test would be:
> >
> > 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
> >
> > There is nothing in dmesg.
>
> Thanks. I could reproduce.
> When I read strace result, fstat access closed fd which seem to be
> a culprit.
>
> Cced util-linux.
When I read disk-utils/mkswap.c, it's not a problem of mkswap.
The problem is ioctl(fd, BLKGETSIZE64, bytes) is not work in
your scenario. IOW, kernel fault.
Hmm,, will investgate it.
Thanks for the report!
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
next prev parent reply other threads:[~2014-06-24 7:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53953D5C.1080004@gmail.com>
[not found] ` <i8pg6b-mg8.ln1@hurikhan77.spdns.de>
[not found] ` <5395BE60.70309@gmail.com>
[not found] ` <pd8h6b-ufa.ln1@hurikhan77.spdns.de>
[not found] ` <5395FF3A.9050407@gmail.com>
[not found] ` <20140624062209.GA10661@gmail.com>
[not found] ` <53A91C0A.2020807@gmail.com>
2014-06-24 7:21 ` [systemd-devel] systemd-213: regression with zram Minchan Kim
2014-06-24 7:49 ` Minchan Kim [this message]
2014-06-25 0:36 ` Minchan Kim
2014-06-25 4:57 ` Alexander E. Patrakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140624074958.GB11030@gmail.com \
--to=minchan@kernel.org \
--cc=hurikhan77@gmail.com \
--cc=kay@vrfy.org \
--cc=ngupta@vflare.org \
--cc=patrakov@gmail.com \
--cc=systemd-devel@lists.freedesktop.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.