From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] fat: return only first cluster when allocating
Date: Mon, 12 Oct 2026 15:03:14 +0900 [thread overview]
Message-ID: <87o6czlal9.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <3b610d3340eaa7c22bb1dd95b1ee9b95@inf.ufrgs.br>
Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br> writes:
> Em 2026-10-11 15:57, OGAWA Hirofumi escreveu:
>> Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br> writes:
>>
>>> fat_alloc_clusters() returns every allocated cluster number in an array.
>>> For larger allocations, like growing a file, this array would need to be
>>> very large.
>>>
>>> Make fat_alloc_clusters() return only the first allocated cluster in the
>>> chain. Update fat_add_new_entries() to follow the chain when it needs
>>> the second cluster.
>>
>> This would be more common case than fallocate(), so penalize this part
>> would not be good.
>>
>> Thanks.
>
> That makes sense.
>
> I can change the approach so that fat_alloc_clusters() and the directory
> entry path are left unchanged. For fat_add_clusters(), I would add a
> separate fat_alloc_chain() helper which allocates the whole chain but
> only returns the first cluster.
>
> Would that approach be preferable?
Sounds good if both share the almost all codes.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2026-10-12 6:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 2:09 [PATCH 0/4] fat: allocate multiple clusters in fallocate Matheus Alves de Almeida
2026-10-08 2:09 ` [PATCH 1/4] fat: remove cluster allocation size limit Matheus Alves de Almeida
2026-10-08 2:09 ` [PATCH 2/4] fat: return only first cluster when allocating Matheus Alves de Almeida
2026-10-11 18:57 ` OGAWA Hirofumi
2026-10-12 5:44 ` Matheus Alves de Almeida
2026-10-12 6:03 ` OGAWA Hirofumi [this message]
2026-10-08 2:09 ` [PATCH 3/4] fat: support adding multiple clusters Matheus Alves de Almeida
2026-10-08 2:09 ` [PATCH 4/4] fat: allocate multiple clusters in fallocate Matheus Alves de Almeida
2026-10-11 18:55 ` [PATCH 0/4] " OGAWA Hirofumi
2026-10-12 5:43 ` Matheus Alves de Almeida
2026-10-12 6:01 ` 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=87o6czlal9.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matheus.aalmeida@inf.ufrgs.br \
/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.