From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/6] fat: Support a truncate() for expanding size
Date: Tue, 08 Nov 2005 12:19:56 +0900 [thread overview]
Message-ID: <87ek5rx1ur.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20051107170626.4d08e8d6.akpm@osdl.org> (Andrew Morton's message of "Mon, 7 Nov 2005 17:06:26 -0800")
Andrew Morton <akpm@osdl.org> writes:
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote:
>>
>> +static int fat_cont_expand(struct inode *inode, loff_t size)
>
> Is it not possible to extend generic_cont_expand() so that fatfs can use it?
The generic_cont_expand() is too generic.
If "size" is block boundary, generic_cont_expand() expands the
->i_size to "size + 1", after it, the caller of it will truncate to
"size" by vmtruncate().
This sequence is not need if ->prepare_write() is cont_prepare_write().
The cont_prepare_write() will just fill the blocks with zero until
"size" if blocks is not allocated yet.
FAT is using cont_parepare_write(), so for avoiding the above extra
work, is using own version.
Probably, this version is generic only for cont_parepare_write().
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2005-11-08 3:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-07 17:32 [PATCH 1/6] fat: move fat_clusters_flush() to write_super() OGAWA Hirofumi
2005-11-07 17:36 ` [PATCH] fat: use sb_find_get_block() instead of sb_getblk() OGAWA Hirofumi
2005-11-07 17:37 ` [PATCH 3/6] fat: add the read/writepages() OGAWA Hirofumi
2005-11-07 17:39 ` [PATCH 4/6] fat: s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/ OGAWA Hirofumi
2005-11-07 17:41 ` [PATCH 5/6] fat: support ->direct_IO() OGAWA Hirofumi
2005-11-07 17:42 ` [PATCH 6/6] export/change sync_page_range/_nolock() OGAWA Hirofumi
2005-11-07 17:46 ` [PATCH 7/6] fat: Support a truncate() for expanding size OGAWA Hirofumi
2005-11-07 17:51 ` OGAWA Hirofumi
2005-11-08 1:06 ` Andrew Morton
2005-11-08 3:19 ` OGAWA Hirofumi [this message]
2005-11-08 4:19 ` Andrew Morton
2005-11-08 5:22 ` OGAWA Hirofumi
2005-11-08 20:40 ` OGAWA Hirofumi
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=87ek5rx1ur.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@osdl.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.