linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard.weinberger@gmail.com>
To: Shibin George <george.shibin1993@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: File-compression on ubifs
Date: Tue, 4 Jun 2019 23:04:29 +0200	[thread overview]
Message-ID: <CAFLxGvxXcvmZtVC_AqgT65e6o-+V8uE30Y0zXQnaJOkxMgDbyg@mail.gmail.com> (raw)
In-Reply-To: <CAGu8XfRM6MtAP7v2F2jp9CGYERj5niAvhHYtXQmpzOS0uHoUrg@mail.gmail.com>

On Fri, May 17, 2019 at 1:37 PM Shibin George
<george.shibin1993@gmail.com> wrote:
>
> Hi everyone,
>
> Had a query regarding mkfs.ubifs tool. I created an empty ubifs
> filesystem using:
>
> mkfs.ubifs -y /dev/ubiX_Y

No need to run mkfs.ubifs, just mount an empty ubi volume as ubifs, it
will auto create
a filesystem for you.

> I was wondering that if I now create a new file on this filesystem
> (after mount()), would compression be enabled or disabled for that
> file by-default? I am sorry but I could quite grasp this from the
> mkfs.ubifs code.

Compression is enabled by default, unless the filesystem is encrypted.
You can also override the default compressor using the compr= mount-option.

> Another query that I have is this:
> Would ubifs do a better job at compression if it knows the root-dir
> contents ahead of time? In other words, is on-the-fly compression of a
> file (i.e. compression at the time of creating/writing to a file)
> generally worse than when the same file is known to ubifs at the time
> of image creation?

UBIFS compression works on 4k chunks, it should not matter whether you compress
at runtime or at mkfs.ubifs time.

If you're looking for better compression rates, give our zstd patches a try.
You can find them on the mailinglist.

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      parent reply	other threads:[~2019-06-04 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 11:36 File-compression on ubifs Shibin George
2019-06-04 15:14 ` Shibin George
2019-06-04 21:04 ` Richard Weinberger [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=CAFLxGvxXcvmZtVC_AqgT65e6o-+V8uE30Y0zXQnaJOkxMgDbyg@mail.gmail.com \
    --to=richard.weinberger@gmail.com \
    --cc=george.shibin1993@gmail.com \
    --cc=linux-mtd@lists.infradead.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 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).