Patchwork [2/2] Double block_buffer

login
register
mail settings
Submitter Dinar Valeev
Date May 21, 2013, 12:22 p.m.
Message ID <1369138975-17619-2-git-send-email-k0da@opensuse.org>
Download mbox | patch
Permalink /patch/245301/
State New
Headers show

Comments

Dinar Valeev - May 21, 2013, 12:22 p.m.
From: Dinar Valeev <dvaleev@suse.com>

We have block_buffer equal to MAX_BLOCK_SIZE. If we're working with 4k
aligned device, it is not enough, since we're reading too blocks.

Let's double it.

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
---
 second/partition.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Tony Breeds - May 22, 2013, 12:59 a.m.
On Tue, May 21, 2013 at 02:22:55PM +0200, Dinar valeev wrote:
> From: Dinar Valeev <dvaleev@suse.com>
> 
> We have block_buffer equal to MAX_BLOCK_SIZE. If we're working with 4k
> aligned device, it is not enough, since we're reading too blocks.
> 
> Let's double it.

Applied thanks.

Yours Tony

Patch

diff --git a/second/partition.c b/second/partition.c
index d805ad0..1ade1b6 100644
--- a/second/partition.c
+++ b/second/partition.c
@@ -64,7 +64,7 @@  static const char *valid_mac_partition_types[] = {
 
 
 #define MAX_BLOCK_SIZE 4096
-static unsigned char block_buffer[MAX_BLOCK_SIZE];
+static unsigned char block_buffer[MAX_BLOCK_SIZE * 2];
 
 static void
 add_new_partition(struct partition_t**	list, int part_number, const char *part_type,