linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Allison Henderson <achender@linux.vnet.ibm.com>,
	Lukas Czerner <lczerner@redhat.com>,
	Theodore Ts'o <tytso@mit.edu>,
	linux-ext4@vger.kernel.org
Subject: One question about ext4_fallocate
Date: Thu, 19 Jul 2012 22:51:40 +0800	[thread overview]
Message-ID: <50081EFC.5060601@gmail.com> (raw)

Dear all,

I have one question about ext4_fallocate:
	For its parameters, offset & len, it will preallocate
	one space with length >= len, right?

>From the code:
	map.m_lblk = offset >> blkbits;
	/*
	 * We can't just convert len to max_blocks because
	 * If blocksize = 4096 offset = 3072 and len = 2048
	 */
	max_blocks = (EXT4_BLOCK_ALIGN(len + offset, blkbits) >> blkbits)
		- map.m_lblk;

We can see that the target space is enlarged to the (floor, ceiling) of 
(offset, offset+len). Right?

If I'm wrong, please correct me.


Regards,

             reply	other threads:[~2012-07-19 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 14:51 Wang Sheng-Hui [this message]
2012-07-19 15:42 ` One question about ext4_fallocate Andreas Dilger
2012-07-20  6:39   ` Wang Sheng-Hui

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=50081EFC.5060601@gmail.com \
    --to=shhuiw@gmail.com \
    --cc=achender@linux.vnet.ibm.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).