* [PATCH] bug fix for the ntfs driver
@ 2007-08-15 16:26 Bean
2007-08-20 14:04 ` Marco Gerards
0 siblings, 1 reply; 5+ messages in thread
From: Bean @ 2007-08-15 16:26 UTC (permalink / raw)
To: The development of GRUB 2
Hi,
This patch fix a bug in the ntfs driver which occurs when accessing
certain compressed files.
--
Bean
2007-08-16 Bean <bean123ch@gmail.com>
* fs/ntfs.c (read_block): Bug fix for compressed files.
Index: fs/ntfs.c
===================================================================
RCS file: /sources/grub/grub2/fs/ntfs.c,v
retrieving revision 1.1
diff -u -p -r1.1 ntfs.c
--- fs/ntfs.c 3 Aug 2007 07:44:01 -0000 1.1
+++ fs/ntfs.c 15 Aug 2007 16:15:48 -0000
@@ -665,9 +665,6 @@ read_block (struct grub_ntfs_rlst *ctx,
if (read_run_list (ctx))
return grub_errno;
}
- if (ctx->target_vcn + 16 < ctx->next_vcn)
- return grub_error (GRUB_ERR_BAD_FS,
- "Compression block should be 16 sector long");
}
nn = (16 - (ctx->target_vcn & 0xF)) / cpb;
@@ -732,7 +729,9 @@ read_block (struct grub_ntfs_rlst *ctx,
if (buf)
{
if (grub_disk_read
- (ctx->comp.disk, ctx->curr_lcn * ctx->comp.spc, 0,
+ (ctx->comp.disk,
+ (ctx->target_vcn - ctx->curr_vcn +
+ ctx->curr_lcn) * ctx->comp.spc, 0,
nn * (ctx->comp.spc << BLK_SHR), buf))
return grub_errno;
buf += nn * (ctx->comp.spc << BLK_SHR);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bug fix for the ntfs driver
2007-08-15 16:26 [PATCH] bug fix for the ntfs driver Bean
@ 2007-08-20 14:04 ` Marco Gerards
2007-08-21 2:21 ` Bean
0 siblings, 1 reply; 5+ messages in thread
From: Marco Gerards @ 2007-08-20 14:04 UTC (permalink / raw)
To: The development of GRUB 2
Bean <bean123ch@gmail.com> writes:
Hi Bean,
> This patch fix a bug in the ntfs driver which occurs when accessing
> certain compressed files.
Sorry again for the late reply...
> 2007-08-16 Bean <bean123ch@gmail.com>
>
> * fs/ntfs.c (read_block): Bug fix for compressed files.
Please describe in the changelog entry what changed, not the
functional effect. Examples can be:
- Fix off-by-one error.
- Initialize variable to 9.
- Check if memory allocation fails, in that case return an error.
etc.
Unfortunately I do not understand your change, why it is required and
what the error was. Can you please update the changelog entry?
Thanks,
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bug fix for the ntfs driver
2007-08-20 14:04 ` Marco Gerards
@ 2007-08-21 2:21 ` Bean
2007-11-10 17:31 ` Marco Gerards
0 siblings, 1 reply; 5+ messages in thread
From: Bean @ 2007-08-21 2:21 UTC (permalink / raw)
To: The development of GRUB 2
Hi,
The problem is caused by the structure of compressed files. In ntfs,
16 clusters is the basic compressed unit. The original code assume
that the file will break in 16 cluster long blocks, but in fact, the
blocks will be merged if they are stored next to to each other on
disk. The new code fix this problem.
* fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
On 8/20/07, Marco Gerards <mgerards@xs4all.nl> wrote:
> Bean <bean123ch@gmail.com> writes:
>
> Hi Bean,
>
> > This patch fix a bug in the ntfs driver which occurs when accessing
> > certain compressed files.
>
> Sorry again for the late reply...
>
> > 2007-08-16 Bean <bean123ch@gmail.com>
> >
> > * fs/ntfs.c (read_block): Bug fix for compressed files.
>
> Please describe in the changelog entry what changed, not the
> functional effect. Examples can be:
>
> - Fix off-by-one error.
> - Initialize variable to 9.
> - Check if memory allocation fails, in that case return an error.
>
> etc.
>
> Unfortunately I do not understand your change, why it is required and
> what the error was. Can you please update the changelog entry?
>
> Thanks,
> Marco
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Bean
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bug fix for the ntfs driver
2007-08-21 2:21 ` Bean
@ 2007-11-10 17:31 ` Marco Gerards
2007-11-10 20:08 ` Robert Millan
0 siblings, 1 reply; 5+ messages in thread
From: Marco Gerards @ 2007-11-10 17:31 UTC (permalink / raw)
To: The development of GRUB 2
Bean <bean123ch@gmail.com> writes:
Hi,
> The problem is caused by the structure of compressed files. In ntfs,
> 16 clusters is the basic compressed unit. The original code assume
> that the file will break in 16 cluster long blocks, but in fact, the
> blocks will be merged if they are stored next to to each other on
> disk. The new code fix this problem.
>
> * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
Sorry for forgetting about this patch. It should be committed.
Robert, if you have time, can you commit this? I will mark this mail
as important... If you don't have the time, I will surely commit it
ASAP :-)
--
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bug fix for the ntfs driver
2007-11-10 17:31 ` Marco Gerards
@ 2007-11-10 20:08 ` Robert Millan
0 siblings, 0 replies; 5+ messages in thread
From: Robert Millan @ 2007-11-10 20:08 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Nov 10, 2007 at 06:31:09PM +0100, Marco Gerards wrote:
>
> Sorry for forgetting about this patch. It should be committed.
>
> Robert, if you have time, can you commit this? I will mark this mail
> as important... If you don't have the time, I will surely commit it
> ASAP :-)
Done.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-10 20:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-15 16:26 [PATCH] bug fix for the ntfs driver Bean
2007-08-20 14:04 ` Marco Gerards
2007-08-21 2:21 ` Bean
2007-11-10 17:31 ` Marco Gerards
2007-11-10 20:08 ` Robert Millan
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.