public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] lib/tst_mkfs: new tst_mkfs_sized function for create appointed size fs
Date: Wed, 9 Mar 2016 16:52:58 +0100	[thread overview]
Message-ID: <20160309155258.GA32248@rei.lan> (raw)
In-Reply-To: <1202691488.27788761.1457537492316.JavaMail.zimbra@redhat.com>

Hi!
> > Also why have you added the blocksize parameter as well? The block size
> > is needed only for the mmap16 test while limiting filesystem size seems
> > like good addition to the library?
> 
> Block size is needed because some fs need to know the block count, if you
> want to create a sized fs. For example if we want to make 512m ext4 and xfs:
> 
> xfs can directly use mkfs -t xfs -d size=512m device
> 
> but mkfs.ext4 need to do like: mkfs -t ext4 -b $block_size device 512*1024*1024/$block_size
> 
> So we need to know block size for some fs, as I know udf fs need to know block count too.

Looking at the a few different mkfs programs there is no unified way to
pass the size parameter. And looks like only mke2fs and mkfs.fat
supports one paramter after the device.

So after all the easiest solution may be just to add one more const
char* fs-size parameter to tst_mkfs that could be used to pass block
count to these two.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-03-09 15:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 13:35 [LTP] [PATCH 1/2] lib/tst_mkfs: new tst_mkfs_sized function for create appointed size fs Zorro Lang
2016-03-08 13:35 ` [LTP] [PATCH 2/2] mmap16: fix ETIMEDOUT error if test device is too large Zorro Lang
2016-03-09  2:22   ` Eryu Guan
2016-03-09  3:12     ` Zirong Lang
2016-03-09 13:07 ` [LTP] [PATCH 1/2] lib/tst_mkfs: new tst_mkfs_sized function for create appointed size fs Cyril Hrubis
2016-03-09 15:31   ` Zirong Lang
2016-03-09 15:52     ` Cyril Hrubis [this message]
2016-03-09 16:05       ` Zirong Lang
2016-03-09 16:09         ` Cyril Hrubis
2016-03-09 16:30           ` Zirong Lang
2016-03-09 17:43             ` Cyril Hrubis
2016-03-10  1:45               ` Zirong Lang
2016-03-10 10:04                 ` Cyril Hrubis
2016-03-10 12:00                   ` Zirong Lang
2016-03-10 12:19                     ` Cyril Hrubis
2016-03-10 13:30                       ` Zirong Lang
2016-03-10 14:06                         ` Cyril Hrubis
2016-03-10 16:24                           ` Zirong Lang
2016-03-14 17:15                             ` Cyril Hrubis
2016-03-09 16:01     ` Zirong Lang
2016-03-09 13:09 ` Cyril Hrubis
2016-03-09 15:09   ` Zirong Lang

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=20160309155258.GA32248@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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