summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0015-Rework-creating-the-lost-found-directory.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0015-Rework-creating-the-lost-found-directory.patch')
-rw-r--r--meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0015-Rework-creating-the-lost-found-directory.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0015-Rework-creating-the-lost-found-directory.patch b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0015-Rework-creating-the-lost-found-directory.patch
new file mode 100644
index 0000000000..fbde366854
--- /dev/null
+++ b/meta/recipes-devtools/genext2fs/genext2fs-1.4.1/0015-Rework-creating-the-lost-found-directory.patch
@@ -0,0 +1,57 @@
1Upstream-Status: inappropriate
2
3From 34a2d139e3cbc9fec1b07171fd13684d4239aa6b Mon Sep 17 00:00:00 2001
4From: Corey Minyard <cminyard@mvista.com>
5Date: Mon, 6 Jun 2011 13:51:50 -0500
6Subject: [PATCH 15/19] Rework creating the lost+found directory
7
8For some reason the lost+found directory was being created with
9the size of the number of reserved blocks. I can't find any rationale
10for that, mke2fs creates it with 16 blocks. So just create it with
1116 blocks, too.
12---
13 genext2fs.c | 15 ++++++---------
14 1 files changed, 6 insertions(+), 9 deletions(-)
15
16diff --git a/genext2fs.c b/genext2fs.c
17index b466a6d..fc7fe5f 100644
18--- a/genext2fs.c
19+++ b/genext2fs.c
20@@ -2537,28 +2537,25 @@ init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes,
21 inode_pos_finish(fs, &ipos);
22 put_dir(&dw);
23
24- // make lost+found directory and reserve blocks
25+ // make lost+found directory
26 if(fs->sb->s_r_blocks_count)
27 {
28 inode *node;
29 uint8 *b;
30
31- nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU, 0, 0, fs_timestamp, fs_timestamp);
32+ nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU,
33+ 0, 0, fs_timestamp, fs_timestamp);
34 b = get_workblk();
35 memset(b, 0, BLOCKSIZE);
36 ((directory*)b)->d_rec_len = BLOCKSIZE;
37- /* We run into problems with e2fsck if directory lost+found grows
38- * bigger than this. Need to find out why this happens - sundar
39- */
40- if (fs->sb->s_r_blocks_count > fs->sb->s_blocks_count * MAX_RESERVED_BLOCKS )
41- fs->sb->s_r_blocks_count = fs->sb->s_blocks_count * MAX_RESERVED_BLOCKS;
42 inode_pos_init(fs, &ipos, nod, INODE_POS_EXTEND, NULL);
43- for(i = 1; i < fs->sb->s_r_blocks_count; i++)
44+ // It is always 16 blocks to start out with
45+ for(i = 0; i < 16; i++)
46 extend_inode_blk(fs, &ipos, b, 1);
47 inode_pos_finish(fs, &ipos);
48 free_workblk(b);
49 node = get_nod(fs, nod, &ni);
50- node->i_size = fs->sb->s_r_blocks_count * BLOCKSIZE;
51+ node->i_size = 16 * BLOCKSIZE;
52 put_nod(ni);
53 }
54
55--
561.7.4.1
57