diff options
Diffstat (limited to 'meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch')
-rw-r--r-- | meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch index c60f7b42af..7c89dc08bd 100644 --- a/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch +++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-fix-open-file-limit.patch | |||
@@ -1,3 +1,8 @@ | |||
1 | From b8047131516fb39adce68f4734ff5fc178be275b Mon Sep 17 00:00:00 2001 | ||
2 | From: "yanjun.zhu" <yanjun.zhu@windriver.com> | ||
3 | Date: Wed, 20 May 2015 18:17:45 +0200 | ||
4 | Subject: [PATCH 2/4] Fix open file limit | ||
5 | |||
1 | Upstream-Status: Backport | 6 | Upstream-Status: Backport |
2 | 7 | ||
3 | unsquashfs: fix open file limit | 8 | unsquashfs: fix open file limit |
@@ -30,11 +35,16 @@ track the amount of open files. | |||
30 | 35 | ||
31 | Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> | 36 | Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> |
32 | 37 | ||
33 | Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> | 38 | Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> |
39 | Signed-off-by: Martin Jansa <martin.jansa@lge.com> | ||
40 | --- | ||
41 | squashfs-tools/unsquashfs.c | 134 +++++++++++++++++++++++++++++++++++++++++--- | ||
42 | 1 file changed, 126 insertions(+), 8 deletions(-) | ||
34 | 43 | ||
35 | diff -urpN a/unsquashfs.c b/unsquashfs.c | 44 | diff --git a/unsquashfs.c b/unsquashfs.c |
36 | --- a/unsquashfs.c 2012-11-30 15:31:29.000000000 +0800 | 45 | index 4f26e18..d532486 100644 |
37 | +++ b/unsquashfs.c 2012-11-30 15:32:03.000000000 +0800 | 46 | --- a/unsquashfs.c |
47 | +++ b/unsquashfs.c | ||
38 | @@ -31,6 +31,8 @@ | 48 | @@ -31,6 +31,8 @@ |
39 | 49 | ||
40 | #include <sys/sysinfo.h> | 50 | #include <sys/sysinfo.h> |
@@ -91,7 +101,7 @@ diff -urpN a/unsquashfs.c b/unsquashfs.c | |||
91 | int write_file(struct inode *inode, char *pathname) | 101 | int write_file(struct inode *inode, char *pathname) |
92 | { | 102 | { |
93 | unsigned int file_fd, i; | 103 | unsigned int file_fd, i; |
94 | @@ -794,8 +836,8 @@ int write_file(struct inode *inode, char | 104 | @@ -794,8 +836,8 @@ int write_file(struct inode *inode, char *pathname) |
95 | 105 | ||
96 | TRACE("write_file: regular file, blocks %d\n", inode->blocks); | 106 | TRACE("write_file: regular file, blocks %d\n", inode->blocks); |
97 | 107 | ||
@@ -102,7 +112,7 @@ diff -urpN a/unsquashfs.c b/unsquashfs.c | |||
102 | if(file_fd == -1) { | 112 | if(file_fd == -1) { |
103 | ERROR("write_file: failed to create file %s, because %s\n", | 113 | ERROR("write_file: failed to create file %s, because %s\n", |
104 | pathname, strerror(errno)); | 114 | pathname, strerror(errno)); |
105 | @@ -1712,7 +1754,7 @@ void *writer(void *arg) | 115 | @@ -1707,7 +1749,7 @@ void *writer(void *arg) |
106 | } | 116 | } |
107 | } | 117 | } |
108 | 118 | ||
@@ -111,7 +121,7 @@ diff -urpN a/unsquashfs.c b/unsquashfs.c | |||
111 | if(failed == FALSE) | 121 | if(failed == FALSE) |
112 | set_attributes(file->pathname, file->mode, file->uid, | 122 | set_attributes(file->pathname, file->mode, file->uid, |
113 | file->gid, file->time, file->xattr, force); | 123 | file->gid, file->time, file->xattr, force); |
114 | @@ -1803,9 +1845,9 @@ void *progress_thread(void *arg) | 124 | @@ -1798,9 +1840,9 @@ void *progress_thread(void *arg) |
115 | 125 | ||
116 | void initialise_threads(int fragment_buffer_size, int data_buffer_size) | 126 | void initialise_threads(int fragment_buffer_size, int data_buffer_size) |
117 | { | 127 | { |
@@ -123,7 +133,7 @@ diff -urpN a/unsquashfs.c b/unsquashfs.c | |||
123 | 133 | ||
124 | sigemptyset(&sigmask); | 134 | sigemptyset(&sigmask); |
125 | sigaddset(&sigmask, SIGINT); | 135 | sigaddset(&sigmask, SIGINT); |
126 | @@ -1841,10 +1883,86 @@ void initialise_threads(int fragment_buf | 136 | @@ -1836,10 +1878,86 @@ void initialise_threads(int fragment_buffer_size, int data_buffer_size) |
127 | EXIT_UNSQUASH("Out of memory allocating thread descriptors\n"); | 137 | EXIT_UNSQUASH("Out of memory allocating thread descriptors\n"); |
128 | deflator_thread = &thread[3]; | 138 | deflator_thread = &thread[3]; |
129 | 139 | ||
@@ -213,3 +223,6 @@ diff -urpN a/unsquashfs.c b/unsquashfs.c | |||
213 | fragment_cache = cache_init(block_size, fragment_buffer_size); | 223 | fragment_cache = cache_init(block_size, fragment_buffer_size); |
214 | data_cache = cache_init(block_size, data_buffer_size); | 224 | data_cache = cache_init(block_size, data_buffer_size); |
215 | pthread_create(&thread[0], NULL, reader, NULL); | 225 | pthread_create(&thread[0], NULL, reader, NULL); |
226 | -- | ||
227 | 2.1.4 | ||
228 | |||