All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] commands/mkfs: Added new testcase to test mkfs(8) command.
Date: Tue, 3 Nov 2015 19:55:30 +0800	[thread overview]
Message-ID: <5638A0B2.1060600@cn.fujitsu.com> (raw)
In-Reply-To: <20151103113923.GB5795@rei>

On 2015/11/03 19:39, Cyril Hrubis wrote:
> Hi!
>>>> +	mkfs_umount
>>>> +
>>>> +	if [ $blocknum -gt "$2" ]; then
>>>> +		return 1
>>>> +	fi
>>>
>>> So the size we get as $2 is in kB and df -T reports 1k blocks shouldn't these
>>> be equal, or are there any reserved block in play?
>>>
>>
>> Indeed, "$blocknum" here is equal to struct statfs'f_blocks, which denotes total
>> data blocks in filesystem(df uses statfs(2) to get this info) and does not contain
>> some metadata in filesytem, e.g. ext3's journal space size. 
> 
> Ok, then we should check for lower bound as well. Something as blocknum
> is greater than 90% of size or similar.
> 

OK, I see, thanks!
Please ignore the v2 I just sent, I will email a v3 with lower bound check.

Best Regards,
Guangwen Feng

  reply	other threads:[~2015-11-03 11:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 11:37 [LTP] [PATCH] commands/mkfs: Added new testcase to test mkfs(8) command Guangwen Feng
2015-11-02 15:28 ` Cyril Hrubis
2015-11-03  6:16   ` Guangwen Feng
2015-11-03 11:43     ` [LTP] [PATCH v2] " Guangwen Feng
2015-11-04  4:37       ` =?unknown-8bit?b?5p2O56OK?=
2015-11-04  5:37         ` Guangwen Feng
2015-11-03 11:20   ` [LTP] [PATCH] " Guangwen Feng
2015-11-03 11:39     ` Cyril Hrubis
2015-11-03 11:55       ` Guangwen Feng [this message]
2015-11-04  8:12         ` [LTP] [PATCH v3] " Guangwen Feng
2015-11-04 13:22           ` Cyril Hrubis
2015-11-05  2:03             ` Guangwen Feng

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=5638A0B2.1060600@cn.fujitsu.com \
    --to=fenggw-fnst@cn.fujitsu.com \
    --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 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.