mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH v4 5/6] fat: permit to return phy block number by fibmap in fallocated region
Date: Wed, 19 Mar 2014 00:29:32 +0900	[thread overview]
Message-ID: <8738if4jab.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <1393769373-3609-1-git-send-email-linkinjeon@gmail.com> (Namjae Jeon's message of "Sun, 2 Mar 2014 23:09:33 +0900")

Namjae Jeon <linkinjeon@gmail.com> writes:

> +int fat_bmap2(struct inode *inode, sector_t sector,
> +	      unsigned long *mapped_blocks, struct buffer_head *bh_result,
> +	      int create, sector_t *bmap)
> +{
> +	struct super_block *sb = inode->i_sb;
> +	sector_t last_block;
> +	const unsigned long blocksize = sb->s_blocksize;
> +	const unsigned char blocksize_bits = sb->s_blocksize_bits;
> +
> +	BUG_ON(create != 0);
> +
> +	*bmap = 0;
> +	*mapped_blocks = 0;
> +
> +	last_block = (MSDOS_I(inode)->i_disksize + (blocksize - 1))
> +		>> blocksize_bits;
> +
> +	if (sector >= last_block)
> +		return 0;
> +
> +	return fat_get_mapped_cluster(inode, sector, last_block, mapped_blocks,
> +				      bmap);

Maybe, we are better to merge fat_bmap2() and fat_get_block_bmap()?
fat_bmap2() seems to be pointless.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

      reply	other threads:[~2014-03-18 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 14:09 Namjae Jeon
2014-03-18 15:29 ` OGAWA Hirofumi [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=8738if4jab.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=a.sahrawat@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=linkinjeon@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    /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

all inboxes | Powered by JetHome®