From: Josef Bacik <josef@redhat.com>
To: Alberich de megres <alberich2k5@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: get_block
Date: Mon, 18 May 2009 16:00:22 -0400 [thread overview]
Message-ID: <20090518200022.GA6158@dhcp231-156.rdu.redhat.com> (raw)
In-Reply-To: <12d708830905181232k47f2363dmfaf3f8ccc2998bd2@mail.gmail.com>
On Mon, May 18, 2009 at 09:32:48PM +0200, Alberich de megres wrote:
> Hi!
>
> Again, i got another question this time is about get_block function
> used on "mpage_writepages" for address_space_operations writepage.
>
> It is supposed to map the number of blocks passed in sector_t iblock
> parameter? or it is asking for the block number iblock?
>
> thanks!!
iblock is the relative block # in the inode that you want to map. Whatever you
set as bh_result->b_size is how much will be mapped, so its usually something
like
bh_result->b_size = num_of_blocks_we_want << inode->i_blkbits;
Hope that helps,
Josef
prev parent reply other threads:[~2009-05-18 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 19:32 get_block Alberich de megres
2009-05-18 20:00 ` Josef Bacik [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=20090518200022.GA6158@dhcp231-156.rdu.redhat.com \
--to=josef@redhat.com \
--cc=alberich2k5@gmail.com \
--cc=linux-fsdevel@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 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).