All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Maksim Melnikau <maxposedon@gmail.com>
Cc: util-linux@vger.kernel.org
Subject: Re: fstab zram swap integration idea
Date: Thu, 10 Jan 2013 10:47:55 +0100	[thread overview]
Message-ID: <20130110094755.GA19166@x2.net.home> (raw)
In-Reply-To: <CAGbmdnUTicf7VYrPW3_UmpX=BM80K25=uWjgc=u1=nyGPHzCtQ@mail.gmail.com>

On Mon, Jan 07, 2013 at 05:52:28PM +0300, Maksim Melnikau wrote:
> On Mon, Jan 7, 2013 at 3:42 PM, Karel Zak <kzak@redhat.com> wrote:
> >  Is it designed for anything other than swaparea?
> Yes, zram is kind-of "compressed" block device in memory, any block
> device operations could be done on top of it. Some people initialize
> ext4 partitions "in memory" for temporary operations.
> So, I still think fstab is correct place for describing fs/swap even
> for zram. Questions are: 1) what is correct place for mkfs/mkswap zram
> devices, at startup? 2) What is correct place for setting size for
> zram block device? (right now I use systemd's tmpfiles.d)

I see two independent operations

  1/ initialize zram device
  2/ create on-device filesystem/swap

in our previous emails we have talked about 2/ for swap (call mkswap).

I'm not sure if 1/ belongs to swapon/mount. It seems better to create
a special udev rule for this purpose (we use the same solution for
example for raw devices) or systemd unit.

Note that the ideal solution is to have a special daemon for block
devices management where you can configure complex scenarios and ask
for usable device/filesystem.... but something like this is not
implemented yet. These things are too complicated to hide it into
mount/swapon.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2013-01-10  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06  0:17 fstab zram swap integration idea Maksim Melnikau
2013-01-07 12:42 ` Karel Zak
2013-01-07 14:52   ` Maksim Melnikau
2013-01-10  9:47     ` Karel Zak [this message]

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=20130110094755.GA19166@x2.net.home \
    --to=kzak@redhat.com \
    --cc=maxposedon@gmail.com \
    --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.