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, a.sahrawat@samsung.com,
	Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: [PATCH 2/5] fat: add fat_fallocate operation
Date: Wed, 30 Oct 2013 10:27:25 +0900	[thread overview]
Message-ID: <87zjprwnsy.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <CAKYAXd8sJce+asVXOsOHb3eC5VMxbfSFUTS=AFCmiDbc9tzobg@mail.gmail.com> (Namjae Jeon's message of "Wed, 30 Oct 2013 08:24:45 +0900")

Namjae Jeon <linkinjeon@gmail.com> writes:

>>> +	/* Release unwritten fallocated blocks on file release. */
>>> +	if (round_up(inode->i_size, sb->s_blocksize) <
>>> +	    MSDOS_I(inode)->i_disksize && inode->i_nlink != 0)
>>> +		fat_truncate_blocks(inode, inode->i_size);
>>> +
>>>  	truncate_inode_pages(&inode->i_data, 0);
>>>  	if (!inode->i_nlink) {
>>>  		inode->i_size = 0;

[...]

>> And inode->i_size should be ->mmu_private?
> Sorry, I don't understand your question yet...
> Could you elaborate more ?

"if" part is checking "round_up(->i_size) < ->i_disksize", but I guess
fallocate() truncation should be only needed if there is uninitialized
data. So, I felt that part should check ->mmu_private and ->i_disksize.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 14:40 Namjae Jeon
2013-10-27 13:50 ` OGAWA Hirofumi
2013-10-29 23:24   ` Namjae Jeon
2013-10-30  1:27     ` OGAWA Hirofumi [this message]
2013-10-30  5:18       ` 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=87zjprwnsy.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

Powered by JetHome