The Linux Kernel Mailing List
 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, a.sahrawat@samsung.com,
	Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: [PATCH 1/5] fat: add i_disksize to represent uninitialized size
Date: Wed, 30 Oct 2013 10:23:29 +0900	[thread overview]
Message-ID: <874n7zy2jy.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <CAKYAXd-P83JNoOZKEv2cfTSok9SbE1bwW34Z56EPe7WrTHSP0g@mail.gmail.com> (Namjae Jeon's message of "Wed, 30 Oct 2013 08:01:07 +0900")

Namjae Jeon <linkinjeon@gmail.com> writes:

>>> diff --git a/fs/fat/cache.c b/fs/fat/cache.c
>>> index 91ad9e1..37572c2 100644
>>> --- a/fs/fat/cache.c
>>> +++ b/fs/fat/cache.c
>>> @@ -329,10 +329,10 @@ int fat_bmap(struct inode *inode, sector_t sector,
>>> sector_t *phys,
>>>  			return 0;
>>>
>>>  		/*
>>> -		 * ->mmu_private can access on only allocation path.
>>> +		 * ->i_disksize can access on only allocation path.
>>>  		 * (caller must hold ->i_mutex)
>>>  		 */
>>> -		last_block = (MSDOS_I(inode)->mmu_private + (blocksize - 1))
>>> +		last_block = (MSDOS_I(inode)->i_disksize + (blocksize - 1))
>>>  			>> blocksize_bits;
>>>  		if (sector >= last_block)
>>>  			return 0;
>>
>> Hm, bmap() ioctl returns between ->mmu_private and i_disksize? I'm not
>> checking other FSes what does...
> I added this code after checking such behaviour from ext4.

OK. I will check with it. BTW, comment should say the both
(i.e. ->mmu_private and ->i_disksize must under ->i_mutex).
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2013-10-30  1:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 14:40 [PATCH 1/5] fat: add i_disksize to represent uninitialized size Namjae Jeon
2013-10-27 13:38 ` OGAWA Hirofumi
2013-10-29 23:01   ` Namjae Jeon
2013-10-30  1:23     ` OGAWA Hirofumi [this message]
2013-10-30  4:34       ` Namjae Jeon

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=874n7zy2jy.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