* [PATCH] ext2: delete incorrect comment for ext2_blks_to_allocate()
@ 2020-07-02 9:56 Chengguang Xu
2020-07-03 10:20 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Chengguang Xu @ 2020-07-02 9:56 UTC (permalink / raw)
To: jack; +Cc: linux-ext4, Chengguang Xu
ext2_blks_to_allocate() only counts direct blocks need to be allocated,
return value does not include indirect blocks.
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
---
fs/ext2/inode.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index c8b371c82b4f..4df849e694dd 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -355,9 +355,6 @@ static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block,
* @k: number of blocks need for indirect blocks
* @blks: number of data blocks to be mapped.
* @blocks_to_boundary: the offset in the indirect block
- *
- * return the total number of blocks to be allocate, including the
- * direct and indirect blocks.
*/
static int
ext2_blks_to_allocate(Indirect * branch, int k, unsigned long blks,
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext2: delete incorrect comment for ext2_blks_to_allocate()
2020-07-02 9:56 [PATCH] ext2: delete incorrect comment for ext2_blks_to_allocate() Chengguang Xu
@ 2020-07-03 10:20 ` Jan Kara
2020-07-03 11:32 ` cgxu
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2020-07-03 10:20 UTC (permalink / raw)
To: Chengguang Xu; +Cc: jack, linux-ext4
On Thu 02-07-20 17:56:36, Chengguang Xu wrote:
> ext2_blks_to_allocate() only counts direct blocks need to be allocated,
> return value does not include indirect blocks.
>
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
> ---
> fs/ext2/inode.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
> index c8b371c82b4f..4df849e694dd 100644
> --- a/fs/ext2/inode.c
> +++ b/fs/ext2/inode.c
> @@ -355,9 +355,6 @@ static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block,
> * @k: number of blocks need for indirect blocks
> * @blks: number of data blocks to be mapped.
> * @blocks_to_boundary: the offset in the indirect block
> - *
> - * return the total number of blocks to be allocate, including the
> - * direct and indirect blocks.
You're right the comment is wrong but instead of deleting it, I'd rather
fix it like: "Return the number of direct blocks to allocate."
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext2: delete incorrect comment for ext2_blks_to_allocate()
2020-07-03 10:20 ` Jan Kara
@ 2020-07-03 11:32 ` cgxu
0 siblings, 0 replies; 3+ messages in thread
From: cgxu @ 2020-07-03 11:32 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-ext4
On 7/3/20 6:20 PM, Jan Kara wrote:
> On Thu 02-07-20 17:56:36, Chengguang Xu wrote:
>> ext2_blks_to_allocate() only counts direct blocks need to be allocated,
>> return value does not include indirect blocks.
>>
>> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
>> ---
>> fs/ext2/inode.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
>> index c8b371c82b4f..4df849e694dd 100644
>> --- a/fs/ext2/inode.c
>> +++ b/fs/ext2/inode.c
>> @@ -355,9 +355,6 @@ static inline ext2_fsblk_t ext2_find_goal(struct inode *inode, long block,
>> * @k: number of blocks need for indirect blocks
>> * @blks: number of data blocks to be mapped.
>> * @blocks_to_boundary: the offset in the indirect block
>> - *
>> - * return the total number of blocks to be allocate, including the
>> - * direct and indirect blocks.
>
> You're right the comment is wrong but instead of deleting it, I'd rather
> fix it like: "Return the number of direct blocks to allocate."
>
That's fine, I can resend it with another comment fix together.
Thanks,
cgxu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-03 11:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 9:56 [PATCH] ext2: delete incorrect comment for ext2_blks_to_allocate() Chengguang Xu
2020-07-03 10:20 ` Jan Kara
2020-07-03 11:32 ` cgxu
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.